3ds Max: Tileset

From the Oblivion ConstructionSet Wiki
Revision as of 22:38, 18 January 2007 by imported>Razorwing (Added user link to the top)
Jump to navigation Jump to search

Created by Razorwing from Silgrad Tower

-=Download Max Scenes=- of the finished pieces.

It's a 7-zip archive. 7-zip is a freeware zip program which can be downloaded from 7-zip.org. It can achieve superior compression compared to any other zip program out there.


Inspired by my previous tutorial, which was more of a discussion of the methods and techniques I use to mimic Bethesda's models to help the Silgrad Tower team create the impression of the player exploring the Morrowind Province, I felt like writing a proper tutorial. This time I thought I'd share information about the techniques I used to model a simplistic tileset for the building I modelled in the aforementioned article, and import it into an Oblivion mod.


The reason this tileset is so simplistic is because we don't have a broad use for it, as the current plans only have it being used once for a special building and so making it extremely detailed would be pretty much a waste of time and effort. Thus, I wanted something quick and easy but at the same time it had to work flawlessly. At the same time, you never know what the future holds, and so doing a quick tileset seemed like a better idea than custom-modelling one whole fixed, rigid interior model. What if I or someone else on the team wanted to mod a basement? Or an ancient Indoril ruin? Or someone showing great promise came along, with a desire to bring back Mournhold, and wanted to get a headstart on it while more models became finalized? You never know - but one thing that's certain is that modelling a fixed interior model is a sure way of boxing yourself in.


The first thing you need to know is the snap-to-grid system. Oblivion, and TES III: Morrowind too for that matter, uses a grid system with which tile set pieces can snap together seamlessly and quickly. The system is based on the power of 2: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 and so on. You probably recognize the sequence from other computer-related situations. For instance, the DDS textures used by Oblivion has to be sized to a power of 2 to work correctly. It's not as serious with a tile set, but you do need to follow the grid system exactly in order for it to work as easily as you want it to.


256 is a good grid value to start with. Imagine that the universe in Oblivion's world window is gridded into units exactly 256x256x256 points large. It's not really true, but it helps to think of it that way. Now imagine that you are seeing four of these units of nothingness laid out like an L-shape. If you turn on the snap-to-grid setting in the CS and set it to 256, you can move any model inside these units and it'll snap to the grid according to how it was modelled and set up in 3D Studio Max. It'll work for any model, like a plant or a chair, but unless it's modelled to be a tile set it won't make any sense. It might sound confusing if you haven't worked with tile set models before, but I'm confident it'll make more sense as we get into Max and start working.


Right then.


1. In 3D Studio Max, draw out a Box from the Standard Primitives panel. In the Parameters rollout, set the length width and height to 256 and you'll get your box sized perfectly. Now switch over to the Hierarchy panel, press "Affect Pivot Only" and then click "Center to Object". Switch to the Modify panel, then click the "Select and Move" button (which looks like four arrows) from the page header. See how the three text-boxes in the bottom of the window fill up with numbers? In each box, enter the number 0 and hit return. Now you have a perfectly sized box with correct position and correct pivot.


(In case you're wondering, the position determines where in the universe the model is, while the pivot determines the axis around which the model will rotate when you spin it. By positioning the box in the center of the universe you'll ensure that it appears in place where it's dropped in the Construction Set, while a centered pivot ensures that it won't move out of place when you rotate it. On the other hand if you're making a door, for instance, you want the pivot along the spine of the door so that it appears to swing from the hinges.)

-=Screenshot #1=-


2. To start off, we're going to make a corner piece out of this box, which means we need to turn it inside out and delete two polygons.


a) Select the model, right-click, and choose Convert to: > Convert to Editable Mesh.

b) Click the "Modifier List" dropdown list, and press the N key twice to highlight the Normal modifier. Add it, and make sure Unify Normals *isn't* ticked, but that Flip Normals *is* ticked. Cool, now your box is turned inside out, just like a little room.

c) Add an 'Edit Mesh' modifier on top of the Normal modifier.

d) Unroll the 'Editable Mesh' modifyer and select Polygon.

e) Select the two polygons, then press the DEL key.


If it looks like in screenshot #2, you've done it right. NOTE that you can't see the ceiling in the render; the ceiling polygon should not be deleted, only the two sides. A neat effect of flipping normals is that the flipped polys become invisible from the other side - so a player can stand in your corner and see a roof over him, but you as a modder / modeller can peek inside without polys on your side blocking the view.

-=Screenshot #2=-


