Jump to content

Prim physics secretly changing to convex hull


Christhiana
 Share

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

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

Recommended Posts

I am working on some round corners for a modular walkway set I'm building and I've been having problems with the physics shape. When setting the physics shape to convex hull it closes the inner corner on the outside, which is expected behaviour. When setting the physics type to prim  it shows the correct physics model for prim physics in the viewer but it still actually uses convex hull physics.

 

Then I came across this post by ChinRey:

https://community.secondlife.com/t5/Building-and-Texturing-Forum/Physics-shape-problem/td-p/2918076

...where Drongle mentions the secret conversion from prim to convex hull physics by the viewer if one direction of the object is less then 0.5m

This explains the problem I was having with my physics model since the Z axis is only 0.15m. Trying to find a solution for this problem I've found that about 9 out of 10 times analyzing the physics model before uploading resulted in a correct physics shape where the inner corner is not closed when setting the physics shape to prim (it still closes when setting it to convex hull, as it should). I can not find any information as to whether this is to be expected behaviour or not. I'm also puzzled as to why this works about nine out of ten times (I tested it about 30 times).

Forgive me if this is something commonly known, but I couldn't find it in any forum thread...

This is the physics model in Blender:

physics.jpg

This is the physics shape and LOD0 model in SL:

physics2.jpg

 In the image above, the physic type is set to prim and the z axis is still 0.15m. As you can see I can walk into the inner corner.

 

 

Link to comment
Share on other sites

I think it's expected. The hidden switch to convex hull only happens with triangle-based shapes = those you get when you don't "Analyze". Triangle-based shapes with small/narrow triangles are very tiresome for the physics engine. For the hulls of an "Analyzed" shape, they don't matter.

Presumabky that mesh is being "Analyzed" into 8 hulls, each with 8 vertuces. That will give you a prim-type physics weight of 2.86, and hence the LI of 3. If you can bear a little less accuracy in the collision behaviour, you could make it four segments instead of eight. Then you would get half the physics weight, 1.43, which should ropund down to 1 if it's determining the LI. Whether that's worth it depends on what the download weight is. If it's already 3 or more, then there is little point from the LI point of view, although it would help the physics engine.

The "Analyze" function is not always very clever, which may be why you are sometimes getting bad shapes. You can usually get aroud that by giving it a mesh that is already the actual set of convex hulls you want. In that case, they should be non-overlapping.

Link to comment
Share on other sites

Thank you Drongle!

 

I didn't realise the "secret switch to convex hull" only happens with triangle based physics. Makes sense now...

 

The object already had a Li of 3 because of HQ LODs and the way I unwrapped to make textures repeat where possible. Adding an extra triangle to compensate for hull retraction still keeps it at 3LI, so I'm very happy with the result so far!

 

The tip to make the physics shape out of the hulls I want to end up with was very usefull as well.

Link to comment
Share on other sites


Christhiana wrote:

I can not find any information as to whether this is to be expected behaviour or not.

That is an interesting question. I filed a JIRA about it a while ago and it wasn't closed as "expected behavior" or for any other reason but nor does it seem to be something they are able to do anything about.


Christhiana wrote:

Trying to find a solution for this problem I've found that about 9 out of 10 times analyzing the physics model before uploading resulted in a correct physics shape where the inner corner is not closed when setting the physics shape to prim

One problem you will encounter if you use analyzed physics for a walkable surface is hovering height. If you walk across a mesh with analyzed physics set to prim, you'll hover slightly above it. Look at these pictures:

https://community.secondlife.com/t5/Mesh/The-mesh-walking-elevation-bug/m-p/2915099#M31000

One detail I forgot to mention in that post is that analyzed physics set to prim doesn't "track" as well as the other surfaces. When your avatar's feet changes position, hovering height will usually adjust slightly to compensate (or at least try to compensate) but that doesn't happen on analyzed prim physics.

 


Drongle McMahon wrote:

The "Analyze" function is not always very clever,

Hmmm, I always assumed Drongle was American but only an Englishman can possibly make an understatement like that. :matte-motes-tongue:

Seriously, rule no. 1 for good SL mesh making still applies: Do not let the uploader do anything except transfer your dae files from your computer to SL!

