Jump to content

Uploading Mesh - Cannot walk under/close to mesh


duLuna Bosatsu
 Share

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

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

Recommended Posts

You need to make a physics shape, or possibly use one of the LOD models for it, on the Physics tab of the upload dialog. Keep the shape as simple as possible to get the collision behaviour you need. Then after rezzing, set the physics shape type, on the features tab of the edit dialog, to "Prim".

The default physics shape is a convex hull of the whole mesh, which cannot have any concavities or holes. This is the shape that is used when the physics shape type is "Convex Hull". That is the default when you first rez an uploaded mesh. If you haven't specified a physics shape, the "Prim" type will not be available, and you can't select "None" if the mesh is the only thing in a linkset.

An alternative is to use invisible (texture = "default transparent") linked prims to make the collision shape. In that case, as long as the mesh is not the root of the linkset, you can set the physics shape type of the mesh to "None" and it will not collide with anything. This is rather like the method often used with sculpties, where the sculpty is made "Phantom" and linked to invisible prims that make the required physics shape. "None" is better than "Phantom" though.

ETA: you can see the physics shapes from the Develop menu - Develop->Render metadata->Physics shapes.

  • Like 1
Link to comment
Share on other sites

Thank you Drongle. From what I could gather, I assume the physics shape is just a simplified version of the model itself to create a bounding box. I did this, exported as .dae and uploaded. 

When I upload the physics shape I get an error, "NewAgentInventory_InvalidAsset" 

So I then went to Step 2 and "analyzed" leaving the settings default, no errors this time, but it turned my uploaded physical shape into a trapezoid :\

Physicssm.jpg

Link to comment
Share on other sites

The default physics shape is (now) the convex hull of the low LOD mesh. You can think of that as a shrink-wrap of the low LOD mesh with no inward concavities. So it depens a lot on how your low LOD is specified.

If you provide a physics mesh or specify the use of one of the LOD meshes, but don't click "Analyze", then you get a triangle-based physics shape consisting of all the triangles in the specidied mesh. Small triangles are very bad for the physics engine and triangles below a certain size will give you errors. So the mesh for this physics shape has to be made only of larger triangles. The weight is too high anyway if you have small triangles.

If you click "Analyz", the system will generate a collection of convex hulls based on the specifies mesh. Although each is convex, the collection can have accessible holes in. The maximum number of hulls is 256 and the maximum vertices for each is 256. With lots of vertices, this can still give high physics weights. You can simplify the hulls by using the simplify options, but this will tend to fill in holes as the simplification is greater.

You will nearly always get nuch better results by making a purpose-designed physics mesh than by using one of the LOD meshes, whether you are making a triangle-based or hull-based physics shape. Thay way you can keep the mesh as simple as possible while keeping the shape needed for the intended collision behaviour. For "Analyze"d shapes, it is especially effective to make a physics mesh consisting of simple non-overlapping shapes that are already convex. That way you can avoid the filling-in that often happens with simplification.

ETA - It looks to me as if the physics shape you are showing is the default convex hull (as it is a bit smaller than the mesh - this is a bug). The fact that it is red indicates that it has unacceptably high physics weight. This is probably because it still has large numbers of vertices. I can see that you still have 29 hulls with 211 vertices in the "Analyze"d shape. That is far too many. I think you could make a reasonable shape for this with just two suitably tapered boxes; maybe 4 or 5 if you need very accurate collisions. That would be between 16 and 40 vertices. You will have to make these as a special mesh. The simplify process is not clever enough to do it for you with this mesh.

Link to comment
Share on other sites

previousphysical.jpgThis is what my first Physical mesh looked like.

 V

 V

 

 

 

 

 

 

 

 

 

 

 

 

 

 

physicsbasic.jpgI read through what you had to say, and this is what it currently looks like.

I haven't uploaded it yet to try it out (since my trial and error is costing me ~20-40L an upload.) You mentioned tapered boxes, so I threw a few planes around and made the inside. Im okay if avs can pass through the top of the mesh where the detail is, but I was going to have this part as a walk-in, so I assume that if I only wanted the avatars to not go through these parts of the build, the Physical meshs hould only be here, in the rawest form possible. Good/bad?

 