3. Now select the floor polygon, then scroll down the modifier rollout until you see the category Edit Geometry. Press the Detach button, and that poly will become a new, separate mesh. Do the same for the two sides (both polys detached to the same mesh), and you'll be left with the roof poly. Open the material editor and drop a material on each of the meshes. Assuming you want it to tile once and like a planar texture you probably won't even need to add an uvw map modifier. Now select your three meshes, by way of CTRL+A, right-click and convert them to editable meshes. Pick one, scroll down to Edit Geometry, press the Attach List button, press the All button in the popup window, then press Attach. Unroll the Editable Mesh modifier on your now only mesh, select Vertex, click in the viewport and press CTRL+A, scroll down the parameter list to Edit Geometry > Weld, enter 0,001 in the box and press the Selected button.

What you've done now is that you've cut the mesh to make it easy for you to texture it, then welded it back together again. Above all, welding meshes makes it easier to work with them in NifSkope, but is also a good way to ensure that you don't cause gaps and glitches by accidentally moving a vertex that isn't attached to the polygon next to it. Now it should look like in screenshot #3, which has the corner piece viewed from two angles.

-=Screenshot #3=-


4. Save your scene, then save it as a new scene so you won't overwrite the old one, because we're going to edit the corner piece and make a wall piece out of it. It's a piece of cake. Unroll the Editable Mesh modifier, select Polygon, then select either one of the polygons on the side and delete it, so your left with a roof, a floor and a wall polygon. Cool. Save it, then save as a new scene and we'll make the final piece - a ramp, so you can go from floor to floor. On your wall model, unroll the Editable Mesh modifier again and select Edge. CTRL+left-click on the three edges of the side, like shown in screenshot #4.

-=Screenshot #4=-


5. Now, while having your edges selected like that, hold down the left SHIFT key and drag the edges along the Y axis (probably, could be X axis if you selected the edges on the other side). See how you created a new segment to your mesh? Perfect. Just drag the edges anywhere, it doesn't matter.

-=Screenshot #5=-


6. Here comes the tricky part, which will most likely require a calculator, especially if you're as bad at math as I am. Remember the 256x256x256 grid system? Well, what we want to do now is to make sure the outer vertices of the new segment you created match up perfectly with the grid. Starting out with simple shapes like the box is a really good idea even if you're making a complicated tile set because it's easy to make sure it works on the grid before you add complexity to it.

Right then. Click any of the bottom vertices (A), and you should see that the Z position of it is reported as "-128,0" (B). If it isn't exactly "-128,0" you've done something wrong and need to start over. BE SURE however that you have the "Select and Move" button (C) pressed down when you check the numbers! If you have the rotation or scale buttons pressed you'll get different numbers reported, which don't have any meaning in this particular case.

-=Screenshot #6=-


7. So, now that we know the bottom vertices are at -128, let's say we want the ramp to go forward 512 points and up 128 points. This will give a nice incline the player can traverse. Thusly, move the two bottom vertices of your new segment 128 points up and 512 points to the left. Do this by CTRL+left-clicking on the vertices, and then enter new numbers in the two applicable number boxes in the bottom of the screen. If your vertices veer off to the side, you entered a number into the wrong box. They should only move up and to the left, in the case of the model in the screenshots.

As you saw in screenshot #6, the Y position of these vertices is 128 and the Z position is -128. So, select both of them, and enter 640 in the Y box and 0 in the Z box.

If you're wondering about 128 and 256, I should clarify that the outer vertices of the new segment was together moved upward by 128 points, but the bottom and top ones still have to stay 256 points apart along the Z axis otherwise all sorts of crazy things would happen.

-=Screenshot #7=-


8. Select the two top vertices of your new segment, and do the same for them, but add 256 points to the Z value while doing it. Don't change the Y value, that'd make your edge skewed and we don't want that. And with those few easy steps, you've ensured that the ramp piece lines up perfectly with corner- and wall pieces both at the bottom and at the end.

-=Screenshot #8=-


9. The four right-most vertices from the old wall piece have served their purpose now, so go ahead and delete them. This will create emptyness where the wall piece used to be, thus ensuring that the ramp fits perfectly on the normal wall piece. And because the corner, wall, and ramp piece were all based on the same basic mesh, we can be 100% sure they are consistent and will line up perfectly in the CS.

-=Screenshot #9=-


10. What's left to do now is to set up the mapping on the ramp piece, as duplicating the edges on the wall piece severely screwed up the mapping. Start by separating the walls, then select them. Right-click in the viewport and choose Hide Unselected to get an unobstructed view of he wall. Then pressing either the F or L key to see it from the side, like in screenshot #10.

