Jump to content

Understanding Physics with Builds


HadleyAddison
 Share

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

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

Recommended Posts

So, I made a mesh build which looks great and I understand that the physics part is supposed to be a less version that basically tells the system where the boundries are, which is great! I just cannot get it to work, I set my build to prim but it wouldn't let me inside the building or anything. Is there something I'm missing?

Is there a tutorial on this subject?

Thanks So much, Hadley

Link to comment
Share on other sites

Did you actually make a mesh to use for physics?

Also, if you click 'Analyse', after selecting it in the physics mesh field, in the physics tab of the upload dialog, you may actually end up with a physics mesh which uncloses the building still. I don't quite know the technicalities of this, or how to explain it, but hopefully it is somewhat understandable.

- Luc -

  • Like 2
Link to comment
Share on other sites

I did make a seperrate physics shape, actually i just took the walls from the build itself as they were low prim and just took out all the extras and used that as the physics...but i'll have to look at that solid analizing procedure, i used that last time but i just couldnt walk in the building at all.....i dont think i used it as solid tho...

 

i'll have a try and let you guys know <3 ty for your help

Link to comment
Share on other sites

Probably best to read to read the link Dilbert gave. I'm sure it explains what you need very well. You could also try to upload the physics mesh without pressing Analyse. In this case it will not be converted to a series of convex hulls like it does when you do press analyse. Be aware that the effect on LI will vary with the different methods.

Good Luck!

- Luc -

  • Like 1
Link to comment
Share on other sites

For the physics, I always create a very basic mesh shape - best way I have found is to take very simple cube prims in my mesh program and stretch them to shape to best emulate the physical surfaces (and matching the bounding box volume). This is exported as a .dae file as normal.

In the uploader window, for the physics section, I just specify this custom physics mesh file - I don't touch any of the other options (analyse etc) - I just point the uploader to the physics mesh file, and leave it at that. Works fine each time for me, doorways etc work as designed. I would assume (correctly, I hope) that if the pre-made physics mesh is heavily optimised already, there shouldn't be any need for the other options in the physics section of the uploader. (Anyone correct me here if I am wrong).
At any rate, my physics cost is almost always the lowest cost factor in the uploader weights - and for my mesh builds, it doesn't affect my final land impact cost - one of the other land impact cost factors are always higher.

Also, for flat plane surfaces, you can use one-sided planes for physics as well quite nicely - just ensure the normals are pointing in the correct direction (example, for a simple floor plane mesh, the physics plane mesh would have the normals pointing upward - they should be pointing in the same direction as the original surface you are emulating physics for).

:matte-motes-smile:

  • Like 3
Link to comment
Share on other sites

The biggest difference is whether you click "Analyse" or not. I you don't, the resulting physics shape is the triangles that the supplied physics mesh is made of. For larger buildings with simple meshes, this often works well. Single planes are generally good enough, but can "leak" occasionally. The physics engine simply treats each triangle as a collidable surface.

The problem with triangle-based shapes is that small triangles make much more work for the engine than large ones. This is relected in the the physics weight calculation, and the weight gets large very rapidly for small triangles. This means that triangle-based shapes are rarely a good choice for small meshes.

Smallness in this context means any small dimension, so that long thin triangles are bad as well. To get the lowest weights, you need to avoid the long thin triangles at the edges of a solid wall. So if you want to keep both inner and outer wall surfaces, to prevent avatars penetrating it, you should still delete the wall edges from the physics mesh model. This is not a good idea if you are going to use a decomposed shape, which you do by by clicking "Analyze".

When you press "Analyse", the mesh you have specified is "decomposed" into a collection of convex hulls. Internally, these are not really meshes any more. Each hull is simply a list of 3D points, the vertices of the hull. There are no faces, normals etc. It is easier for the physics engine to work out collisions with these convex hulls. Size doesn't matter, and so, unlike with the triangle-based shapes, the physics weight doesn't change with the mesh size.The physics cost is not shown in the uploader, but you can easily calculate it because (presently) it is 0.04*(number of hulls + number of vertices). Those numbers are shown in the uploader after you press "Analyze".

Because it is a collection of hulls, not like the default hull for the whole mesh (used if you choose Convex Hull shape type in the edit dialog), you can still get inside if the decomposition is appropriate, leaving the spaces empty. All the other controls in the physics tab provide ways of controlling the decomposition, but their effects are not exactly intuitive and sometimes frustratiing. As Maeve said, you will always do better by making the physics mesh right in the first place. If you make it out of simple non-overlapping convex shapes, you will get the best results without using the other controls. This is different from the best meshes for triangle-based shapes. For example, the wall edges are irrelevant as the hulls are just vertices, not triangles. Avoiding overlaps avoids unwanted filling in of spaces, but doesn't matter at all for triangle-based shapes.

The most important optimisation is the same whether you are using a triangle-based shape or a decomposed shape - avoid curves except where absolutely necessary, in which case make them as low-poly as you can. Curves produc either lots of small triangles or lots of vertices on the hulls, which are the killers for physics weight of either type.

If you absolutely must have a smooth spherical or cylindrical shape, consider using a linked prim for that part of the physics shape. It will only work if you keep the whole sphere or cylinder and keep the three or two radiuses identical (no unequal stretching). Then it will use a physics engine primitive sphere or cylinder which has a physics cost of only 0.1. Apply the slightest distortion, and it will become a hugely expensive. One day we mal be able to use physics engine primitives in uploaded physics shapes which will enable huge improvement of efficiency and physics weights for some shapes.

  • Like 4
Link to comment
Share on other sites

I posted 2 video tutorials on youtube today on Mesh, Physics and LI in SL. And getting that LI down.

I'm not sure I can post youtube links here for spamming, but my videochannel name is: elout01 or ask me inworld.

 

For a simple house and collision detection;, the lowest Landimpact I can get is using simple (1 sided) planes for the physics model and collision.

 

  • Like 1
Link to comment
Share on other sites

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