What determines object order in the scene on runtime?

Questions, Tips and Concerns about Creating on IMVU in general.
Post Reply
DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

What determines object order in the scene on runtime?

Post by DimitriX89 » Fri Jul 05, 2019 2:01 am

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?

User avatar
Zara
Sage Pixel
Posts: 159
Joined: Sat Feb 25, 2017 9:24 am
Location: Baix Empordà, Catalunya.
IMVU Homepage: http://avatars.imvu.com/Keodi
Contact:

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

Post by Zara » Sat Jul 13, 2019 7:39 am

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. :|

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

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

Post by DimitriX89 » Tue Jul 16, 2019 1:19 am

Any specific principles you've used?

User avatar
Zara
Sage Pixel
Posts: 159
Joined: Sat Feb 25, 2017 9:24 am
Location: Baix Empordà, Catalunya.
IMVU Homepage: http://avatars.imvu.com/Keodi
Contact:

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

Post by Zara » Wed Jul 17, 2019 3:36 am

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). ;)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

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

Post by DimitriX89 » Fri Jul 19, 2019 5:18 am

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?

User avatar
Zara
Sage Pixel
Posts: 159
Joined: Sat Feb 25, 2017 9:24 am
Location: Baix Empordà, Catalunya.
IMVU Homepage: http://avatars.imvu.com/Keodi
Contact:

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

Post by Zara » Fri Jul 19, 2019 12:01 pm

Usually yes, but oh well.

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

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

Post by DimitriX89 » Sat Jul 20, 2019 1:02 am

Can you remember any specific products which did that?

User avatar
Zara
Sage Pixel
Posts: 159
Joined: Sat Feb 25, 2017 9:24 am
Location: Baix Empordà, Catalunya.
IMVU Homepage: http://avatars.imvu.com/Keodi
Contact:

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

Post by Zara » Sat Jul 20, 2019 1:43 am

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.

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

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

Post by DimitriX89 » Sat Jul 20, 2019 4:36 pm

Does it happen if you just stand nearby? Or it requires you to sit on it?

User avatar
Zara
Sage Pixel
Posts: 159
Joined: Sat Feb 25, 2017 9:24 am
Location: Baix Empordà, Catalunya.
IMVU Homepage: http://avatars.imvu.com/Keodi
Contact:

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

Post by Zara » Sun Jul 21, 2019 1:41 am

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.

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

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

Post by DimitriX89 » Sun Jul 21, 2019 3:00 am

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.

User avatar
Zara
Sage Pixel
Posts: 159
Joined: Sat Feb 25, 2017 9:24 am
Location: Baix Empordà, Catalunya.
IMVU Homepage: http://avatars.imvu.com/Keodi
Contact:

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

Post by Zara » Sun Jul 21, 2019 3:39 am

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.

User avatar
nerseus
Sage Pixel
Posts: 46
Joined: Fri Mar 10, 2017 1:40 pm
Location: Arizona
IMVU Homepage: http://avatars.imvu.com/nerseus
Contact:

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

Post by nerseus » Sun Jul 21, 2019 11:10 pm

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...
I'm always around to answer meshing questions! PM me or find me on Skype: djatarchon

(I also take mesh requests from time to time)

DimitriX89
Sage Pixel
Posts: 58
Joined: Fri Mar 10, 2017 4:01 am

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

Post by DimitriX89 » Mon Jul 22, 2019 1:21 pm

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

Post Reply