Jump to content

Create Physics for a Mesh Help


Lolita Erin
 Share

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

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

Recommended Posts

Hi :)

 

11 hours ago, Lolita Erin said:

i dont have the dae file, i only have the object in mesh so i need to be able to mesure or make some prims to get and idea of how to make in blender the physics..

 

Edited to say:        Everything below this edit is crap read arton and Reys posts below for sensible advice.

 

1: Inworld build the physics mesh with prims.

2: Use the Firestorm viewer to export as a .dae file the prim physics to your hardrive.       http://wiki.phoenixviewer.com/fs_import_export

3: Import the prim physics  .dae  Collada file into Blender.

4: Rebuild the physics for your boat using your “prims” as a guide. Probably best to use the planes method.

5: Export the new mesh physics model from Blender  as  a Collada .dae file.

6: Import into SL.

    In the mesh uploader use the this new physics model as both High LOD and Physics model. To keep the LI as low as possible set all the Medium, Low and Lowest Lods to  the minimum.

 

See added note below for an alternative mesh to use in the High LOD slot.

7: Change Physics Shape Type to Prim. Align it with your boat and then set invisible.

 

Note: to reduce the Download cost to a minimum you could use a single triangle in the High LOD slot of the Uploader. This triangle must have  a bounding box X Y and Z dimensions the same as the Physics mesh.

Blender.thumb.png.c7cef5cd993caf6de5bd60e112eb7346.png

 

SL.png.8d5f413d7c740f5347fcb6a44f61e47a.png

 

Best to do some test uploads on the Beta grid to find out what works best for your boat .

Edited by Aquila Kytori
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

A triangle based physics mesh won't hold it's shape when set physical. It will switch to a single convex hull. Another problem with such large vehicles is, when set physical, an additional penalty is added to the physics weight. Aquila, can you show some numbers non physical versus physical?

