Jump to content

Understanding physic ?


Zak Kozlov
 Share

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

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

Recommended Posts

Hello!

 

I need someone who could be able to explain me a lil how to work with physical shapes in SL and mesh

I tried a few times before to make custom shapes for some mesh and it looks great warping around mesh in the importer but then in SL its a block around the shape ... always

 

For example i had make a dock , flat surface with cylinder post around it and post und... actualy, I have it rezzed in world, lemme go take a pic in SL ... * play a waiting-elevator-like-music *

 

Okay! there: http://i48.tinypic.com/2d78zyd.jpg

This was one of my first mesh and I dont have the source anymore to show you, but the physical shape of this was basicly it but made all of simple cubes

 

it was looking all warp around it good in SL Importer but then if i try to walk it , i was floating at the post level

like the physical shape was a big cube scaled around it ... So i had to make normal prims linked and this with no physic at all ... increase the LI of 1 ...

 

so basicly , whats hull convex and all those things and why i cant put root to no physic and why all my custom physical shapes all end up being a big block in world ? how all physic shape work ?

 

I'm starting to make my mainstore in mesh so i'll really need to make a custom shape that actualy work

 

there must be something im missing ( actualy , i know i miss all about physic shape hehe )

 

Help a noob ?

Link to comment
Share on other sites

Physics shape convex hull closes all "holes" in the mesh, i.e. it's usually only suitable for solid meshes without any "inside". The regular phyiscs shape allows you to keep holes and make for example a cave or a bridge. Here's two pictures illustrating the difference:

PEvsLI_005.jpgPEvsLI_007.jpg

If you create your own physics mesh (recommended, btw), then the physics mesh needs to have the exact same dimensions as the mesh it's meant to be for. That means if you want the deck on your pier solid but nothing else, you'll have to create some bogus triangles on the physics mesh to get the size right. In this case I'd actually forget physics and just use a regular prim for the physics part. That increases LI by 0.5 unless you script it, then it increases by 1.

For the pier, another possible simple physics mesh would be a simple inverted pyramid for the deck and simple prisms for the wooden posts. That also solves the sizing issue.

Link to comment
Share on other sites

Quick awnser thank you :D

 

I feel a lil dumb hehe I dont get what you mean really

same size ? it was pretty much same size

 

here i replicated my exact physical shape i had in blender with normal prims over it

took off the linked normal prim i was using for physic so you can see the result it have

 

http://i49.tinypic.com/2wdd4sj.jpg

 

what would be the flaw in this ?

 

Sorry I dont really get it

Link to comment
Share on other sites

Okay. With that physics shape, it should have worked. So let's see where the problem came from.

When you uploaded your mesh, you specified your custom physics shape. And you did not let the importer optimize it. And the rezzed object has physics shape  type "Prim", not "Convex Hull"?

Btw, you can see the actual physics shape of any object by using the Develop Menu -> Render Metadata -> Physics Shapes. It's best to rez it over linden ground, because physics shapes are tinted blue whereas linden ground is tinted green in that mode.

Link to comment
Share on other sites

Thanks for the little trick!

 

let SL optimize it ?

is this " Analyze " buttons in physic type ? I always wondered what that really do, and when i clicked it it dosnt seem to do anything ... So i never used this. that's a needed step ?

 

and Okay . the prim was set to convex hull

I changed it to Prim, I didnt know its what was needed with custom shapes ( as I said , i really know nothing about physical shape and mesh hehe .. i start from faaar here )

 

it work, the physic is acurate now

but it increase the LI from 2 to 9 :matte-motes-shocked:

 

is there anything else to take in consideration ?

The mesh is as low poly as it can be i think

and the physical shape is really basic as you can see

 

what can explain a so big increase in land impact ?

Link to comment
Share on other sites

Since the phys shape is what blows this one up... this is what I can think of to optimize it:

  • Simplify the deck physics to be like an inverted prism (think roof, just upside-down). I'm not sure if you could get away with making it a flat 2-sided surface (i.e. no height)
  • If you really need the posts physics, make it entirely out of triangles, like a pyramid triangle. Again, with the flat side up.
  • Don't make the crossbeams under the deck physical

Then there's the actual shape itself, though that doesn't seem to be a big issue. It's generally a good idea to generate the lower LOD shapes yourself as well.

For this kind of thing it's usually a good idea to upload to the test grid and experiment there. It's just cheaper. :) The uploader does, btw, tell you the LI at the given size. If you scale it afterwards that changes though.

Maybe some of the more senior builders and modelers here could give you better pointers, because I only build for fun and leisure and for my own use.

  • Like 1
Link to comment
Share on other sites

I usualy put 1,2,3 LOD to max

then the 4 LOD completly down ... so its invisible

 

I'm not sure if its a good way of setting up LOD

but I have a very poor laptop on setting completly down and I never reached 4 LOD level hehe so it dont seem to matter to make it " invisible "

 

and i found this way to bring very low LI with custom physic

if bad i drop the 3rd LOD to half

 

Anyway

 

Right now i dont have any model to mess with physical shape much

I did only clothes mostly hehe

 

But i'm gonna make simple mesh and mess in beta grid with triangle and flat physical shape like you said

experience some more ... now that i know how to make them work at all hehe

 

Thanks alot :) you awnsered lots of questions and helped me tons

Link to comment
Share on other sites

I think your increased LI when you switched to Prim physics shape shows that it's the physics weight that is the problem. I don't know if you clicked "Analyze" or not - it makes quite a difference. If you din not "Analyze, you get a triangle-based physics shape. In that case, the physics enging hates small or narrow triangles and they increase the weight a lot. The model you showed has many small triangle, at the ends of the poles, and many narrow ones along the edges og the poles. So I think this would have given a triangle-based weight much higher than 9! Therefore I will assume you clicked "Analyse", but not "Simplify" because that would have made it back into a single hull for the whole thing.

"Analyze" should have made a collection of convex hulls approximating the filled space of your physics mesh. I think I can count 13 box-shpes in the model you show. Ideally that should give 13 convex hulls with 4 vertices each (it tells you how many in the dialog after you click "Analyze"). That should give a physics weight of 13x0.36 = 4.7, which would round up to 5. But you got 9. So I have to assume it didn't manage to recognise the 13 boxes as such. That usually happens because they are overlapping. You can control the decomposition (making the collection of convex hulls) much better if you make sure your shapes are not overlapping.

In this case, however, you can do much better than using the 13 blocks. First, there doesn't seem to be any need to have the horizontal bars in the physics shape. That removes nearly half. Then as Jenni said. you can use simpler shapes, triangular pyramids (4 vertices) or even just triangles (3) for the pillars at least. That will halve the weight again. Do you really need all the pillars anyway? You probably need at least one, to fill the bounding box properly (otherwise the shape will be stretched to fill it), but you could lose some. With all that you shuld be able to get the weight down to 1 prim.

Optimising physics shapes is quite complicated and needs practice, but remember -
- no more detail than required for acceptable behaviour
- use non-overlapping simple shapes if you are going to "Analyse"
- avoid small triangles if not
- avoid curved surface that will give you high weight with or without "Analyze".
- don't forget to set physics shape type "Prim" whether you use "Analyse" or not.

One extra hint - the LOD meshes, especially the automatic ones, are almost never anywhere near optimal for physics shapes.

 

  • Like 1
Link to comment
Share on other sites

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