I need to do more research, as the continual use of "triangles" is throwing me off, I've generally only worked with NURBs up until now so it's a whole new learning process. Thank you for your explainations, they're really helping to understand this :D

Link to comment
Share on other sites

The physics mesh (like the LOD meshes) gets stretched to fill the same bounding box as the high LOD mesh. So if you supply a mesh that only partly fills the space, it will end up as a different, stretched shape. Therefore you need to make the physics mesh fit the same bounding box to begin with.

There is (at least) one method to make physics shapes that don't fill the whole bounding box if that is really needed. It uses single flat planes with inward-facing normals, followed by "Solid" decomposition (Analyze), but it can be tricky.

If you go to the Aditi beta test grid (go to Mesh Sandbox 6, or another build-enabled region), you can upload for nothing. You will be charged from your L$ balance on Aditi, but this is free and non-exchangeable. You will get at least your current Agni balance when you first get there, and can ask Oskar Linden for more if you run out. Set a Preference to show grid on startup, and select Aditi. You can't transfer inventory from Aditi to Agni (the main grid). If/when you reset your login password, your Aditi inventory and L$ will be replaced by your current Agni ones (mesh from Agni may not rez because of a bug.)

Link to comment
Share on other sites

That should work as triangles or as long as you don't use simplify. However, since the mesh is concave, simplify will start fillling in the concave bits. If you use "Analyse", you generally get the best optimisation (lowest weight for desired shape) if you provide a set of convex meshes something more like this ...

sculpt_psh.png

That is four convex pieces, all in one mesh object. It should "Analyze" into exactly those four hulls, as they are not overlapping. Really though, as long as you get the physics weight (when set to type Prim, not the default in the uploader) lower than the ddownload weight, you have achieved the main aim. Making it even simpler will help the engine but not reduce the LI.

Note that tis was for an "Analyze"d shape. For a triangle-based shape, you don't need separate parts - just avoid all small or narrow triangles.

ETA - you seem to have an extra small cube. I don't know why that is there?

Link to comment
Share on other sites

Sorry for the late reply Drongle, lost track of the week. 

I read this when you posted, and have been wanting to ask if uploading multiple hulls were possible? But I have some other questions, that might help understand that better...

"Note that tis was for an "Analyze"d shape. For a triangle-based shape, you don't need separate parts - just avoid all small or narrow triangles." <- How can I tell, when I start building from a  polygon, whether its triangle based or not?

Im not sure what extra small cube you mean, the bottom portion? If so, like I said, the base has a cavity that I want/need the avatar to walk into, so I was trying to hollow it out so the physics wouldn't interrupt the ability to walk through/inside of it.

 

Link to comment
Share on other sites

I meant the small cube (square?) which has the arrows pointing out of it.

I see what you mean by the cavity now. You would need a few more boxes than I put to keep that open, leaving the space clear*. You don't explicitly upload multiple hulls - you make one mesh object which consists of non-contiguous and non-overlapping convex shapes as shown in my picture. Then when you click "Analyze", the uploader generates a set of convex hulls that have those shapes (if trhey really were convex). It will tell you the number of hulls and the number of vertices. If these are boxes with 8 vertices and flat sides, the Prim type physics weight should be 0.04*(V+H) where V and H are the number of vertices given. That is not the same as the physics weight reported by the uploader, which is the weight for the default single convex hull of the whole mesh.

As long as you don't click "Simplify", this collection of convex hulls will be the physics shape when you set the type to Prim. If you do press "Simplify", it will usually close up the spaces to make a smaller set of simpler hulls. That would certainly fill in your cavity.

*I guess this is much larger than I thought. In that case, as long as you make the physics mesh only of very large flat surfaces, you might get a lower physics weight with a triangle-based physics shape. You get that by providing the mesh but not clicking "Analyse". You must minimise the number of triangles and avoid any small or narrow ones tyo get a low weight.

Link to comment
Share on other sites

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