Sign in to follow this  
Spinell

The mesh house project

Recommended Posts

Oh, it's done. I managed to get it to a nice LI and everything is set for uploading and texturing in-world. And then I ran into the problem of "I can't get inside". Someone explained to me this was because I needed to import a shape along with the mesh to tell SL where the walls were and where we can walk on. Good enough: made a simple shape of the walls, floor and ceiling and wnt to the uploader to get it done. But when I clicked on the calculation button, I got a triangulation error. I have no idea how to fix this nor do I know what to do.

Help?

I've never uploaded a building before.

Share this post


Link to post
Share on other sites

Never heard of the triangulation error from the uploader. Did you have ngons with many vertices? Did you have any faces with (nearly) zero area? Can you say a bit more about how you made the physics shape, maybe show us a picture of it, and what you did in the physics tab of the uploader, and what the numbers (or symbols) were at the bottom (triangles/hulls/vertices).

Share this post


Link to post
Share on other sites

This has me curious, as well, what could trigger a triangulation error.  I wonder if funky ngons or nonmanifold geometry could do it.  Must experiment when I have some time.

Share this post


Link to post
Share on other sites

I was on my university's PC and couldn't post any images. Now, when I upload the house with no physics shape, it's fine. But when I add the shape, I get the error.

Here is the shape:

shape.png

And here's the house:

House.png

As you can see, the shape has no triangles. All quads.

Any suggestions? I'll try and post a pic of the error as well.

Share this post


Link to post
Share on other sites

   I have a friend who advised me to make the physics shape from cubes. Approximate the whole thing from cubes for the walls, floor ceiling, everything you want to be solid, without getting fancy, make sure none of the cubes are touching each other and only make them approximate the general shape of the building.

   Remember, the physics shape will be invisible, it doesn't have to be pretty or fancy. Think about the level of interactivity you want to have between your avatar and the walls and such. Really, the only place where good accuracy is very important is the floor.

Share this post


Link to post
Share on other sites

hi  :)

You seem to be using ngons for the floor/ceilings ?

Try blocking out your walls and floors with simple none overlapping boxes .The precise space between each box isn't important but don't make them too big otherwise or you  may find urself creating hidden doors .

For your house something like this :Spinell house phys.PNG

 

When using boxes for physics shapes  use the Analyze button in the mesh Uploader .

 

Share this post


Link to post
Share on other sites

You're using an n-gon for your roof and two of it's edges are angled off of the plane the others are. Impossible to triangulate this. Much better is to do the triangulation in Blender before exporting to your dae file.

 

original.png

Share this post


Link to post
Share on other sites

You can't walk inside a convex hull as I recall, you'll need to change the physics shape to prim.

I'm not sure that loading it as one item is the best way forward, you might want to be break it into modules.

Share this post


Link to post
Share on other sites

As others have stated, the most obvious issue is that the roof of the house is a nonmanifold N-gon, which is impossible to triangulate.  That's not the only issue, though.  You should make the following easy adjustments:

1. Detach the floor, and make it a separate object, so that you can reverse its normals, without creating non-manifold gemoetry.  You need the normals to point upward. 

2.  Add four edges to the floor, to create five quads instead of one giant N-gon.  Do the same for the roof.

3.  The vertical edge on the wall near the right front corner creates an N-gon on the roof above.  That ednge serves no purpose, so get rid of it.

4.  The vertical edges above the front are also creating N-gons in the roof.  Move their top vertices to the nearest corner, and merge them with the conrer vertices. 

5.  Once everything else is done, combine the floor with the rest of the house, so it's all one mesh.  Do NOT merge any vertices at this point, though.  For best results in-world, you'll want it all to be a single mesh object, but in order to keep the geometry manifold, the floor and the walls should not share any common edges, since their normals are pointing in opposite directions.

See the animated GIF image below.  The animation toggles back and forth between how you have it, and how it should be.

houseFix.gif

 

You're also going to need physics for the interior sides of the walls.

 

Edited (several times) to include the fixing of numerous extraneous edges, which had escaped my notice, the first time.

ETA: Step 5, which I somehow forgot to add earlier.

Share this post


Link to post
Share on other sites

Just to clarify a few things. The convex hull of the whole house is the thing you can't go inside. It is always generated and it is used if you set the physocs shape type to "Convex hull" inworld (or leave it as that, since that is the default).

The type of shape you showed us, once you have resolved the ngon problem, is suitable for making a triangle-based shape, which yuou do by providing the collada file on the physics tab but NOT cliucking "Analyze".

