Jump to content

Physics frustration


Rhys Goode
 Share

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

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

Recommended Posts

I made myself a nice simple chair, using blender.  Not very fancy, 4 legs, a seat, a chair back.  But I am having a real hard time sitting on my chair. If specify high detail for the physics model, I can upload and sit in it, but the physics upload cost is quite high, since the system generated physics model includes all the rungs on the chair, and chair back.  If I go to low detail for the physics model, the upload cost is reduced (still higher than I would like), but now I have strange trianglular shapes generated by the system, if I sit on the chair, I float in the air.

So, I made a separate mesh for the physics:  A simple cube, with appropriate dimensions, it fits right under the seat of the chair mesh.  If I upload the dae file for my "physics cube" separately, it has just the dimensions that I set for it back in blender, just matching the dimensions and height of my seat.

But upload the chair mesh, and try to  use my "physics cube" for the physics model, I always seem to get the bounding box for the chair as the physics model.  I've even tried making several different sizes of "physics cube", exporting to different dae files.  They work fine on thier own:  I can export any cube I want from blender, and upload it as mesh, preservings its size.  But if I use any of them as the input mesh for the physics when uploading my chair, I seem to get the bounding box for the chair as the physics model in the upload, no matter what size I make my physics cube.

I thought I was doing something that was too simple to fail.  Evidently not.  Any suggestions for what to do next would be greatly appreciated.

Link to comment
Share on other sites

The physics mesh, like any low LOD meshes you supply, is always stretched or squeezed to fit the bounding box of the high LOD mesh. So to get the shape you want, your physics model msut fill that bounding box so that it doesn't get stretched.

For a chair, th simplest thing is two boxes, one for the seat and one for the back.. It will work best if you keep these boxes so that they don't overlap, although they are (disconnected) parts of the same mesh.. Then you should uploade the mesh consisting of these two boxes and click the "Analyze" button, but not the "Simplify" button. It should tell you you have two hulls with sixten vertices. To use that shape inworld, you have to set the physics shape type to "Prim". Then you should get a physics weight of 0,72 (0.36 per simple box).

You might get a lower weight by using just two planes; one for the seat, one for the back and back legs. That will still fill the bounding box, and it should give you two hulls with just eight vertices. It can get tricky though, as the normals may affect whether spaces get filled in wher you don't want them to be.

You can also use a triangle-base shape (using just the two planes) by not clicking "Analyze". That would be just four triangles, which migh be acceptable, although in general small triangles are expensive and triangle based shapes are seldon the best for this size of object.

  • Like 2
Link to comment
Share on other sites

For LOD meshes, you can use triangles reaching the bounding box with an invisible material. Does waste a material though. For physics, it depends which type you are using. There is an effect with one-sided flat planes and solid decomposition (Analyze) where if their normals poit towards each other so the space between doesn't get filled in, they serve to fill the bounding box but do not appear in the physics shapre. This is how the offset hinge works in my example door in the sample meshes on the wiki. More explanation here.

Link to comment
Share on other sites

Oh! That is an interesting trick. Thanks!

 

OT: (I figure this is related to the lack of center data. I do wish we could assign new centers or pivot points, like we were in the beta. I have a few rotatie things that i would love to meshify. These will remain sculpted until I can assign their pivot points.)

Link to comment
Share on other sites

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