Jump to content

A house with interior


dawnalphonse
 Share

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

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

Recommended Posts

Hi,

I have created a simple house in blender and imported into second life. But the Avatar cannot walk inside . I build a separate physics model for the house . But I have no idea that how can i create a separate physics mesh model for Avatar can walk . 

What I did is , I made a copy of the house and give it a collision physics from blender . Then I uploaded that mesh also with the original mesh .  Even then also the avatar cannot walk inside . 

How can I resolve it . 

Link to comment
Share on other sites

Physics properties defined in Blender cannot be used by the SL uploader. Instead, the uploader generates a physics/collision shape from ordinary mesh(es). There is a Physics tab in the upload dialog that controls this process.

The first thing to know is that every mesh gets a default physics shape which is used when the object is first rezzed, and whenever the Physics Shape Type is set to "Convex Hull" on the features tab of the edit dialog. If you do nothing with the physics tab, then this default shape is made from the convex hull (shrink wrapped shape with no indetations) of the Low (3rd) LOD visible mesh. You can tell the uploader to use a specific hysics mesh, either choosing one of the visible LOD meshes or specifying a different file on the physics tab. If you do that, the default physics shape will be the convex hull of the specified mesh. This will also generate another physics shape that can be used inworld if you switch the physics shape type to "Prim". Unlike the default shape, the Prim-type shape can have concavities. So that is what is required of you want to be able to go inside the mesh.

There are two kinds of Prim-type physics shapes. If you specify a mesh but do not click "Analyze", you will get a triangle-based physics shape, consisting of the triangles of the specified mesh. The strange thing about triangle-based shapes is that their physics weight gets larger as the triangles get smaller. If the physics weight is higher than the download weight (of the visible mesh) it becomes the LI. So small triangles (including long narrow triangles) are the enemy of low LI. For walls, you have to delete the thin edges. There are also some strange effects with some triangle-based shapes that make them easier to penetrate by accident, and you can get stuck between the two layers of walls with two separate triangle-based sides. Finally. if any dimension of a triangle-based shape goes below 0.5m it will be switched to type convex hull, so that you can't go through holes any more. That often catches people out with doors they can't get through. So although triangle-based shapes can produced the lowest physics weights for many buildings, there are a few pitfalls to deal with.

If you do click "Analyze", then the uploader will generate a physics shape made of a collection of convex hulls. There are several parameters that control how the decomposition is done, but the best advice especially for buildings, is to start with a mesh that consists only of non-ovelapping simple shapes that are already convex hulls, with as few curve segments as possible. So each wall should be a single stretched cube, three if it has a door and four if it has a window, etc. You can see in the preview whether the shape still has openings where you need them, by using the exploded view slider. The weight will depend on the number of hulls and vertices, which are indicated after you do the "Analyze".

If your model has multiple separate mesh objects, then you need to have a separate physics mesh object for each. Also, they need to be in the corresponding order in the collada files for the uploader knows to use the right physics with each visible object. In Blender, you can do that by naming them in the same alphabetical order and then using the "Sort by Object Name" option on export. For each mesh object, the physics msh will be stretched and/or squeezed to fit the bounding box of the corresponding visible mesh object. So it's easiest if you make sure they both fit the same bounding box before uploading. The bounding box is the smallest box aligned with all three. xyz, axes that will fit round the mesh geometry.

So my advice here is to first make a physics shape mesh from non-overlapping cubes that matches your visible mesh, and use that on the physics tab with "Analyze". Then you can experiment with parameters and triangles.

 

Link to comment
Share on other sites

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