Simple Room Tutorial By Finzy

From Serious Sam Wiki
Revision as of 06:57, 10 October 2010 by Finzy (Talk | contribs)

Jump to: navigation, search
TIP :  Before doing anything, place a reference model of Serious Sam into the middle of your level. This helps you get the scale right, so that you won't make things too small or big. To do this, insert a new static model, and on the model property where it says local, browse to Content\SeriousSamHD\Models\Player\SeriousSam folder and select the Serious Sam model. Then delete (clear) the "Default" mechanism so that it won't fall down when you start the map - assuming you want to keep it there while testing.
  • Press Insert to insert a static model entity.
    TIP:  If Sam model is placed, place between Sam's feet for instance
  • Press E to enter mesh editor to create a model for your room.
  • On the tab to the right of the screen, you should see several primitive samples for your model. Of those, pick Box.
  • Since this is a hollow room, you will need to turn the primitive hollow. Press Q to open the properties, and enable "flip polygons". In addition, set the X, Y and Z segments to 5. They determine the amount of polygons used in your model for floors, walls, ceiling etc. It can be set higher or lower, but I generally use 5 as it allows easier further customization of the model while not making the model too complicated.
  • Drag the box around to get the shape you want. You can use the arrows on the edges to scale it and the asterisk shape in the middle to move it.
    TIP:  If you placed a Sam model into your map, I would recommend building the map around it.
  • Once done, press Ctrl + A and then OK to align the model to the grid (this step is optional though). This should place your model exactly where you placed the static model entity. Although there are some situations where this isn't wanted - for instance when making complicated architecture, you may want your newly created primitive to be where you moved it while scaling. If you don't wish to align your model, simply press the unselect all button (tilde key below Esc) and your model will lock into the place you put it.
  • Now you have the basic shape for your room. You may wish to texture it now or keep customizing it (move on to basic detailing tutorial).
  • To texture the model, you need to create surfaces for each different "element" or texture, in this case, the floor, walls and the ceiling. Select the polygons (be sure to switch to polygon mode first by selecting Polygon from the yellow tab to the bottom left) of the floor by clicking on them or keeping your left mouse button pressed and dragging, then press Ctrl+Shift+F to create a surface. Name it floor.
  • Repeat same process for walls and the ceiling, and name them the same way.
  • Once done, select ALL polygons of the model by pressing Edit ---> Select All, and press Shift+S to create an uvmap. Uvmaps are scary stuff you don't want to mess with, so we'll keep this simple and clean (tm). Select planar from the uvmap tab, and "fit both uv", and name the uvmap Texture (as is default), then press OK. This planar uvmap, called Texture, is basically used to texture all flat areas of your model, such as the floor and ceiling. But we'll also need an uvmap for the walls and the shadowmap. Unselect all polygons (edit ---> select none or tilde key), select them all again just to be sure, and press Shift+S again. This time select "cylinderical" from the uvmap tab, and "fit both uv" again. Name the uvmap Texture2 and press OK. This second uvmap will be used for the walls and can't be used on anything else except horizontal areas of the model, though we will need to stretch it to make it look ok. Finally, we need a shadowmap so that we can apply shadows to the model later. Repeat the same process, except select Atlas uvmap and name it Shadow. Then press OK. Now we'll need to arrange it so that it looks 100% good - don't forget this step, although you can attempt it later if you do. Go to the uvmap tab on the right with the polygons and the uvmap selected, and select Arrange (BSP). The editor will automatically arrange the shadowmap so that it looks awesome. Great, right?
  • Now that we have all uvmaps ready, press Alt+1 to open the mesh properties.
  • Open "Polygon maps"
  • All your created surfaces are listed here. Select floor, and then New ---> ShaderPreset.
TIP:  Be sure to also select a material for your surface by browsing for a material in the material attribute property. IIRC, materials are located in Content\SeriousSamHD\Databases (or Misc)\Materials or some folder like that. Materials basically determine what substance the surface is, be it wood, stone, etc. They allow for bullet holes to appear and also control player speed and physics on the selected surface. E.g an ice material will make the surface slippery.
  • Add a new configuration by pressing the yellow plus button. On the shader property, select Browse.... and select Standard shader.
  • To texture the model, on the base texture property, choose Browse and then browse for the texture. Since the textures aren't listed in any particular logical way (), you may have to spend a while to familiarize yourself with texture browsing. Basically most usable textures can be found by going to level specific folders (Content\SSHD\Textures\Levels) and then looking for the texture in that episode's/map's folder. E.g if you want Persian textures, go to the Persepolis folder and so on.
  • Next, put the name of the uvmap you wish to use for that surface to the base uvmap property (for floors/ceiling we'll want Texture, for walls Texture2).
  • Stretch the texture by changing the "stretch u" and "stretch v" values until it looks good.
    NOTE:  For walls the default stretching usually looks really bad with Texture2, but can be easily fixed by changing stretch U to 10 and keeping stretch v at 1. Experiment with different values for the best results. Stretching can be lower than 1 as well, e.g 0.5. The more complicated the model is, the more chance there is for uvmap problems. If stretching doesn't fix it, you should create new uvmaps for the "broken" surfaces.
  • Add a normal map to the texture so that it looks very awesome [in the normal map property]. All HD textures usually come with a normalmap, with the extension _NM in the filename. Set the uvmap and stretching properties the same way you did the base texture. This step is optional, but helps make your texturing look better, especially with lighting added.
  • Repeat same process for walls/ceiling and you should be finally done! Press E to exit to the world editor. If you wish to edit your model again, select it and press E to enter mesh editor. You may also want to save your model for future use, although it is not necessary with models that aren't reused - but saving helps you keep track of your architecture, and you can save them in various phases if you run into problems.