Is making material completely transparent resource-heavy?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kubaxius

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?

:bust_in_silhouette: Reply From: Calinou

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.

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.

kubaxius | 2020-03-07 12:36

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.

Calinou | 2020-03-10 13:03