Jump to content

Help with Mesh physics on linked and soft-linked mesh


Tiola Violet
 Share

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

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

Recommended Posts

Hi everybody i am trying to get my head around how physics.

I am having trouble getting the physics right. When i stand on the table I am making i was floating 30 cm above it.

Here is what I have worked out so far : 

- The physics must cover the whole mesh. If it is smaller then the mesh then it will automatically stretch to fit.

- If it is rotated when you try to upload check the axis : my physical shape show as -90,90,0 rotation. I did an "Apply Rotation" and it is now 0,0,0

So i fixed the shape so it was no longer just a cube and coverd all the object, then fixed the axis, and now when I upload it .. Well see the pick its distorted.

SL-upload-view.jpg

screen_1.jpg

 

Also I need to know how physics work on soft-links. What happens when if we unlink the object uploaded with one physics?

I noticed that the main link prim changes what you see when you upload the physics, for example if i add the towel to the file and upload with the towl as the main prim i get this : 

 

SL-upload-view2.jpg

What am I doing worng, any ideas?

Maybe softlinks don't work with physics? And you have to import piece by piece?

Any advice is welcome

Thanks

Tiola

Link to comment
Share on other sites


Maybe softlinks don't work with physics? And you have to import piece by piece?


Not the expert here, but the short answer as I understand it is "yep, you got it" LOL.  Drongle I think long ago said that there might be a way to make custom physics for each piece of a linkset and have them actually go with the order of the set and that it might have something to do with stacking. It was all beyond me then, sort of a 'this may work" and still beyond me now really :D

If there is a reason why you need the pieces to be separate (you want the headrest to move depending on the animation I am guessing maybe) then you need to upload them separately -- or a least that is the easiest. 

If your items is going to be static, then assigning materials (up to 8 for the joined mesh) and join them before uploading.

In the case of your massage table, it seems like you could make the main table all one mesh (joined) and then the headrest one mesh and the towel (which may show up only for some animations) for another. Anyway, that's the idea.

Actually, I have found that uploading separately often gets you a much lower land impact. It costs a bit more sometimes but that is the only downside that I can think of.

I can't really tell from your smallish photo but it looks like you have two boxes for your physics and that they touch each other with the small cube going into the larger. You don't want them to touch.

EDIT: So the reason your physics model is doing such oddities is because it can only attach itself to ONE of the pieces of the linkset. If you JOINED your build in one mesh before uploading, it would conform to the shape of the joined mesh, but it is likely that it would still stretch to fill in the empty area -- that's what it does. It seems like the best plan for what you have it to upload "at least" the headrest separately. I am not really sure if you can get it to work as you have it. Others will have more info I am sure.

 

Hope that helps some.

 

Ah and there is Drongle's answer :D

Link to comment
Share on other sites

1) Did you apply rotation and scale to the bed as well as the physics?

2) If you upload multiple objects in the high LOD, you need to have a physics shape object for each of them. They have to be in the same order in both files, otherwise they get associated with the wrong high LOD objects, as in your picture. You can get the right order by giving them appropriate names and then checking the sort objects by name option in the exporter.

Link to comment
Share on other sites

The reason you were getting a 30 cm offset with a cube is because of how bounding boxes work. The raised head rest at the end of the table places the bounding box upper surface higher than the rest of the bed. So, when you tried to use a cube for the physics model, it was being resized to account for that.

 

For your purposes, you probably just require a plane at the height of the bed surface, making your physics model simply 2 triangles. This should be flat plane, at tangent to (parallelingthe bed surface, which is perpendicular to the Z axis.. When you have it at angle as you've done, it then obtains a bounding box and will scale wierdly (besides having a slanted surface to stand/sit/lay on!). Your poses/animations would then account for the inclined head rest.

 

For your soft linkage issue, simply make the bed the root and the towel a child. That way the plane you have for physics will scale with the bed in its entirety. And it gives you the option of having two towel models, one on the table and the other "draped" over the rubbee, and bringing one or the other into view as needed.

Link to comment
Share on other sites

  • 2 weeks later...

The best solution for me was to merge the table and the feet and then upload the towel separately. This actually saves prims instead of making more heavy once it is linked together.

I also used LepreKhaun idea and just used planes that worked like a dream. So the idea is if you put your physics in a box (bounding box), that box has to cover the totality of your object. Other then that you can do whatever you like. Si I just put one plane on table and one behind the head that covered the wide and the height.

And the result is two prims yay, prim magic : https://marketplace.secondlife.com/p/MESH-Massage-table-FULL-PERM-SEMI-EXCLUSIVE-Low-prim-High-detailed/5095373

Thank you all for your help.

Link to comment
Share on other sites

I generally prefer to upload single objects separately. That's for the same reason I never upload textures with the mesh - if you combine things, you end up paying and waiting to upload the whole thing every time you modify just one part. However, I have done some multiple object uploads, especially to study the problem there was before Gaia % Co, got the "sort objects by name" option in the Blender exporter. Before that I had to edit the collada files by hane to get things in the right order. Now it's very simple. To export multiple object you just select all the objects that belong together at each LOD/physics when in Blender's object mode. Then use "Export selected" and "Sort objects by name"/ Then the appear in the collada file in alphabetical order. To get the right high LOD objects associated with the right low LOD and physics objects, you just have to name them in the corresponsing order. That's easy if you use the same names but with a suffix that says which LOD the belong to; such as "window_hi, door_high. chmney_high....." for the high LOD and "window_med, door_med, chimney_med, ...." for the next LOD, and so on.

When you import multiple objects, the importer remembers the relative transformations, rotation and position, of the high LOD objects. It prefers to make them a single linkset. If it can't, it makes them into a coalesced object (with the pile of cubes icon). It doesn't take any notice of the transformations of the other LOD/physics meshes. Instead, they all have the remembered high-LOD transformations applied. That's why they get swapped around if they are not in the right order. Just as with a single object, each lower LOD/physics mesh will be squeezed of stretched to fit the bounding box of the corresponding object in the high LOD file. That also produces strange effects if they are in the wrong order, because they get the wrong bounding box.

 

Link to comment
Share on other sites

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