Forward shading problem

I have encountered a visual glich

The floor is not in front of the bottle.
when i just move the camera, this happens

128200-forward2.png

How can i fix this?

Hey packetmonkey,

Would you mind providing a screenshot of your material graph for the bottle. I mainly just need to see the settings.

Also, I may need to see the material graph of the floor mesh material as well. There have been some nodes that break translucency sorting in the past.

!

We have not heard back from you in a few days, so we are marking this post as resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

,

My brick mat has been deleted. but no mater what the problem is. when i chose forwardshading. i always has this problem

I wasn’t able to reproduce this behavior so I’m going to need you to run this test.

  • Open a blank project
  • Create a new material and change the blend mode to translucent
  • Add a vector 3 and plug into base color (pick any color)
  • Add a scalar value of .3 and plug into opacity (compile/save)
  • Drag a cylinder into the scene and apply the materal
  • Move the camera around the cylinder to see if the issue occurs.

Just so you know I also placed the cylinder in different positions to see if I would get the same sorting issue you are having. I also changed various settings but didn’t see the bug. Let me know if my test needs to be changed in order to reproduce the issue.

,

Hey PacketMonkey,

Thank you for getting back with the additional information. I wasn’t aware that you were using two translucent materials. Now that I know this I can say what you are seeing is expected behavior, the engine determines sort priority for translucent materials by checking the origin of the object’s bounds. The one that is closer get’s drawn on top, so think of it this way. Which ever object’s origin is closer is on top.

You can manually set the sort or by selecting a mesh and in the rendering section look for “translucency sort priority” the higher number gets drawn on top.

Aside from that you are running into a classic sorting issue that many devs have to workaround regarding translucency.