I tend to make both the interior and exterior of buildings as one thing. In the past games had to make interiors as separate maps (and use numerous tricks) due to memory constraints. Today this is not as necessary, so the interior and exterior can be on the same map or object. I usually do three objects; roof, walls, and floor. This makes things easier in single-level buildings. Multi-level buildings would have every level as separate walls and floor/ceiling.
Blender and Gimp are tools of choice when I make 3D objects. Inkscape is used to plan building layouts. I usually make a texture atlas for walls, roof, and floor. A texture atlas is a group of smaller textures in one bigger texture. They are mostly used for animated textures or conserving memory by having one texture shared by many objects.
First, let's use inkscape to create a building layout. I like to keep things simple as layouts can change when modeling. All it takes is a few squares/rectangles. Select them and use Path>"Object to path" then arrange and color them how you want. You don't need complicated layouts or special floor plan software.
I already have a land section to define the max size of the building and some objects to build the pieces from. Most of these were made from extruding cubes or planes and have been measured using the grid. Everything *should* fit together with little problem or editing. You will need to edit some things as you construct the building.
I start with the floor first. As you can see, I've already modified some of the faces to fill some gaps. The player won't notice that much. I selected and joined the objects together. See that red/white banded circle in the center? That is where all the parts will be centered later. Now I just tab into edit mode, press W and remove doubles, then remove the interior faces manually. Using the num pad, or number keys if you have set blender to emulate the num pad, you can change the view to make selecting inner faces easier.
I've unwrapped the floor faces and applied textures. Just choosing to reset the faces and scaling/moving them to a texture works well. Snapping the uv layout to pixels (in edit mode: UVs>Snap to pixels) helps.
I've extruded the walls for a single room to have tabs. This allows them to fit together once I join them. Now I'll remove double vertices and remove interior faces. Be careful you don't remove any faces you need. This will be done for each room, and then the rooms will be joined together. Next I'll begin adding textures to the walls and aligning things. Be careful with your doors and corners.
I've selected the top and bottom faces, reset their UV layouts, and scaled them on a texture to look nice. The player won't see them, but I might have damaged buildings later. Keeping things tidy and looking nice helps. Next, I select the large interior faces, reset their UV layout, and scale them to the texture I want. Scaling slightly smaller then the texture can avoid distance seams. There are three wall colors, and I color the rooms differently. Pink for bathrooms, green for storage/office/kitchen areas and blue for most other things. Feel free to have more colored walls in your atlas, I just like to keep things simple.
I tend to start by putting all the faces on the blue wall first and scaling them correctly. Then I can just select and move other room faces to other colors.
As you can notice, the faces I have left are doors and corners. For doors, I collectively select their faces, change the camera to face the door, and set the UV lay out by view (bounds). Then I scale and arrange the layout to the wall color needed. You can usually get both sides of the doorway at once and move the other side if it needs a different wall color.
For the corners, or slivers, I select them on one side or another of a larger wall piece and do the same thing. Just change the camera view and get the UV layout by view (bounds). Now just scale/move to the texture you want. Once the interior is done, I'll layout the exterior.
For the exterior I unwrap the faces individually by view (bounds). I select the slivers, or corners, with another face and unwrap them together. The door faces are also collectively unwrapped. Try to keep the corner slivers on the same side of another face where you can. Now I select each face and face section on one side and scale/arrange them on the brick part of the texture.
As you can see, there are seems between sections. Just select every other section, go to the UV texture, select and flip the UV layout for those parts. (S,X,-,1, ENTER) rapid succession, no commas. This solves the seams for the brick walls. There might be seams on the corners, but that's not a big deal. Once done with all the walls, the roof/ceiling is made in a similar manner.
After you're done with the walls, select them and set the selection to cursor (shift+s). Now go into edit mode, select all faces (a), and move the walls back flush with the floor. Using the grid, and snapping to it (ctrl), helps. Do the same for the floor, making it flush with the walls. This is best done in wireframe mode (z).
I usually select both and drag them back on top of the land area that was underneath them. This centers the objects together to reduce hassle on importing them to another game engine. More centering, less moving.
I've arranged/modified the roof pieces. Like the walls/floor join everything and remove doubles and interior faces. Then extrude edges to cover the center gaps and remove doubles. Select all faces and reset the UV layout and arrange/scale to the texture.
Now I'll select the corner triangles and set their UV layout to view (bounds) and scale them to look better. Afterward, grab the bottom faces and move them to the ceiling part of the texture. After centering the roof with the other house parts, I'm done.
I'll be making a navigation mesh and adding doors later. Since this is dependent on the building and how I'm going to use it, I won't be covering this part.
Remember to select each part, go into edit mode, and normalize faces (ctrl+n). Having to re-import because you have a hole from an errant face is annoying. Giving your meshes/objects descriptive names helps. I'll probably name them Diner Roof/Wall/Floor/Navi for each part.
That should give you all tips and starting points to make your own buildings.
So many buildings. Gonna take a 3-day weekend.
Distance seams are seams that appear/worsen as the player moves away. This is largely due to textures from an atlas bleeding on the edges of a face.
No comments:
Post a Comment