That means:

  1. Do not let it automatically generate any model, visual or physical, that you'll actually use (zeroed out LOD models are OK though)
  2. Do not let it generate a physics model under any circumstance (not even "zeroed" ones. Use a flat square as physics model instead for tiems that don't need physics)
  3. Do not let it mess with your normals
  4. Do no let it split you physics model into hulls (that's the one that applies here - as Drongle said, if you want hulls, make a physics model from clearly defined hulls right from the start)
  5. Do not let it split your model into separate meshes (that's a new one, currently only applicable to one of the beta versions of the viewer but it'll be a probl feauture of the official viewer release soon)
Link to comment
Share on other sites

Today I started with the physics models for my walkways and was amazed to find your thread! The timing couldn't have been any better. It saved me a lot of trouble! Thank you for that :D

 

I did run into the elevation bug and had already found the thread about that. Adding an extra triangle did the trick for me. It took some trial and error but luckily I can use the same measurements for all the walkway objects since they are all equal in height.

 

The most important thing I've learned here on the forum regarding mesh building, is that when you want things to work correctly, put in the work! Make LOD's, Physics shapes, bake your own normal maps from high poly models, etc... I also used to focus just on Li, but now I'm all about the right balance between good LODs, physics, efficient use of textures and ofcourse Li.

Link to comment
Share on other sites


Christhiana wrote:

Today I started with the physics models for my walkways and was amazed to find your thread! The timing couldn't have been any better. It saved me a lot of trouble! Thank you for that
:D

=^_^=

 


Christhiana wrote:

The most important thing I've learned here on the forum regarding mesh building, is that when you want things to work correctly, put in the work!

Yes, that's much better than the usual "I've just bought me a violin, how do I play Paganini?" approach. :matte-motes-tongue:

 


Christhiana wrote:

I also used to focus just on Li, but now I'm all about the right balance between good LODs, physics, efficient use of textures and ofcourse Li.

I've been through the same.

Making low LI mesh that looks gorgeous at point blank distance is easy (at least from a technical point of view, not necessarily from an artistic), just skimp on the LOD models and physics and cover the thing head to toe with a ton of high resolution textures.

Making SL items that are low LI, low lag, look good at any distance and have proper physics, that is difficult and requires some serious thought, work and experience. Nekka once called it "environmently friendly building" and I think that's a very good metaphor. It's all about making the most of the limited resources we have available in SL.

Combine good quality mesh with good quality sculpts and prims and LI should never really be a problem anymore. At Coniston I now have seven layers of builds, the ground and six full sim sky platforms with two more coming up. Oh and also a few smaller sky platforms and sky boxes I've rented out. Much of it isn't finished yet and I have lots of details to add but I still have 5000 prims available so that shouldn't be a problem. For all practical purposes I have nine sims for the price of one and the way people keep complaining about inflated land tier prices, that approach should be worth quite a lot to many SL'ers.

Link to comment
Share on other sites


ChinRey wrote:


Christhiana wrote:

Today I started with the physics models for my walkways and was amazed to find your thread! The timing couldn't have been any better. It saved me a lot of trouble! Thank you for that
:D

=
^_^
=

 

Christhiana wrote:

The most important thing I've learned here on the forum regarding mesh building, is that when you want things to work correctly, put in the work!

Yes, that's much better than the usual "I've just bought me a violin, how do I play Paganini?" approach. :matte-motes-tongue:

 

Christhiana wrote:

I also used to focus just on Li, but now I'm all about the right balance between good LODs, physics, efficient use of textures and ofcourse Li.

I've been through the same.

Making low LI mesh that looks gorgeous at point blank distance is easy (at least from a technical point of view, not necessarily from an artistic), just skimp on the LOD models and physics and cover the thing head to toe with a ton of high resolution textures.

Haha, indeed...it all seemed so easy when I started out
:P
It's been "back to the drawing board" a lot of times for me, but I'm glad I pulled through and learned to build the right way!

Making SL items that are low LI, low lag, look good at any distance and have proper physics,
that
is difficult and requires some serious thought, work and experience. Nekka once called it "environmently friendly building" and I think that's a very good metaphor. It's all about making the most of the limited resources we have available in SL.

I like that term, sums it up quite nicely I might even use it in my marketing strategy!
:D

Combine good quality mesh with good quality sculpts and prims and LI should never really be a problem anymore. At Coniston I now have seven layers of builds, the ground and six full sim sky platforms with two more coming up. Oh and also a few smaller sky platforms and sky boxes I've rented out. Much of it isn't finished yet and I have lots of details to add but I still have 5000 prims available so that shouldn't be a problem. For all practical purposes I have nine sims for the price of one and the way people keep complaining about inflated land tier prices, that approach should be worth quite a lot to many SL'ers.

I only have a 1680m2
parcel which can hold less prims then most peoples hair, but am already impressed with what you can build on that if you're building smart. I think the smarter builders are starting to build, the more populair homesteads will become.

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3314 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...