Jump to content

Hollows or Holes in meshes


JustaTest
 Share

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

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

Recommended Posts

Hello, does anyone know if any Lindens provided any information about if there are going to be any fixes in the works for hollowed or meshes with holes? At the moment it just seems that the bounding box for the object doesn't compensate for the holes and just makes the whole object physical. For example: doors, windows, tubs.. things of that sort. 

Link to comment
Share on other sites

You can make meshes with physically accessible internal spaces if you provide the right decomposed physics shape. Without that, they contain only the default physics shape which is the convex hull of the visible mesh (that is the collection of all vertices that can rest on a plane without any others penetrating it.) You can also specify a phsyics shape by linking with a set of (optionally invisible) undistorted standard prims that provide the shape when the physics shape type of the mesh is set to "none". Details are on the wiki.

Link to comment
Share on other sites

You can male a mesh with as many holes as you like. If you are using the linked prims for physics, don't use any with holes or skew or cuts or anything. That will make them cost much more than the same thing made from multiple undistorted prims. This is because the physics engine loves perfect rectangles, cylinders and spheres. You can stretch boxes, stretch cylinders as long as the section remains pefectly circular, and stretch spheres as long as it;s exactly equal in all directions. Don't use toruses at all!

Link to comment
Share on other sites

As long as you don't use too many, this can be efficient because they only contribute 0.1 prims to the physics cost. The main disadvantage of this method is that they can get unlinked by mistake.

It is much better to upload a well designed physics shape and decompose it (Analayse) with the mesh. It takes some practice to make physics meshes that give you the simplest decomposition. One way of doing it is to use non-overlapping simple shapes, just as with the prims, but with much more flexibilty in distortions. It will even decompose some things with holes quite well. The main thing is to avoid lots of vertices. Oh, and don't ignore the normals just because a convex hull doesn't have them - the decomposer will make a terrible mess with inverted normals next to each other.

Link to comment
Share on other sites

 

Don't know any tutorials.

The sim wever doesn't know anything about the visual appearance of the objects it manages. Instead it has a physics shape representing the object for working out collisions and other physics things. Because this involves huge amounts of calculations, these shapes are generally much simpler than that is the visual object.

The advanced upload dialog has a physics shape tab that allows you to provide a mesh made espscially for defining the physics shape of your mesh. You can specify a file or choose one of the LOD files you used for the visual shape. It is usually best to make a special file.  When you have loaded the mesh, you press the "Analyze" button to invoke the decomposer. This does it's best to make a set of convex hulls that fit together to make the physics shape. This is presented to you as a set of coloured shapes. You can expand the view to see how they fit together. Internally, each hull is just a set of vertices with no face or texture related information.

The display at the bottom shows you how many hulls and how many total vertices have ben generated. Your aim should be the minimum number of hulls with as few vertices, as will give the physical behaviour you want, such as holes that you can walk through. There are parameters you can play with for simplifying the decomposition - that is reducing the hull and vertex counts, but these usually remove features you want before they remove unwanted detail This is why it is better to make a special mesh that already has only the minimum vertices needed for the essential physical behaviour.

The details of the calculations of physics cost are on the wiki page I mentioned before. The uploader will always make a single convex hull that wraps the entire mesh. It cannot have any concavities or holes. That is used as the default when you rez an object. To use the physics shape, you set the physics shape type to "Prim" on the Object tab of the Edit dialog. This option will not be there if you have not made a physics shape.

Note: most of this requires use of the latest development builds of the mesh viewer. All of it is subject to change as long as mesh is in beta.

By way of example, here are visual and physics meshes for my blowout preventer, shown in Blender. When the physics costing was introduced and before vthis had a physics shape, it cost many thousands of prims. The cost of the physics shape here is 4.8 prims. It is just 13 simple hulls and allows you to sit on and walk underneathe the main box, which is all I need. I should probably make it even more simple.

egphmesh.jpg

  • Like 1
Link to comment
Share on other sites

Got it, that's why I hit into someone's build even though it's a good distance away. So this is really the same process as making the physics shape in-game out of the SL prims right? Only difference is you can cut down the amount of vertices (than the standard prims) to a more simple shape that will still encase the mesh. I guess my last question is, does the physics shape save out as a collada file also. 

P.S: Thanks for taking the time to explain everything.

Link to comment
Share on other sites

Major differences: (1) The shape is permanently associated with the mesh and cannot be (accidentally) unlinked. This can be very important because unlinking the prims can cause big increase in physics cost of the mesh, resulting in parcel overflow. (2) You are not in any way limited to the basic shapes. You can even use non-convex shapes and the decomposer will break them up into sets of convex hulls. For example, if you give it a torus with six segments around the large radius, it will break it nicely into six convex segments.

The input to the physics shape is a Collada file, just like the visual shapes. You can use one of those. The resaon for not generally doing so is that it is difficult to get the simplify function to do what you want. It can still leave many hulls with many more points than necessary if there are lots of vertices on the outside of the mesh, even for the default single hull. It is very aggressive about closing holes you may need to keep.

You can always do better with a pupose-made mesh. It is tempting just to accept the one made with the visual mesh, provided the physics cost doesn't exceed the streaming cost, but that is bad for the physics engine and lag if you could really use something simpler.

If the phsyics shape is well made, you should not be colliding with things far away from them. You may have been experiencing a bug where the collisions shapes were made into the box that you see when you stretch something. This can be much bigger than the proper bounding box or the default convex hull. Hopefully this bug is cured for new uploads, but there are still lots of meshes around that suffer from it....like the doors to my gallery on Mesh City, which you can't get through any more. (I must get those re-uploaded).

Link to comment
Share on other sites

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