InWorldz

Where your Dreams are our Vision!

It is currently Mon May 28, 2018 1:59 am | All times are UTC - 6 hours
 Page 1 of 2 [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Does physical shape impact sim performance?
PostPosted: Mon Oct 03, 2016 7:09 am 
User avatar

Joined: Sun May 30, 2010 12:06 pm
Posts: 3379
Location: Netherlands
I desided to post this as a new technical question rather than commenting on the Crossing topic since I don't want that to go off topic.

However it's actually a very basic, and maybe somewhat related question.

There was a lot of talk about the physical shape of vehicles, and that started to make me think...

I know that in InWorldz, you can get away with not using the Physics tab in the Mesh uploaded, and it will then choose the high model as the physical shape.
On one hand that's handy, but, I cannot escape the impression that a very complex physical shape, even on non physical items like buildings, do impact sim performance.

I am then mainly thinking about collisions.

I have always used the practise to create a very simple model and use that, since I believe that it's simply unnesesairy in most cases to have an extremely accurate - but complex - physical model.

This is what I mean... Take this set of walls and look at the triangles...

Attachment:
Upload1.png
Upload1.png [ 59.83 KiB | Viewed 2359 times ]


Now if I keep it at this, and upload the model... it will take the LOD1 (high) as the physical shape.
That uses 12650 triangles.

However, the avatar or whatever physical object there is, does not need to collide with every single rim, trim, beam or curve...
And also this would be a nightmare to upload... calculating takes long, in this model about 3 minutes...

So I reduce the physical model to simple plates that cover the walls. A custom physics model if you will. It's the same layout without all trims, windows, etc...

This is the result:

Attachment:
Upload2.png
Upload2.png [ 64.74 KiB | Viewed 2359 times ]


This uses 568 triangles.
That's only 4.5% of what the high model uses!

I learned to do this always due to SL, where it can actually make a huge difference on Li, but I continue to do it here as well. It does not save me a single Li, but it does cut the calculation time... this one takes about 15 seconds to calculate.

Now I wonder this:

With a vehicle, avatar, or anything else physical, reducing the complexity helps a lot.
But... in this case the building the physical object encounters, is also less complex.

My question is, does this help on the Sim's impact or am I simply wasting my time?
(Sim's impact as in performance, not Land Impact calculation, I know that it makes no difference in that field)

I suspect it helps, simple logic says that a less complex physical shape is always better than an extremely complex shape. Even on static, non physical objects.

I just am looking to see if this is actually a technically accurate assumption.



_________________
Image
Mesh prefab builder with a preferences towards Gothic Architecture.
Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Mon Oct 03, 2016 11:17 am 
User avatar

Joined: Fri Jul 29, 2011 2:10 pm
Posts: 3989
Location: France
On vehicles there is a limit in complexity, for this reason, and everybody does what you did for your walls. So your reasoning holds, save that static objects are less expected to collide, or less often.



_________________
Elfs are in virtual worlds to share a vision of a wonderful life :-)
Elven bards and storytellers
"Elf Dream" for Elf living
"Shedrupling University" science
YichTrains Elven Works Lysaer Gortax Robots
Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Mon Oct 03, 2016 2:59 pm 
User avatar

Joined: Mon Jun 07, 2010 7:07 pm
Posts: 7936
Location: Nova Scotia, Canada
It certainly enables the server to reduce the work it needs to perform, if you include a simplified shape. Although there is some talk in dev circles about whether the IW servers are actually using the uploaded physics shape if included. (I don't have a definitive answer on that, but I think it does.) But if it doesn't, then when we do enable that, it would still be better to be in the practice of including a physical shape for the server to use.

But for static content like buildings or furniture, the impact of physics shapes isn't quite as much as something like vehicles where there is a moving physical shape, but it does help to reduce the complexity of the physics model for other objects too.

My suggestion in the other thread was really just to give some conscious thought when making something as to whether each prim specifically needed any physical shape at all, especially in moving physical objects. That suggestion could be further expanded to also suggest thinking about reducing the physical complexity, even if that reduction didn't actually reach zero.

And it might even be a good idea to eliminate much (but not all) of the shape in some static objects too, such as trees. For example, perhaps the trunk of a big tree should maintain its shape, but it might be better if the leaves and branches attached to that trunk were set to shape NONE, especially given that our avatars can fly.


Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Mon Oct 03, 2016 3:05 pm 
User avatar

Joined: Sun May 30, 2010 12:06 pm
Posts: 3379
Location: Netherlands
I thought so, I was specifically aiming towards interaction with physical objects and avatars.

Yichard, unfortunately, this is not common practise, you hear often "don't bother with physics tab" as advise on static objects.

I keep doing it the way I do now, because every little bit helps performance as far as I am concerned.
The above example is still relatively simple... consider my gothic windows... all those arches, multiplies within the window frames... replaced by a simple plate as physics model... that helps... specially on calculation time and errors.

Jim Tarber wrote:
IThat suggestion could be further expanded to also suggest thinking about reducing the physical complexity, even if that reduction didn't actually reach zero.


That is exactly my aim.
You cannot set a wall t have no physics shape, an avatar would walk right though...
That's why I make a simple model.


Tip for creators:
The physics tab in the Mesh uploader, you only need to do the step 1.
The other steps, optimizing etc are not working...
just make a simplified model and choose that, then leave all the other settings alone.



_________________
Image
Mesh prefab builder with a preferences towards Gothic Architecture.
Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Tue Oct 04, 2016 2:05 am 
User avatar

Joined: Fri Jul 29, 2011 2:10 pm
Posts: 3989
Location: France
Jim Tarber wrote:
It certainly enables the server to reduce the work it needs to perform, if you include a simplified shape. Although there is some talk in dev circles about whether the IW servers are actually using the uploaded physics shape if included. (I don't have a definitive answer on that, but I think it does.)


It definitively does, even for static objects, or my tracks would not work at all.
(I just complained in mantis 2105 that it is forced to the same bounding box than LOD1, but this is not specific to the physical shape uploaded from file.)


Jim Tarber wrote:
My suggestion in the other thread was really just to give some conscious thought when making something as to whether each prim specifically needed any physical shape at all, especially in moving physical objects. That suggestion could be further expanded to also suggest thinking about reducing the physical complexity, even if that reduction didn't actually reach zero.


Agree. Anyway we have a maximum, for vehicles, beyond witch they cannot be made physical. The question of the original poster however was if this also applies to static objects.
Suggestion: if a simpler physical shape is added, the import box should show it on Land Impact, or maybe tyhis is the purpose of physical cost.




Jim Tarber wrote:
And it might even be a good idea to eliminate much (but not all) of the shape in some static objects too, such as trees. For example, perhaps the trunk of a big tree should maintain its shape, but it might be better if the leaves and branches attached to that trunk were set to shape NONE, especially given that our avatars can fly.


Most plants or tree builders make them completelly phantom, to ease navigation and exploration (especially that using key strokes is not very accurate). Just in a roleplay, having solid trees may make sense (as obstables, or means to climb, etc). Still, I would give the whole tree by a single physical prim, to avoid the risk of being stuck in a complex shape.



_________________
Elfs are in virtual worlds to share a vision of a wonderful life :-)
Elven bards and storytellers
"Elf Dream" for Elf living
"Shedrupling University" science
YichTrains Elven Works Lysaer Gortax Robots
Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Tue Oct 04, 2016 2:21 am 
User avatar

Joined: Mon Mar 09, 2015 7:14 am
Posts: 938
Yichard wrote:
to avoid the risk of being stuck in a complex shape.


Would there be any advantage to making the entire complex mesh tree physics shape none then putting a single invisible prim around it to act as a barrier?



_________________
Logan's Stuff And Junk http://tp2.me/LOGANSSTUFFANDJUNK
My Youtube Channel - https://www.youtube.com/channel/UC2I0Zb-io_DK1argPuo4RyA
Jesus loves you. Everybody else thinks you suck.
Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Tue Oct 04, 2016 2:41 am 
User avatar

Joined: Mon Jun 07, 2010 7:07 pm
Posts: 7936
Location: Nova Scotia, Canada
LoganStargazer wrote:
Would there be any advantage to making the entire complex mesh tree physics shape none then putting a single invisible prim around it to act as a barrier?
You can't change the root prim to NONE, you'd make the whole object Phantom in that case. But the answer is yes, you could do that, but the trade-off is that you're adding an extra prim, even if it's invisible and phantom, whereas the server can handle a mesh trunk or whatever it is. There's also the option (and long-standing common behavior) of making vegetation completely phantom anyway. But this was brought up in the context of complex vehicle shapes, and then buildings, and neither of those would be completely phantom. However my police car and jeep vehicles use a single invisible prim that is the only physical prim, the mesh is completely set to NONE, and the resulting vehicle operates as a "slab car" in terms of physics, so I did just what you've suggested here for that case.


Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Tue Oct 04, 2016 3:28 am 
User avatar

Joined: Sun May 30, 2010 12:06 pm
Posts: 3379
Location: Netherlands
Or simply make a second model that you want to be the physical shape. For example when you make a beautiful table with tons of curves and detailed finishing, you can simple make a second model: a box. The box does not even have to be the exact size of the table, it will stretch when you select it in the physics tab.

For a tree where you only want the trunk to havr a physical shape, you can create a pillar that yoy upload separate and link that as root, make it inclvisible and set the tree itself to have no physical shape. That box that represents the trunk will likely be aomething lile 0.05 li or so and you have to be very unlucky that it won't get canceled out with the tree's li



_________________
Image
Mesh prefab builder with a preferences towards Gothic Architecture.
Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Tue Oct 04, 2016 3:35 am 
User avatar

Joined: Wed Dec 31, 1969 6:00 pm
Posts: 526
Location: England
Just a side note i have often found in inworldz that adding a physics shape to the mesh actually breaks objects.

The gallery i used ot have on my sim was a prime exapmle. In core open sim and in second life it only worked with the physics shape. (As expected). In Inworldz it uploaded and worked perfectly without one, but adding the same physics model i used in other areas the upper area became unwalkable.

I believe there is still an open mantis for that somewhere. but it was not the only item i found this with. I had a spiral staircase with teh same beheviour and a few others.


Offline
 Profile  
 
 Post subject: Re: Does physical shape impact sim performance?
PostPosted: Tue Oct 04, 2016 6:06 am 
User avatar

Joined: Sun May 30, 2010 12:06 pm
Posts: 3379
Location: Netherlands
I do this with all things I upload and only had a few occasions where the physics model did not work, and it always turned out to be reversed faces.

Those do not matter in SL because you use the analize and simplify parts as well, but they do matter in IW. One reversed face on a cube and you can walk through it.

Also you are not "adding" a physical shape, you are merely using your own.
There is always a physical shape, only if you do not use a specified model, it will use your high LOD model instead.

What strikes me is the "often" part. I recently finished redoing all and every single mesh piece in about 85 buildings and they all work fine.

There is one difference I did notice...

- Your physics model has to be 1 piece...
- If you upload seperated objects in one go, only 1 of the objects will have the physical model.
- If you upload a model that the modern viewer breaks down in several parts, same story.

I continue to upload everything piece by piece, and breaking up myself if I use more than 8 textures.


But knowing you, you likely already ruled out those things.



_________________
Image
Mesh prefab builder with a preferences towards Gothic Architecture.
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 2 [ 16 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Site Navigation