Jump to content

Physics in wrong place


Dagmar Kohime
 Share

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

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

Recommended Posts

Greetings all,

I am making a small pergola and trying to create a physics mesh that will offer collisiion only at the posts on each corner. I have created simple cubes to go on each corner to that end, but they keep ending up at the edge of what looks like the bounding box of the full object, with the roof.  I have set Location,  rotation and scale as well as set origin to Geometry for each piece, including the physics mesh.  The pergola is one object.  Any insight would surely be appreciated thanks.

8-18 physics issue.JPG

Link to comment
Share on other sites

1 hour ago, Dagmar Kohime said:

I have created simple cubes to go on each corner to that end, but they keep ending up at the edge of what looks like the bounding box of the full object, with the roof. 

Yes. All the different levels of detail, and the physics model, are stretched to have the same bounding box. This was supposedly intended to prevent greifing through creating physical obstacles much bigger than the visible object. It's an annoying headache, because no 3D creation tool works that way.

  • Like 2
Link to comment
Share on other sites

5 hours ago, Dagmar Kohime said:

Any insight would surely be appreciated thanks.

The trick is to use one or more "boundary tris". I don't have time to make a pergola myself right now so I have to try to illustrate it with a nuild I already have, and yes, it's another tree - a stone pine ratehr than a birch this time. ;)

Here it is in Blender without textures:

bilde.png.ba21ec82c3ba3660c7aa8376f53c55e5.png

 

Here's the phyiscs model:

bilde.png.4b45ccc2fde9fe9ceee2e910b6eb0e0f.png

And the two on top of each other:

bilde.png.a8329898741f591a3f0c1846dbe583a4.png

The pergola has four trunks ... umm I mean pillars of course but the principle is the same: add one extra big triangle at the top defining the boundaries along all three axises. You can also use two small tris in diagonally opposite corners of course but in this case and in yours that would only add a tiny bit of extra physics weight with no gain.

Link to comment
Share on other sites

There are 3 rules that you should follow when making a Physics model:

1:  Each visual model should have its own dedicated physics model.

2:  The Bounding Box dimensions (X Y and Z) of the physics model should match the BB dimensions of the visual model.

3:  Keep it simple.

 

You are complying with rules 1 and 3 but as animats and Rey have already pointed out you are not complying with rule 2.

 

12 hours ago, Dagmar Kohime said:

I am making a small pergola and trying to create a physics mesh that will offer collision only at the posts on each corner.

 

To make a collision mesh  "that will offer collision only at the posts on each corneryou will need to create a variant of Reys "add one extra big triangle at the top".

The trick is to make the extra big triangle so that it has no surface area,  (a collapsed/degenerate triangle).

 

First image indicates where in Blender you can enable the option to show the Bounding Box of an object.

1123278633_PergolaBoundingBox-min.thumb.png.6f201a01060891d4f8ae79848b116189.png

 

The next shows  Rey's extra big triangle added to extend the BB to match that of the visual model:

1185903718_Addtri-min.thumb.png.5999dabc5c4028236af7227666ff90a9.png

 

To collapse the triangle select the vertex indicated in the .gif below  and snap it to one of the other vertices of the triangle. Note that when you select this "triangle" after snapping, there are still 3 vertices and 3 edges ". (don't be tempted to use the merge tool because that will convert the three existing edges of the collapsed triangle into a single edge ! ) :

snap.thumb.gif.24ec22e7a0a517fcb637a807cf2de9d2.gif

 

That's the Physics done. :)

 

 

After loading up this physics model in Step 1 of the Physics menu of the SL mesh uploader, the uploader will throw an error and indicate with a red line/edge (with a little red vertex at each end) where the error is in the Physics model. (Note: in the Firestorm viewer the error is shown in red but in the SL viewer the error will show as thicker black lines and vertices).

529853376_Errorsmalltriangles-min.thumb.png.4e47ecc2365b24977d9ac5b28ae2605d.png

 

The error will disappear after hitting the Analyse button in Step 2.

Now the collapsed triangle will be ignored for collision purposes but will still be used to increase the BB dimensions. The collision model consists of only the 4 post hulls :

914605362_Analyzed4Hulls-min.thumb.png.7cf29a3d352469943ec6ad242ec35456.png

 

the last image shows the pergola rezzed inworld with the  Physics Shape Type change to Prim, ( and show Physics enabled) :

rezzed-min.thumb.png.a94048f20894f93f5ae1e137b63ea7ef.png

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

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