-=Screenshot #10=-


11. Select the "Arc Rotate SubObject" tool (A), which looks (at least to me) like a biohazard symbol with a yellow center. Don't you see the yellow icon? If so, left-click and hold on the icon to see a little pop-up menu from where you can select the yellow icon. With the icon pressed down, left-click and hold anywhere in the viewport *outside the circle*, and drag left or right to tilt your view until it's lined up like in screenshot #11.

If you left-click and hold inside the circle, you can drag to swivel the camera around the model, but that wasn't what we needed in this case since the plane was lined up already. Because it was slanting, we needed to tilt the camera so we were looking at it from the right angle.

-=Screenshot #11=-


12. Add an uvw map modifier, then scroll down to the bottom of the rollout and click first View Align (A) and then Fit (B). Assuming you've aligned and tilted your camera view correctly, the mapping will be set up correctly (well, within reason at least... no-one's gonna notice if it isn't perfect). It should look like in screenshot #12.

-=Screenshot #12=-


13. Do the same for the roof and floor and it should look like in screenshot #13. In that screenshot I've included both how it looks in wireframe view (left) and render view (right).

-=Screenshot #13=-


14. Doublecheck your texture settings.

First, textures that don't have opacity should use the CivilizationIV shader, which comes with the exporter package (see below), textures that do have to use Blinn I think. In both cases you have to make sure that the Ambient and Diffuse colors are absolute white. Specular/Emittance doesn't matter, I think, but if you leave Ambient and Diffuse as anything else than absolute white your model is going to look very dark in-game.

Second, none of your textures should have any underscores ( _ ) in their filenames. This is very important because Bethesda uses underscores to control in-game behaviour. In the case of textures, the game sortof loads your color texture then looks for a matching texture file with the appended text "_n" right before the file ending. That's your normal/specular texture. So, name the color texture for instance "black.dds" and the normal "black_n.dds". If you use underscores in the filenames you'll mess up that system and your normal map won't show. You can fix it in NifSkope, but it's easier for you if you set up the correct filenames from the start.

-=Screenshot #14=-


15. Make sure every model piece is welded together as that'll make it easier for you in NifSkope. Then export your three models from 3D Studio Max using the CivilizationIV NIF Exporter ( can be downloaded here ). Use the default options except set the Textures option to "Original images", and save the NIF to a folder in "Data\Meshes". Personally I'm using a folder called ST, where all the NIFs for the Silgrad Tower mod goes. That's it, now you're finished in Max.

-=Screenshot #15=-


16. Copy the textures your model uses from wherever you have them to a folder in Data\textures. Again, the folder I use myself is called ST, but you can name it anything you like. Never use underscores in filenames. Then, fire up NifSkope. If you don't have it, you can download it here.

This isn't a NifSkope tutorial, so I'll be rather brief. There's a good tutorial on the CS Wiki called "NifSkope Alchemy" which you might want to check out. In any case, start out by maximizing the window and drag the popup window off the screen. The popup window is of no use, and is just in the way. Screenshot #16 shows my Indoril entrance / exterior doorjamb in NifSkope.

-=Screenshot #16=-


17. What you want to do know is insert the relative path to your texture folder in front of the filenames listed to the right of the flower icons. Personally I keep the text snippet in a "notes"-type text doc I have on my desktop, so I have easy access to it. If you don't see anything happening in NifSkope, or if the popup window writes out problems, just ignore it. You'll never get textures to both show up in NifSkope *and* work in an Oblivion mod at the same time. Don't leave any open text fields when you're done; the changes are only kept when you move the highlight away from them. When you're done, go to File > Save and overwrite the NIF file.

-=Screenshot #17=-


18. Import the three NIFs into your Oblivion mod by clicking on the Static category, then right-click in the list to the right and choose "New", give it a nice ID and then locate the NIF file. Go to File > Preferences, set the snap setting to 128 and the movement speed to 4.00, hit Apply and then Close. Now you can drag and drop your tile set pieces in the world window and start lining them up.

-=Screenshot #18=-


19. Just for good measure. :D

-=Screenshot #19=-




I hope this tutorial was informative to you. If you would like to read more of my tutorials, please see the Tutorial Board on Silgrad Tower's Forum. You are welcome to repost this tutorial anywhere you like as long as it's apparant I (Razorwing) wrote it. Please include a link to Silgrad Tower too. If you would like to contact me, my ESF username is Gloomwing.