The sort of mesh shown by Aquila is the best approach when you DO click "Analyze". That button takes the mesh and decomposes it into a set of convex hulls. When you present something that is already as set of non-overlapping convex hulls, as in Aquila's shape, it will simply make that collection of convex hulls. This gives you much better control than allowing it to chop up concave and overlapping shapes. Although it is made up of convex hulls, this is not the same as the default convex hull. You can still go inside as long as there are appropriate spaces and orifices left after the decomposition. You just can't go inside the individual hulls.

There are advantages and disadvantages for the two alternative kinds of physics shape, triangle-based and decomposed, which I won't reiterate here. It is important to realise that the best mesh you can make for each is very different. Whichever you choose, it only gets used if you set the physics shape type to "Prim". If you forget that you are left with the default convex hull that you can never get inside.

Share this post


Link to post
Share on other sites

Ok, changed the shape to what you guys suggested. The good news is that I no longer get an error. The bad news is that the shape still doesn't work perperly. There's no floor on the porch entrance (my avatar sinks into the ground to the knees). I still can't get through the door and inside the building to check the interior floor, most of the walls works except for one corner (right side of the porch) where I can sink into the corner walls but then an't walk to the right side of the porch.

At this point I'm so frustrated with this I'm almost chucking the whole thing away and buying something cheap and tacky on the MP. At least it works.

Right now, if I can get the whole in the wall where the entrance is supposed to be to work and manage to get an avatar inside the damn thing, I'll be more than happy. And the floor. But I can always just make an in-world invisiprim as the floor and apply it to the entire thing. Won't be astheticly pleasing, but it'll work.

So, any more suggestions? You guys have seriously been a huge help. I've never worked with physics shapes before but I swear, this is the last time I'm doing buildingds in SL. It'll back to clothes for me.

Share this post


Link to post
Share on other sites

You don't say which type of shape you used, Chosen's or Aquilas. The description you give of the symptoms sound as if it was the default convex hull that you would get if you didn't specify a file for the physics at all. In that case, it is the convex hull of the loe LOD mesh, which can often be missing pieces like the corner you say is absent. You can tell if no physics shape file was specified because the "Prim" option will be missing from the physics shape type dropdown in the edit dialog.

Assuming you did use Chosen's shape, make sure you did not click "Analyze" or any other buttons on the physics tab other than the file selection ones. Analyzing that mesh could produce the symptoms you describe with the normals in certain directions and certain other settings in the physics tab.

If you used Aquila's shape, then make sure you clicked "Analyze" but no other buttons ... especially not "Simplify". Whichever you used, make sure you set the physics shape type to "Prim" after rezzing (on the features tab of the edit dialog).

You can get problems when re-uploading an edited file with the same name if the slm mechanism is active, because it will load all the settings from the previous upload, which may not be what you want. To prevent this, click the "Reset" button and then make all the desired settings afain.

Share this post


Link to post
Share on other sites

If this is the first time that you are trying to create  physics for a building then may i suggest you start by making a very simple box house (inner and outer walls and a door opening in one of the walls ).

Then experiment making physics for this. Using simple planes for physics and Not Analysing in the uploader, and then using simple non overlapping boxes for physics and Analysing in the uploader.

Have a look at the  image in message  5 here : http://community.secondlife.com/t5/Mesh/Problem-with-home-mesh/m-p/1787413#M18544 for the type thing i mean.

Personally i think the box shape method is easier to start with because is just like you are using ivisible prims for the physics. Where you want a part or your mesh to be physical you just create a box around it .

Note for the Floor in the planes method : 2 planes are better than one, and check that the normals are facing the right way .

Also you can check in-world how your physics shape is  by going to the Develop menu > Render metadata > show physics.

 

Edited to Add: As others have said , very important to change the Physics shape type from Convex Hull to Prm in the features tab of the Edit panel

edit panel.png

Share this post


Link to post
Share on other sites

Sorry for not giving enough info. I don't know what you need, so keep me informed as things go along. Here are some mroe visuals. I used Chosen's shape and I can't select the rpim option. As an experiment, I tried the Analyse option while using Chosen's shape and while I could, for the first time, select the Prim option, it still didn't work at all: I could pass through walls.

show.pngshow2.pngshow3.png

Oh, and thanks for the "show physics" trick, Aquila. Quite handy to get a better perspective.

Hum, if anyone wants to take a look at the blender file, I really fon't mind sharing. Someone from Builder's Brewery said she's take a look and never said anything. Either she's been stuck with a puzzle or she nicked it. xD Either way, I didn't even mind sharing the build.

Share this post


Link to post
Share on other sites