Since there isn't any mesh in-world with NO physics shape, it's possible that the yacht in question has set most of its pieces to physics shape type none to stay below a physics weight of 32 (when it's set non physical). Checking each link to what it's set to actually should give some hints there.

It's indeed possible that the creator hasn't made useable physics though, and it's simply set to None physics because of that. Using regular prims as physics isn't a bad thing, especially when it comes to larger vehicles.

 

Edited by arton Rotaru
  • Like 3
  • Thanks 1
Link to comment
Share on other sites

8 hours ago, Lolita Erin said:

i dont like the idea of use normal prims invisible, so i looking for advise to make a great physic, any tip will be apreciated thanks...

Careful so you don't do Mesh for Mesh' sake here. You'll have to make the physics as a separate object anyway and once you do that, there are no obvious reasons why mesh should be better than prims.

If you worry about physics weight, the simplest possible usable mesh physics shape is still six times as physics heavy as a basic untwisted cube or sphere prim.

If you worry about land impact, unless the yacht was made and uploaded by a skilled mesh creator who knows how to optimize for SL (which I seriously doubt), you can probably add a dozen or more cubes to the linkset with no significant LI increase.

If you worry about lag, make the physics invisible the correct way (use the default transparency texture or - even better - a 4x4 pixel full transparent texture and set transparency to 0% and alpha mode to masking) and you shouldn't have any noticeable or measurable change in the lag level neither with prim nor mesh physics.

 

If you still want to use Aquila's method to make a mesh physics model, remember that the first thing you always do after you have imported a dae file generated by Fs or another viewer into Blender is:

  1. In object mode, Type A to select all
  2. Type Ctrl+A and Apply Location
  3. Type Ctrl+A again and Apply Rotation & Scale

If you forget to do that, expect the unexpected.

Regardless of whether the phsyics is made from prims or mesh, don't make it too fancy. You want the elvation of the walkiable surfaces to be fairly accurate but everything else you can simplify a lot. Looking at Aquila's example, you can reduce the triangle count by half and nobody's ever going to notice.

  • Like 2
Link to comment
Share on other sites

3 hours ago, arton Rotaru said:

A triangle based physics mesh won't hold it's shape when set physical. It will switch to a single convex hull. Another problem with such large vehicles is, when set physical, an additional penalty is added to the physics weight. Aquila, can you show some numbers non physical versus physical?

Since there isn't any mesh in-world with NO physics shape, it's possible that the yacht in question has set most of its pieces to physics shape type none to stay below a physics weight of 32 (when it's set non physical). Checking each link to what it's set to actually should give some hints there.

It's indeed possible that the creator hasn't made useable physics though, and it's simply set to None physics because of that. Using regular prims as physics isn't a bad thing, especially when it comes to larger vehicles.

 

thanks for the advise, any of the mesh object are let me set as prim,....

Link to comment
Share on other sites

3 hours ago, arton Rotaru said:

A triangle based physics mesh won't hold it's shape when set physical. It will switch to a single convex hull. Another problem with such large vehicles is, when set physical, an additional penalty is added to the physics weight. Aquila, can you show some numbers non physical versus physical?

OMG .........:$

It just hadn't entered my mind that it would be using a vehicles script. 

First screenshot, Non Physical but with Physics Shape Type set to prim as in my first post :

5978c1ed0fce4_NotPhysical.png.642e824ac11abb383786726f20339cd6.png

 

Next screenshot, set to Physical, (it fell over onto its side ) :)

5978c24b277d0_SetPhysical.png.04507e6a0f6dea513c84551690012f11.png

 

Next screenshot shows how it is when it has a vehicle script inside.

5978c2bf9a01e_withscript.png.60031446358bccb5c90b12bd0b49c63e.png

With the script the LI didn't change because even though it is still showing non Analyzed Physics shape it is really a Convexhull ?

I have made small vehicles before but I don't think I had learnt about the switch to convex hull, or if I had i had forgotton.

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Thank everybody, the yacht has interior so i need to work on the physic for outside and inside, i dont like the idea ot make prims bucause some times i am not able to make rounds area correctly and end up using many prims, mesh are one side so i belive is less laggiee.

but this is a great tip: 4x4 pixel full transparent texture and set transparency to 0% and alpha mode to masking!!

what i end doing is to take a picture of the boat and make the physics from there....

9a9f20016bf0906d0fba4b6654edf73d.png
https://gyazo.com/9a9f20016bf0906d0fba4b6654edf73d

 

Link to comment
Share on other sites

1 minute ago, Aquila Kytori said:

With the script the LI didn't change because even though it is still showing non Analyzed Physics shape it is really a Convexhull ?

Arton knows this much better than me but if I udnerstood a previous post by him correctly, a moving vehicle will always use an ODE/HAVOK capsule as its physics model.

Link to comment
Share on other sites

Just now, Lolita Erin said:

i dont like the idea ot make prims bucause some times i am not able to make rounds area correctly and end up using many prims,

Yes but as I said, when it comes to physics, you can usually use a lot of prims for the same load cost as a relatively complex mesh shape. The reason is that some of the basic prim shapes use some ultra efficient physics shapes we don't have access to when we upload meshes. This only applies to basic prim shapes though, once you start torturing them, you can end up with very high physics weights unless you are careful and know what you do.

  • Like 1
Link to comment
Share on other sites

3 minutes ago, ChinRey said:

Yes but as I said, when it comes to physics, you can usually use a lot of prims for the same load cost as a relatively complex mesh shape. The reason is that some of the basic prim shapes use some ultra efficient physics shapes we don't have access to when we upload meshes. This only applies to basic prim shapes though, once you start torturing them, you can end up with very high physics weights unless you are careful and know what you do.

Thanks i will try to mix a little to test it and make some curves in blender

 

84cd1a86bccdb442308097981e2b99d5.png
https://gyazo.com/84cd1a86bccdb442308097981e2b99d5

Link to comment
Share on other sites

1 hour ago, Aquila Kytori said:

Next screenshot shows how it is when it has a vehicle script inside.

5978c2bf9a01e_withscript.png.60031446358bccb5c90b12bd0b49c63e.png

Looks like it hasn't turned physical yet. As the checkbox isn't ticked.
97 when set physical isn't too bad though. The question is how much it will be with decomposed physics mesh?
As long as the download weight is higher than the physical collision shape, it doesn't matter anyway. Though it's something to keep an eye on when creating large physical things.

 

1 hour ago, ChinRey said:

Arton knows this much better than me but if I udnerstood a previous post by him correctly, a moving vehicle will always use an ODE/HAVOK capsule as its physics model.

Fortunately it's not that bad. An analised physic shape will keep it's shape even when physical.

Link to comment
Share on other sites

1 hour ago, Lolita Erin said:

Thanks i will try to mix a little to test it and make some curves in blender

Also remember, to set an object physical it's physics weight has to be 32 or less. If you exceed that limit you will have to set some pieces to physics shape type none by script (e.g. the interior) until it's 32 or less, right before it enables physical.

Edited by arton Rotaru
Link to comment
Share on other sites

I would set both physical and see what land impact they report then. The prim version should be set to convex hull, it will report 9 land impact then. The download weight of 1.1 is fairly small still. That's all what would be added to the land impact of the boat, assuming the server/physics weight is way below the download weight.

Link to comment
Share on other sites

9 hours ago, Aquila Kytori said:

Edited to say:        Everything below this edit is crap read arton and Reys posts below

NO! It's certainly not crap! It's a good example still, and certainly can be used as a vehicle as well. Either you set it to type none while physical, or if you don't need it to be walkable while physical, it's perfectly fine. It's just that extra land impact penalty which could be a problem then. But that is true for any large mesh physics.

  • Like 2
Link to comment
Share on other sites

3 hours ago, Lolita Erin said:

ok here is what i have, i made small physic with prims and also same as mesh you make the comparition, one is lot of prims the other is lot of physic ,also the server and the download is much in the prims.

Just in case you haven't figured it out yet: the way you calculate the land impact of a linkest is to sum up the three different weights separately, the highest of them will count as the LI.

I don't know the weights of the boat itself but here are two fairly typical examples:

Let's say the boat without your physics has the weights 30, 10 and 5 - that gives a land impact of 30. Add the prim physics and you get total weights 31.1, 11.8 and 14 and 31 land impact. Add the mesh physics instead and the weights become 30.2, 13.5 and 5.5 - land impact 30. In this case the mesh version saves you one LI compared to the prim.

Now, if the boat has the weights 20, 30 and 5:

  • With prim physics, the weights become 21.1, 31.8 and 14 - land impact 32
  • With mesh physics: 20.2, 33.5 and 5.5 - land impact 34

Again, very little difference but this time it's the prim version that is marginally better. This is what balancing linksets - one of the most useful methods to control land impact - is all about. What effective land impact one prim or sculpt or mesh has, depends a lot on what it is linked to.

However, there is more to those weights than just the land impact since this is a vehicle. As Arton mentioned earlier, a vehicle can not have a physics weight higher than 32, regardless of what its land impact is. You better watch out for that especially since - as Arton also said - the vehicle gains a bit of extra physics weight the moment it is set to physical.

 

27 minutes ago, Lolita Erin said:

ooo did not now that as convex hull be able to use physics

In this case it doesn't really matter. Plain cube prims have exactly the same physics shape and physics weight with prim and with convex hull physics so there's nothing to gain and nothing to loose. The LI saving Arton mentioned is because the prims are calculated with the modern land impact formula rather than the old fashioned prim count one if one or more of them is set to convex hull but that switch also happens when you link them to the mesh boat so in the end it amounts to the same.

 

9 hours ago, Aquila Kytori said:

 Everything below this edit is crap

Not at all.We were just filling in a few details.

Edited by ChinRey
  • Like 2
Link to comment
Share on other sites

18 minutes ago, Lolita Erin said:

Thanks ChinRey

Yw :)

Edit:

(Paging @Lolita Erin in cse you've already read my original and overlook this edit...)

Looking closer at your mesh physics, you did upload with analyzed physics, didn't you? And you made it from complete cubes, not just single surfaces? And you changed the physics shape from convex hull to prim after you uploaded? The reason I ask is that a mesh with hull physics identical to the prim model should have a a physics weight of 6.5, not 3.5. Arton warned us not to use triangle phsyics for vehicles and he's the expert so we better listen to him...

Edited by ChinRey
Link to comment
Share on other sites

17 hours ago, ChinRey said:

Yw :)

Edit:

(Paging @Lolita Erin in cse you've already read my original and overlook this edit...)

Looking closer at your mesh physics, you did upload with analyzed physics, didn't you? And you made it from complete cubes, not just single surfaces? And you changed the physics shape from convex hull to prim after you uploaded? The reason I ask is that a mesh with hull physics identical to the prim model should have a a physics weight of 6.5, not 3.5. Arton warned us not to use triangle phsyics for vehicles and he's the expert so we better listen to him...

Hi ChinRey  yes i did upload only one face and change to prim.

Link to comment
Share on other sites

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