Trouble with a transparent texture in 3d (solved)

Hello there,

The large plane covering the frame carries an almost transparent image texture (a png) with just a faint mirror image. This texture gives me a bit of a headache, as the results vary with each build:

The last image is the desired one, in the penultimate one, the outside bits of the columns are missing.
In the outliner, I have tried every order known to man, I think, I didn’t miss one. It does not matter.
I attach a minimal project with just the important bits in. It uses rendercam and I haven’t altered any script file, just use an unlit material.
test.zip (3.6 MB)

If someone could help me and give me a hint what I might have done wrong - this would be grand!

1 Like

Quick glance seems like the classic z fighting . Took a look , the glass model is sharing space within another models geometry and a quick fix could simply be something like moving the glass model a tiny bit in the z axis. Around -0.1 would probably work. cheers

1 Like

@MasterMind - you are great! Moved the glass model and built 10 times and every time the same result :grinning: Thank you so much!

Another thing I learned from you, thank you and of course for taking your time to look at the project.

Edit:
Just tried in my large project, where the player moves about - sometimes the outside area is there, sometimes it is gone, depending on angle and distance. Will fiddle a bit more with the glass and if it
keeps playing up, I’ll simply chuck it out.
Another edit:
frosted glass works, @MasterMind, what do you think, does this look okayish?

3 Likes

This looks better than okayish, it is great! Very nice. You are right though there is a transparency issue, you can come across with 3d when you are using an alpha texture and rendering multiple things behind the transparent texture. I think it has to do with alpha blending and the z-buffer, and is a common issue in other engines as well. Each issue may be a bit unique, when I had this issue in defold I created separate material and render predicate and made sure to render the textured objects before the the object using the alpha texture, using a custom render script. I am curious if others have had a similar issue and if they have any workarounds.

Your project is looking really good. Thanks for sharing.

3 Likes

This so kind of you. I am still very new to Blender 3.1, but it is fun to try and produce nice materials and then see them in Defold.
As for the glass, it hasn’t to be perfect and I think the players won’t mind. And anyway, they aren’t supposed to stare at the exit but to explore the building.
If I weren’t that inept, I’d lay my hands at shaders, render scripts and the like as well, but I fear this is a hopeless endeavour :smiley:.
Thank you very much for your opinion, I value it a lot.

4 Likes

Last update:

for anyone interested: @MasterMind has written a cool glass material that has solved my problems with transparent textures in 3D.
You can find it near the end of this thread: Black areas/flickering in my Android app (solved)

3 Likes