Jump to content

Plains physics count goes skyhigh


Hieronimos Audeburgh
 Share

You are about to reply to a thread that has been inactive for 3698 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hey all!

 

Here is a single mesh object (wall):

Wall_vis.png

 

Here is the physics model for the piece, build up out of two faces:

Wall_phys.png

 

This piece (and some others in the model) get a physics count up in the thousands (using the plains/non-analyzed physics), while other pieces that are pretty much exactly the same (and even more complex pieces) have a physics count under 1.0

 

Especially since sometimes the count seems nice and low, and at others times it goes skyhigh, I can't really find what's going wrong here. 

Anyone any suggestions?

 

 

Link to comment
Share on other sites

A physics model for that simple box shaped wall will not buy you anything

What cost do you get if you omit the physics model and let the uploader compute one with the lowest detail?

What way are the normals on your model and your physics model?
I can imagine inward normals on the physics model will cause big troubles

Do you work in blender?
If yes try to select all in edit mode just to see if you have more polygons than we see in this picture

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

There was a bug (jira here) which causes huge physics weights when there is a miniscule displacement of one vertex of the first-listed triangle out of the precise vertical plane. The smaller the displacement, above a minimum, the larger was the effect. It was imported into the internal jira. So I don't know what happened to it after that. Since it was classified as trivial, quite possibly nothing.

Sounds as if that is what you have run into, In that case, the excessive cost should go away if you realign the vertices so that the walls are exactly vertical. You can do that in your 3D program or by editing the collada file. To check that the collada exporter doesn't reintroduce the displacement, you really need to check the file, but first just upload it and see if it makes the difference.

There are other problems with the triangle-based physics weight calculation that can produce similarly high weights. I have documented some of them in a few threads in this forum. Search for "Physics episode" if you are interested. Be warned though, it is a complicated issue.

Link to comment
Share on other sites

Analyze would produce a hull-based instead of a triangle-based physics shape. Usually that would be quite satisfactory as an alternative, especially with the simple model shown. However, there are circumstances, in more complex models, where it might not. First, if the walls are large, then the hull based shape is likely to have a higher physics weigh which might produce a higher LI. Second, for anything at all complex, unlike the triangle-based shape, the hull-based shape would be better made from solid components with the edges filled in (a simple change, of course). Otherwise closing of spaces during the decomposition (Analyze) is likely. Since the potential solution is even simpler, it's worth trying. I am assuming there is a good reason here for having decided on a triangle-based shape.

Link to comment
Share on other sites

Hey all!

Thanks for your replies : )

The part shown in the previous post is indeed part of a bigger whole: i picked out this specific part for this post as it is an extremely simple shape and as such to illustrate my confusion on the matter. 

I must say I don't have very much experience with triangle-based physics shapes or, for that matter, hull-based. But from the few experiments I have been doing so far it appears that - at least in case of this build - a triangle-based physics would give the lowest physics count. That of course was before I was confronted with this problem. In case of this specific piece (a simple flat wall) I guess I will just keep the physics on convex hull instead of putting it on prim. The more complex pieces I don't really know yet; I guess I will fix a hull-based physics for those. 

Thanks for the info on that matter, Drongle, I'm pretty sure the problem is the bug you mentioned and I will surely be reading more into the triangle-based physics as it really appears to be worth it. That will take some time though and in the meanwhile I'd like to ask one more question:

When I was checking the model and its parts on Aditi, I believe I noticed one part in particular that had the proper physics weight (1 LI), but when I clicked the same part only moments later (without changing anything about it) this part was all of a sudden showing the same problem of an 8000 physics weight... In other words: the model is unstable in its physics count. Have you perhaps heard of this happening before, or am I just mistaken?

 

 

Link to comment
Share on other sites

Jenni: I started this thread looking for input, so thank you : )

 

Drongle: I've been experimenting a bit based on your info. It seems - at least it worked out pretty well for the model I was working on - that adding an extra face between the two separate planes fixes the insane land impact. Of course this isn't much of a solution as it kinda adds a triangle while it shouldn't have to, but I thought I post it anyway.

Example:

Phys_Extra.png

 

In this case I put the extra plane at the top of the door; then it's at least not utterly useless as in that it will keep the camera from going in between the two planes when one moves through the door (although I never really noticed this to happen). Otherwise I guess the best place for an extra plane would be on top: given that bigger planes use less physics weight.

Well, again, not a perfect solution but it seems to work without having to do too much extra editing... Maybe it's of use : )

Link to comment
Share on other sites

Yes. That's another way of fixing it. Did you try realigning the planes too? I'd be interested to know if that worked - to see if it's that old bug. I don't think it will make much difference adding the longer face at the top instead of the shorter one you used. According to the definition in the wiki, the "average width" of the triangles in those two faces would be the same (the gap between the walls), so that they should have the same cost. However, I take the definitions in the wiki with a large pinch of salt as the actual weights are not consistent with the wiki for either triangle-based or hull-based shapes. So who knows? You may be right.

Link to comment
Share on other sites

Hey Drongle : )

I'm working on it, but I don't really know how to yet. I opened the collada file in wordpad... o.O 

So then I made a new collada of just one troublesome piece; that reduced a great amount of numbers in the file, but I still have no idea how these numbers represent the different elements that make up the piece. I'll keep trying though and let you know about the results : )

Link to comment
Share on other sites

You can try just redoing the alignment and leaving the collada. If you want to look at it, use wordpad rather than notepad. It will recognise the line formatting. Even better is something like Notepad+++, which recognises the xml format.

The relevant numbers are in a section something like this...

  <library_geometries>
<geometry id="Cube-mesh" name="Cube">
<mesh>
<source id="Cube-mesh-positions">
<float_array id="Cube-mesh-positions-array" count="24">
0.1 1 -1
0.1 -1 -1
-0.1 -1 -1
-0.1 1 -1
0.1 1 1
0.100004 -1 1
-0.1 -1 1
-0.1 1 1
</float_array>

The numbers are in triplets that give the the x,y,z for each vertex.  This is from the bug report in the jira. Each wall is flat in the YZ plane. So the Xs should be 0.1 or -0.1. It's the "0.100004" that caused the high weight in this test case. Setting it to 0.1, like all the others, so that the vertices are perfectly aligned, removes the excess weight.

Note that this was before the introduction of the automatic switch of triangle-based shapes to convex hull at a width of 0.5m. These walls were only 0.2m apart and I guess they would now be converted to convex hull unless there was more geometry increasing the x span of the shape.

Yes. I tested it. The physics weight now jumps from 0.4 at 0.499m to 7987 at 0.5m !!

Don't waste too much time on this just to satisfy my curiosity. Your solution of adding geometry works well and doesn't cost much.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3698 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...