In the preview, it looks like there is something wrtomg with the physics mesh because it got sqeezed back-to-front. The uploader squeezes it to fit the dimensions of the high LOD visual mesh. So that suggests that the exported dae file includes something in front of the house that isn't supposed to be there. Perhaps you should look for that.

However, that doesn't seem to explain why the "Prim" option is not appearing in the edit dialog. This means the uploaded data does not incliude a physics shape. Since you did specify one, that may be because it os invalid in some way. One thing that can invalidate it is isolated vertices or edges without faces, which could be what is in front of the house. There is a Select/Loose Verts/Edges menu item in Blender that might find them. The problem with that as a potential explanation is that it should be detected by the uploader, which should give an error message and abort the upload. It should not go ahead and upload without the specified shape.

Using "Analyse" with this kind of mesh is very unlikely to give useful results. It will try to close up the internal spaces, although exactly how depends on where the normals are pointing and whether you are using "Surface" or "solid".

The red physics shape you see is the default convex hull, which you should be unable to get inside. It is made from the convex hull of the low-LOD visual mesh, or from the convex hull of the physics mesh if you specify one. Red suggests the physics weight is very high. I can't see why, but it may be that there are many vertices that are close together.

 ETA I just tested uploding a cube with the physics shape having extra isolated vertices or edges, and it simply ignored them. The "Prim" option was still there and the shape wasn't squeezed. So I guess that explanation is most unlikely to apply.

Share this post


Link to post
Share on other sites

   I'm seeing some yellow and blue highlights in the image of the in-world rezzed house. It may be that the mesh you uploaded consists of two (or more) unjoined meshes, which would result in your upload rezzing as a linkset. If this is the case, that can cause your physics shape to become deformed. Specifying your own physics shape for a multi-part mesh dae file causes the physics shape to 'attach' to only one part of such a file. That would cause the physics shape to scale to fit the bounding box of that one part, possibly causing the symptoms you describe.

   Instead, in your modeling program, join all the parts into one object (materials count permitting), then upload, using your physics shape.

Share this post


Link to post
Share on other sites

Yes. Well spotted, Ivanova. If you have multiple high-LOD meshes, objects in Blender, you have to have the same number of physics meshes/objects. They will be associated with the visual objects according to the order they appear in the visual and physics collada files. So if there are two in the visual file and only one in the physics, the physics one will get associated with just the first visual mesh and will be squashed to fit it. When you use multiple objects, you can make sure of the right order in the two files by using the Sort-by-object-name option in the collada export after giving the objects appropriate names. As Ivanova says, it is much simpler to just make the whole model one object, unless you have a good reason for keeping it as multiple objects.

Share this post


Link to post
Share on other sites

hi :)

I was working towards the same conclusion but by experimentation , :)

2 seperate objects in blender and the physics mesh , exported without  checking the "selection only " in the collada panel

fo the main .dae file . Then exporting the physics mesh to Collada with "selection only" checked .

Uploader.png

As Spinnel noticed the prim option in the Edit/Features panel is then not available .

Share this post


Link to post
Share on other sites

Good catch, Ivanova.  That may actually be my fault.  Spinell followed the advice in my post, and I neglected to mention that the two objects should be combined into one mesh.  I've edited the post, to include that step.

Share this post


Link to post
Share on other sites

   I've had recent practice house building. Having found nothing in the Marketplace that I really liked, I realized that I would have to make what I wanted.

   When modeling something that was simply too large and detailed to be done justice with eight materials, I created my house in two parts. For one of the parts, I'll call it the 'main' part, I created the physics shape that would serve for the entire house. To make sure the physics shape retained the desired shape and size, I also created a 'bounding box' of six triangles, meant to be transparent in-world, to define the dimensions of the whole thing.

   Then, I uploaded each part separately, the main part with the physics shape, and the second part, just letting the uploader create the simplest possible physics shape. With the two parts then linked in-world, I set the main part (ensuring it was the root) to 'physics type prim' and the second part set to 'none'. The physics shape I created lets me walk around just fine.


   So... I probably make it sound like a mansion, but it's not. It's just right.  :)

Share this post


Link to post
Share on other sites

Ok, just to let everyone know:

I couldn't get my shape to work no matter what so I decided to try Aquila's box method. After fiddling with the materials, I got it to work like charm. ;)

Just wanted to tell evryone, problem solved! xD

Thanks so much for all the help and sorry I didn't answer earlier!

Share this post


Link to post
Share on other sites

Hey there!  If you want any help on getting that LI down from 886 to something like 95, see if I'm on the beta realm or msg me in world.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this