Jump to content

Creating Doorways In Blender


Ciaran Laval
 Share

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

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

Recommended Posts

I'm trying to create a doorway in a Mesh Cube in Blender 2.63. I can use the knife tool to make the opening but when I upload the model inworld, the physics of the model doesn't recognise the opening.

I can remove the top face of the cube and once I change the physics shape to prim, i'm able to go into the cube, so that part is working as expected, but not the front opening.

The uploader doesn't seem to recognise the extra vertices in a front opening when I use the knife tool or a loop cut and then remove that face.

I can create a doorway if I make an opening in the front and back of a cube, the physics shape is happily recognised then. However if I then create the other walls and link it all together as one mesh, the opening again vanishes when it comes to physics, I can only get it to work with one standalone wall.

Link to comment
Share on other sites

I analyse it as a solid usually, that's when the hole vanishes from physics view, on my basic test it then shows me as having eight vertices, which is what I'd expect to see if I was just uploading a cube, it doesn't seem to find the new vertices.

Link to comment
Share on other sites

I am assuming this is a simple cube without "solidify". So inworld, the walls are transparent from the intside. Is that right? Of course you would not be likely to want that in the long run, but I looked at that for now.

If we make the same thing the traditional way, using loop cut & slide to divide up the faces, two vertical cuts for the door sides and one horizontal for the tp; remove the door face, then merge most of the additional vertices with the appropriate corners; what happens? Well, with the normals pointing outwards, it's fine if we stick to a triangle based shape (don't "Analyse"), but either surface or solid decomposition fill in the whole thing. However, if we invert the normals so they point inwards, export that and use it for the physics shape, then surface decomposition works, and we can go inside.

However, for the knife cut version, that doesn't work, even when we invert the normals. It always gets filled in. I don't have a full explanation for that, but the clue is there when you look at the preview after choosing the physics mesh. Those darker grey lines and handles (they used to be red - that was much better) indicate triangles that are too small and/or narrow. If you try to use the triangle-based shape, you get an error.

So the problem is that the knife tool has left us with some horrible narrow triangles. If you go back to Blender, you can see where they are. Select all meshes, triangulate faces, then select the two vertices at the bottom of the door and pull them outwards. You will see a triangle appear that was zero width before you pulled the vertices (see picture). Undo. The clue is there in the edges you can see after triangulating. The floor has only one diagonal, nothing connected to one of the vertices at the base of the door.

naughtyknife.png

Now select the edge that runs from the corner of the box to the opposite door post. In fact this is the long edge of the narrow triangle. Do Mesh->Edges->rotate CW. Magically, the missing edge on the floor will appear. If you try moving the vertices at the bottom of the door again, you will see the narrow triangle has gone. Export this, flip the normals, and export again. Upload the unflipped one and either use it to make a triangle-based shape or use the flipped one and do a surface decomposition. Both now work as for the old fashioned version.

The moral of the story is that the ngons made by the knife tool can do very nasty things when the mesh is triangulated, as it has to be either before of during upload. Older methods are safer and results with the knife should be carefully inspected. It's generally a good idea to triangulate your mesh before exporting to look for this kind of error. Also, watch for the error indicators in the preview when you choose the physics shape, before you press "Analyze".

 

Link to comment
Share on other sites

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