Skip to content

Mesh built with SurfaceTool not rendering #103179

@Jools64

Description

@Jools64

Tested versions

  • Reproducible in v4.4.rc1.official [8ed125b]
  • Not Reproducible in v4.3.stable.official [77dcf97]

System information

Godot v4.4.rc1 - Windows 11 (build 22631) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - AMD Radeon(TM) Vega 8 Graphics (Advanced Micro Devices, Inc.; 30.0.13044.8001) - AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 threads)

Issue description

Using SurfaceTool to build a mesh that is then applied to a CSGMesh3D and added to the scene renders in 4.3, but not in 4.4r1

In 4.4r1 it does not render at all:

Image

How it used to render in 4.3:

Image

Steps to reproduce

I have used the following code to build a mesh via SurfaceTool and add it as a CSGMesh3D child node:

extends Node3D

func _ready():
	var surface_tool: SurfaceTool = SurfaceTool.new()
	surface_tool.begin(Mesh.PRIMITIVE_TRIANGLES)
	
	surface_tool.add_vertex(Vector3(-1, -1, 0))
	surface_tool.add_vertex(Vector3(-1,  1, 0))
	surface_tool.add_vertex(Vector3( 1, -1, 0))
	
	surface_tool.add_vertex(Vector3( 1, -1, 0))
	surface_tool.add_vertex(Vector3(-1,  1, 0))
	surface_tool.add_vertex(Vector3( 1,  1, 0))
	
	var mesh = CSGMesh3D.new()
	mesh.material = load("res://new_standard_material_3d.tres")
	mesh.mesh = surface_tool.commit()
	add_child(mesh)

Minimal reproduction project (MRP)

surface-mesh-issue.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions