Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Nohack | |
Old Version | Published before Godot 3 was released. |
I posted this question on blender stackexchange earlier and got no good answers. My goal is ultimately to make this work in godot, so I figured I’d ask here to.
So what I want is to just make the object/mesh transparent as a “filter” instead of giving it a transparent material which will show the inside/behind faces.
This is currently what I’m getting:
This is what I want to get (done using post editing)
All of this is demonstrated using blender, but the exact same thing happens in godot, so I don’t feel the need to upload a sample project, I can provide one if needed.
In Godot, the result you are getting is obtained by having the double sided
option enabled on the material, so I think you have to disable it. If materials are directly in the mesh however, I’m not sure how you can do this, maybe something in Blender to prevent backfaces from being rendered, or add a material override in Godot.
However that doesn’t fixes all cases, I tried with Suzanne (the monkey from Blender) and you can see outside faces through the model. In theory, there is nothing wrong with it, because you can see through the model (because it’s transparent) and outside faces are supposed to be seen. What you want (judging by your screenshot), is to not be able to see anything of this model through itself… I don’t see any option in Godot to do that, unfortunately
I think there are ways, of course, but not as simple as setting flags in a material.
It has to do with the depth buffer, like, drawing the mesh as if it was opaque, but the result must be made transparent. Maybe use a render-to-texture? (but may come with drawbacks).
If anyone knows, correct me if I’m wrong, because I’m not experienced yet in the 3D side of Godot 2.x ^^"
However if disabling double sided
is enough for you, I might move this comment as answer.
Zylann | 2017-02-08 23:57