0 votes

I want to completely hide parts of different instances of meshes. I could just remove these parts completely in Blender, but it would make creating collision shapes much harder because "Create Trimesh Static Body" would create collision shapes also inside of meshes. Then I get an idea of creating a material that is transparent all the time but here comes a question: Wouldn't it be a very bad time for the GPU?

asked Mar 7 in Engine by kubaxius (150 points)

1 Answer

0 votes

Then I get an idea of creating a material that is transparent all the time but here comes a question: Wouldn't it be a very bad time for the GPU?

More than GPU-intensive, there is another issue with transparency: sorting. Faces that are supposed to be behind another object may appear to be in front of the object because of depth sorting issues. This is common in all real-time renderers that don't use costly order-independent transparency techniques.

Also, transparent materials can't cast shadows in Godot.

answered Mar 7 by Calinou (6,336 points)

That is not really a problem in my case, because as I said, these faces have alpha set to 0 and are completely transparent, they are there just to make creating collision shapes easier.

For collision helpers, you should hide the mesh entirely after creating the collision shape (or even before, it shouldn't matter). Therefore, no resources will be spent on rendering it.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.