This tutorial explains how to create a very simple world with basic texturing and lighting.
If you have previous experience with moving around in Serious Editor 1/2/3, you can skip this section. Otherwise, you should remember these shortcuts:
- To move your view, hold down Space and:
- Double-click LMB to some point in the scene will "teleport" your current view focus to observe that point.
- Hold down LMB to move your view left/right/up/down with the mouse.
- Hold down RMB to zoom your view closer/farther to the current focus point.
- Hold down LMB+RMB to move your view with the mouse (orbiting around the current focus point).
- Hold down Space+Ctrl and double-click LMB or RMB to focus some point and at the same time zoom in/out.
- Press Esc to toggle "Fly Mode" in which you move around with FPS commands:
- Mouse to look around,
- W , S , A , D to move forward/backward/left/right,
- Space , F to move up/down,
- mouse wheel to change movement speed.
- From the menu, select File>New>World
- Point at the middle of the grid and press Insert key to insert a Static Model entity under mouse pointer. It will appear as a green box. This symbolizes an empty mesh.
- Press Shift+E, then E (or alternatively double click on the green box) to enter "Mesh Editor".
- Press Shift+X to start the "PrimitiveBox Tool", then click and drag across the grid to create a floor polygon.
- Press Q to show the "Tools" panel.
- In the dialog, unfold Box Guide and inside it then Box Center and Box Size. Set the x,y,z values for center to 0,0,0 and width,height,length for size to 16,0,16.
Important: Make sure to press Enter to confirm the values, and then Esc to release focus to the mouse pointer!
- Press ~ (the "tilde") key to accept the box and drop the tool.
- Roll the mouse wheel down twice until "Shader" rendering mode is selected (in the second drop down at the top left of view window). Since there is no texture yet, the floor appears as flat gray with wireframe on top of it.
- Point at the floor and Ctrl+Alt+LMB click on it. It should show the "Layers" panel and automatically unfold Polygon maps>Default.
- Edit the "Default" polygon map property in the Layers panel. (By clicking on the "(none)" label on the right of the "Default" polygon map.) Pick New>ShaderPreset from the menu.
- Add new configuration. (By clicking on the small yellow plus sign on the right of the "Configurations" property.)
- Edit the "Shader" property. Browse for the "Standard" shader.
- Under the shader's "base texture" property, browse for this texture "Content/SeriousSamHD/Textures/Generic/Ground/StoneTiles_CM.tex".
Hint: while browsing for textures (or models), you can point at a file in the file browser and hold F3 to see a preview.
- Under the shader's "base uvmap" property, select "Texture" from the drop down. You should see the texture now. (To have a texture visible, you need both a texture file and a UV map.)
- Set the "base stretch U" and "base stretch V" both to 10, to make the texture tile more (the floor is 16 meters big, so the stones should appear smaller).
- Press E to exit from Mesh Editor back to the World Editor.
- Point on the floor and press Insert to add one more Static Model entity. Use the 'Q' shortcut to invoke Tools panel and reposition the new entity to 0,0,0.
- Enter mesh editor with the new entity and use the PrimitiveBox Tool to create a box sized 4x4x4 meters positioned at 0,0,0.
Note: The mesh coordinates are in world space, so in this you want to keep the new geometry near the entity's handle, or otherwise you'd create an entity that behaves "off-center" when rotating.
- Repeat the texturing steps above to give it the same texture as the floor. This time you will need much smaller UV stretch (2,2 will be ok), because the object is smaller at UV map is fitted to the object size by default. (You can recreate any uv map differently if you like - see SED3 UV Mapping ).
- Press Ctrl+A to invoke the "Align To Origin" tool align the box's mesh so it doesn't protrude through the floor. (The default settings do exactly that.)
- Exit back to World Editor, and use Ctrl+LMB to "teleport" the new entity to some other place on the floor.
- Press Alt+3 to show the EntityList panel.
- Find the "Distant Light" entity (it's in the "Lights" folder). Drag-and-drop it to the world. The world will now become mostly black. This is normal - without any lights engine shows all objects as "full bright". Now that a light is in, it has to be tuned to give proper lighting.
- Press Y to activate View From Selection tool. You are now viewing from the light.
- Enter "Fly Mode" to move the object you are now viewing from (the light).
- Fly backwards and up, while rotating left and down, until you have the entire floor inside your view, viewing it from diagonally from above.
- Press Esc to exit the "Fly mode" and ~ to drop the View From Selection tool.
- Press J to activate the Rendering options menu and make sure that "Dynamic Shadows" are enabled.
Notice that the shadows are pitch black. That is because there is no ambient on the scene. The best way to get a realistic ambient is to bake Global Illumination (GI) solution lightmaps.
Lightmaps and GI Solver
- Select the box entity and enter Mesh Editor.
- In the lower right part of the view there are buttons "VM", "PM" and "LM" (meaning Vertex Maps, Polygon Maps and Layer Maps). Make sure that "VM" is pressed.
- Further right, there are buttons "M", "W", "T" and "C" (meaning Morph, Weight, Texture and Color). Make sure that "T" is pressed.
- Press Num 8 to show its UV map. There is only one square there, because all six faces are mapped to the same area of the texture. (Since no texture is selected in the drop down to the right, the only available UV map - the default one named "Texture" is shown.)
- From that drop down, pick Actions>Create New Vertex Map... The Mapping tool dialog will appear.
- Select the "Atlas" tab in the dialog.
- Type "Shadow" in the "Target UV Map" box and hit OK. You have now created an UV map used for lightmaps on that object.
- Exit to the world editor and repeat the same process with the floor.
- Exit to the world editor. Press Num+6 to switch back to the normal rendering preset.
- Select both objects (the floor and the box) by holding Shift and clicking on each of them.
- Make sure the Entity panel is visible (Toggled with Alt+1). You are now editing both entities at the same time.
- In the Shader Modifiers property, add a new modifier of type "CLightmapOvenModifier".
- For its "Size U" and "Size V" properties type 256 and 256. (Make sure you do Enter to confirm and Esc to release focus.)
- Deselect the entities. (Just so that the blue selection overlay doesn't obscure the view.)
- Press Alt+G to invoke the GI Solver baking parameters.
- Leave all parameters at default and just hit OK.
- A progress bar will appear at the very right-bottom corner of the entire editor application window. When that is done, you will have GI lightmaps on the world!
There is now some ambient from light bounces of the sun, but background influence is missing.
- From the Entity list window (Alt+3) find "Geometry/Cube background" and drag-and-drop it to the world.
- Using the Tools panel (Q) position the background somewhere far below the world (e.g. 0,-1000,0)
- Using the Entity panel (Alt+1) add a Skylight Generator to the background.
- Press Shift+B to bake the current settings of the Skylight Generator into the background (defaults are fine).
- Adjust the "Modulator" values for the background to 0.05.
- Press Alt+G and then OK to bake the GI solution with background included.
Decorative Objects and Light Probes
- Insert another Static Model entity somewhere on the floor.
- For its "Model" property (using Alt+1 Entity panel), browse the following model: Content/SeriousSamHD/Models/SouthAmerica/TwoHeadSnake/Snake.mdl .
Notice that the model is darker than the surroundings. This is because it doesn't have a lightmap, so it cannot receive GI influence. Dynamic models must receive GI influence through so Probe Light entities:
- From the Entity list window (Alt+3) find "Lights/Probe light" and drag-and-drop it to the world.
- Using the Entity panel (Alt+1) make sure that its Size property is set to something large. 100x100x100 will be enough.
- Press Alt+G and then OK to bake the GI solution with the probe. GI solver will generate a lighting cubemap at the probe's position which will be used by dynamic objects.
- Press T to enter test-game and play around on the level.
- When done, press Esc to exit test-game.
Making the content appear in the game
Important: To use the custom content, users must choose "Play moddable version" when launching the game.
In order for levels and player models to appear in the game, they need to have matching .nfo files. These are plain text files describing name as visible in the UI, thumbnail etc. Examples of such .nfo files can be seen inside offical .gro files. In the current version, the automatic .gro creator tool doesn't include those files, nor their dependencies (e.g. thumbnails). You need to manually add those to your .gro files fter they are created by the tool.
Take special note of the fact that a level (world) will only appear in the in-game UI if the following conditions are met:
- The level is inside a folder of an episode, and that episode has its own .nfo file, and
- The level is marked with
LOCKED="No"in its .nfo file.
If you are creating a new episode, make sure you create a .nfo file for the episode, and mark at least the first level as unlocked. (If your levels are connected, then others will be unlocked as the player plays through.)