Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

SurfaceAnalyzer

An asset by BWolf
The page banner background of a mountain and forest
SurfaceAnalyzer hero image

Quick Information

0 ratings
SurfaceAnalyzer icon image
BWolf
SurfaceAnalyzer

A Godot 4.2+ plugin for identifying surface materials on complex 3D meshes via raycast.Designed to work alongside a detailed "ConcavePolygonShape3D" for precise material detection.Features- Returns the actually rendered material "get_active_material"- Returns the overridden material from MeshInstance3D "get_surface_override_material"- Works with multi-surface meshes- Custom node hierarchies may require manual adjustments.Requirements- Godot 4.2 or newer- The detailed collision shape must be generated from the visual mesh- Jolt Physics: If using Jolt, enable "physics/jolt_physics_3d/queries/enable_ray_cast_face_index" (requires godot-jolt 0.14.0 or newer)

Supported Engine Version
4.2
Version String
2.2
License Version
MIT
Support Level
community
Modified Date
2 months ago
Git URL
Issue URL

A Godot 4.2+ plugin for identifying surface materials on complex 3D meshes via raycast.

SurfaceAnalyzer maps a raycast face index to the material of the hit triangle using MeshDataTool. It works alongside a detailed ConcavePolygonShape3D for precise material detection

Features

  • Returns the actually rendered material (get_active_material)
  • Returns the overridden material from MeshInstance3D (get_surface_override_material)
  • Works with multi-surface meshes

Requirements

  • Godot 4.2 or newer
  • The detailed collision shape must be generated from the visual mesh.
  • Jolt Physics: If using Jolt, enable physics/jolt/ray_cast/enable_face_index (requires godot-jolt 0.14.0 or newer).

Installation

  1. Copy the addon folder into your project's addons/ directory.
  2. Enable the plugin in Project Settings → Plugins. The Autoload will be registered automatically.

Usage

var material = SurfaceAnalyzer.get_active_material(collider, face_index)
if material:
    print(material.resource_path)

A Godot 4.2+ plugin for identifying surface materials on complex 3D meshes via raycast.

Designed to work alongside a detailed "ConcavePolygonShape3D" for precise material detection.

Features

- Returns the actually rendered material "get_active_material"
- Returns the overridden material from MeshInstance3D "get_surface_override_material"
- Works with multi-surface meshes

- Custom node hierarchies may require manual adjustments.

Requirements

- Godot 4.2 or newer
- The detailed collision shape must be generated from the visual mesh
- Jolt Physics: If using Jolt, enable "physics/jolt_physics_3d/queries/enable_ray_cast_face_index" (requires godot-jolt 0.14.0 or newer)

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
SurfaceAnalyzer icon image
BWolf
SurfaceAnalyzer

A Godot 4.2+ plugin for identifying surface materials on complex 3D meshes via raycast.Designed to work alongside a detailed "ConcavePolygonShape3D" for precise material detection.Features- Returns the actually rendered material "get_active_material"- Returns the overridden material from MeshInstance3D "get_surface_override_material"- Works with multi-surface meshes- Custom node hierarchies may require manual adjustments.Requirements- Godot 4.2 or newer- The detailed collision shape must be generated from the visual mesh- Jolt Physics: If using Jolt, enable "physics/jolt_physics_3d/queries/enable_ray_cast_face_index" (requires godot-jolt 0.14.0 or newer)

Supported Engine Version
4.2
Version String
2.2
License Version
MIT
Support Level
community
Modified Date
2 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers