Node order in the hierarchy can change when using compression and transparent materials

Yes sure! felix@needle.tools

Okay, sent!

by user 224300406682025985

From our 3D artist regrading the comments about the rendering order: “There are clear pivot points for everything, we made the origin of all the transparent parts in their designated centers. As for the rendering order, with the +50 setting over the glass* 3000 setting, it renders correctly in the viewer.”
screenshot_2023-03-27_144751.png

by user 224300406682025985

I can confirm the models look fine in regards to the viewing angle having no effect on the render order of the materials/faces.

by user 224300406682025985

In any case, if it was a rendering sorting mistake, would that explain how the local build looks fine but the production build doesn’t?

by user 224300406682025985

Nope it doesn’t :slightly_smiling_face: good to know you’re using the renderer order already to control that!

Thanks for the artist notes!

origin of all the transparent parts in their designated centers
that isn’t necessarily good for transparent parts, sometimes the pivots have to be shifted around a bit so things look right. But since you’re using render order already that shouldn’t matter as much

@herbstđŸŒ” Any other ideas? Perhaps from viewing the uncompressed file I sent?

by user 224300406682025985

Hey @Linkraft - I took a look but still think this is a render order issue.
I set the glass pieces to properly use the transmission extension instead of alpha blending (I think it’s supposed to be glass, right?) and for me it looks like this after compression:
left is BMC, right is BMC+

Still a puzzle on why it is working on the local build and not the production build though
 :confused:

by user 224300406682025985

Does the above look right? That’s already compressed as in a production build

We’ve wrestled with the transmission settings for Unity for the models earlier in the project but it never looked right, hence why we went the route of origins and render sorting

by user 224300406682025985

With transmission I mean these settings here:

Quick build here:
https://jumbled-maze-attention.glitch.me/

Yeah we want the rendering to be a bit different, gonna send you a DM with some follow up so I can show you our dev environment so you can see for yourself.

by user 224300406682025985

To summarize some of the findings:

  • the issue isn’t texture-related, it’s transparency render order related
  • compressing the meshes seems to cause a three.js bug / weirdness where the order of nodes in the hierarchy isn’t guaranteed
  • workaround is to use an explicit render order or pivots that don’t sit exactly on top of each other.

The three.js issue is reported here: GLTFLoader: Order of nodes in hierarchy is non-deterministic in some cases when compression is used · Issue #25820 · mrdoob/three.js · GitHub

Changed the channel name: Node order in the hierarchy can change when using compression and transparent materials