Page 1 of 1

What determines object order in the scene on runtime?

Posted: Fri Jul 05, 2019 2:01 am
by DimitriX89
Internal scene hierarchy is important, because it affects opacity drawing order. https://help.imvu.com/s/question/0D51L0 ... rder-guide. But I can only guess how this order is determined past the individual product level. This worries me; what if we can manipulate it somehow, to get rid of opacity conflicts. If we take all products worn by avatar, for example? By product ID, or the order they are loaded? Does anyone here have any insights?

Re: What determines object order in the scene on runtime?

Posted: Sat Jul 13, 2019 7:39 am
by Zara
DimitriX89 wrote:
Fri Jul 05, 2019 2:01 am
what if we can manipulate it somehow, to get rid of opacity conflicts.
I've managed to create opacitied furniture items that cause no conflict with avatars, loading order seems to make no difference. I guess it might work with clothes too but I don't mesh them so can't experiment. :|

Re: What determines object order in the scene on runtime?

Posted: Tue Jul 16, 2019 1:19 am
by DimitriX89
Any specific principles you've used?

Re: What determines object order in the scene on runtime?

Posted: Wed Jul 17, 2019 3:36 am
by Zara
Nothing specific, just blind luck lol :D

Examples: https://www.imvu.com/shop/product.php?p ... d=29327946
https://www.imvu.com/shop/product.php?p ... d=28090072

They were back in 2015 and nobody bothered deriving or asking about them so I didn't bother pursuing it. You can take a look at them and if it helps you create some cool derivables then just give me a mention! (Clue: Scaling them up big breaks the effect). ;)

Re: What determines object order in the scene on runtime?

Posted: Fri Jul 19, 2019 5:18 am
by DimitriX89
That's interesting. Your product works as advertised, but so is any other furniture from the shop (like lamps). I couldnt get them to clip avatar opacities at all. More, 2 avatars with blended opacity do not clip eachother as well. Looks like in case of furniture and avatars (that should be items on the same level in hierarchy), IMVU properly sorts drawing order based on relative distance to camera. Have you ever seen the furniture (not room, thats a given) that clips the avatar?

Re: What determines object order in the scene on runtime?

Posted: Fri Jul 19, 2019 12:01 pm
by Zara
Usually yes, but oh well.

Re: What determines object order in the scene on runtime?

Posted: Sat Jul 20, 2019 1:02 am
by DimitriX89
Can you remember any specific products which did that?

Re: What determines object order in the scene on runtime?

Posted: Sat Jul 20, 2019 1:43 am
by Zara
This one glitches with my dress for example.

Image

Generally, any furniture with blending will remove clothing at certain angles, except my examples posted earlier.

Re: What determines object order in the scene on runtime?

Posted: Sat Jul 20, 2019 4:36 pm
by DimitriX89
Does it happen if you just stand nearby? Or it requires you to sit on it?

Re: What determines object order in the scene on runtime?

Posted: Sun Jul 21, 2019 1:41 am
by Zara
It just depends how you angle it. It doesn't matter if you sit on it or not.

Upload a flat panel or something similar with blending enabled and you'll see for yourself.

Re: What determines object order in the scene on runtime?

Posted: Sun Jul 21, 2019 3:00 am
by DimitriX89
I see. My theory is when object origins are too close together, the code which compares the distance of objects to camera "freaks out". In case of sitting on the object (avatar and furniture origin positions match) there will be literally no way to determine which one is closer. Same in cases when the transparent mesh is so big that it encases most of avatar. The comparsion of a distance between camera and their origins wont be applicable in such situation; even if it will technically work, at some angles it will break.

Re: What determines object order in the scene on runtime?

Posted: Sun Jul 21, 2019 3:39 am
by Zara
I'll have to log on at some time and test it but I don't think distance makes any difference in this case. In my experience. if a blended surface makes something disappear at a certain angle it will do it whether the avatar is standing next to it or 20 metres away as long as the angle is maintained.

Re: What determines object order in the scene on runtime?

Posted: Sun Jul 21, 2019 11:10 pm
by nerseus
I believe there was a long thread in the old 3D forums that attempted to solve this mystery as well. I believe Keef chimed in. If I recall, it was mostly dependent on a mesh ID and the order in which you added meshes. But I don't recall exactly...

Re: What determines object order in the scene on runtime?

Posted: Mon Jul 22, 2019 1:21 pm
by DimitriX89
Well, we've pretty much solved interactions inside a single product for Classic client: https://help.imvu.com/s/question/0D51L0 ... rder-guide How multiple products interact - thats still a mystery.

The release of new client may or may not render those findings obsolete though. If they decide to go IMVU Next route, for example. Sorting based on real distance to camera, no arbitrary factors like material IDs. But still heavy error prone, if Mobile is any indication