Transparant PNG render fine in 3D editor, not in regular 3D viewer

Hi Sketchfab team,

I’m facing an issue with transparant PNGs, it doesn’t seem to be rendering correctly in the 3D viewer.

Enclosed an example with some flowers.

On the right, in the regular 3D viewer the flowers are not rendering correctly. (stems in front of flower and the back / middle flower seem to be in front of the front one.

Cheers,
Eduard

Hello, transparent objects are sorted before being rendered, so that the ones in the background are rendered first.
That’s what you are observing in the editor.
In the viewer we have an optimization that merges all geometries that share the same material for faster rendering. The problem here is that all the flowers end up being 1 geometry, that will end up being rendered in 1 draw. So we can’t sort them, so the order is basically random. that’s a common issue with blended transparency.

however in your case, there is a solution. Since your flowers are actually not transparent, but “semi” opaque you can use Mask transparency (you may need to adjust the slider value). There are several benefits to it. First it should fix your issue in the viewer, and second the flowers will now catch the shadows.


I hope that helps

4 Likes

Hi Rémy,

Thanks for your quick reply - masking works, thank you. :+1:
I didn’t like the shadows the flowers were casting so I increased the shadow bias a bit, happy with the result now.

Cheers,
Eduard

4 Likes