Skip to content

Map Editing Guide

Mike edited this page Sep 16, 2019 · 1 revision

Welcome:

In this guide we assume you already have experience editing maps in the Cube 2(Sauerbraten) or Tesseract engine. If not, it may be very wise to read through the following 2 links before you continue further.

Please note that some of this information is outdated, and may not always comply to the SchizoMania game engine.

How to start a new map, save, and load it.

  • /newmap to start a new empty map
  • /savemap mapname
  • /loadmap mapname

The mapname will generate two files. mapname.ogz and mapname.json.

Editing

Press E to toggle editmode

Flying speed

You can change your flying speed with:

  • /floatspeed 1000
  • /floatspeed 500 the default floatspeed is 100

Basic selection editing.

Go into editmode Left mouse click and drag to make a selection. Space to remove selection/deselect all Scroll mousewheel up or down to remove or create cubes.

Inside selection

Aim and right click inside the selection box to select a specific side. it will be indicated by a blue outline. Then right click and drag the selection box to move it around.

Changing grid size and editing the cubes.

  • Hold G and scroll to change selection gridsize
  • Hold F and scroll to increment cubes by 1/8
  • Hold middle mouse button to select edge of cubes, then scroll to push corners of cubes
  • Hold Q and scroll to uniformly push corners of all cubes in a layer of cubes

To move, copy, and paste a selection.

  • Aim at selection, press and hold left shift, move selection to new location, release left shift.
  • C to copy a selection.
  • V to paste a selection.

Lighting

Basic Point Lights

To make shadowmapped point lights, just make light entities as normal. Optionally you can control the shadowing properties of the light using attribute 5: 0 = shadows, 1 = no shadows, 2 = static shadows - world and mapmodels only (no playermodels or pickups). Shadowmaps are cached from frame to frame if no dynamic entities such as playermodels are rendered into them, so static lights (2) will generally be much faster than normal lights (0) during gameplay and should be used where possible. Unshadowed lights (1) are even faster as they further reduce shading costs, so they should also be used where possible.

Volumetric lights

To make volumetric lights: Set attribute 5 of a light entity to 4. The intensity of the volumetric lighting medium can be controlled by volscale and the color can by controlled by volcolour.

Cascaced Shadowmapped Sunlight

To make cascaded shadowmapped sunlight, just use the normal sunlight commands:

  • sunlight
  • sunlightyaw
  • sunlightpitch
  • You can also set sunlightyaw and sunlightpitch from your current direction with the following command:
  • getsundir

Control diffuse GI of the sunlight.

You can control the diffuse global illumination of sunlight using the following parameters:

  • giscale - scales the contribution of indirect light
  • gidist - limits the distance which indirect light travels (smaller values are more intense, but higher values allow farther travel)
  • giaoscale - controls the contribution of atmospheric light
  • skylight - controls the color of atmospheric light

Screen-space ambient occlusion affects mostly ambient light and to a lesser degree sunlight, but it does not affect point lights. If you want to make use of SSAO in your map, just use the ambient command to set an appropriate ambient light color/intensity.

Refractive Alpha Cubes:

To make refractive alpha cubes: First mark the cubes with the alpha material. Use valpha or texalpha to set the transparency level as normal. Then use either of the following commands: vrefract K [R G B] K is the strength of the refraction, on a scale of 0 to 1, 1 meaning distortion spanning the entire screen, 0.5 spanning half the screen, etc. The direction of the distortion is taken from the normal-map of the texture. R G B are optional and specify a color for the refraction, with each component being on a scale of 0 to 1 as well.

Texturing

Hold y and scroll mouse to change texture scroll through texture palette press F2 to open texture menu to find and select texture with mouse

How to place entities:

To place Old-School Engine Entities use /newent, however right now only these options are still valid:

  • particle
  • sound
  • decal

How to place New-School Engine entities use /newgent, the next options are possible at this moment:

  • playerstart
  • door meshname

Decals

Decal

newent decal SLOT YAW PITCH ROLL SIZE

If you don't specify the yaw, pitch, and roll, or leave them all 0, then newent will fill them with current direction you are looking at. The slot refers to a decal slot in the map configuration, starting at offset 0. The size is specified in cube units.

Decal slots:

decelreset // functions like texture reset, clears all decal texture slots

setshader bumpspecmapdecal // shaders work like for world shaders, but with the -decal suffix instead of -world texture decal "diffuse.png" // all decal slots start with the "decal" sub-slot instead of "0", and this texture must have an alpha-channel texture n "normals.png" texture s "spec.png"

Optimizing the map its polygons

After editing operations your map may be full of small cubes and triangles, and you will notice that your map looks faceted. To fix this you still need to use the calclight command, however, it no longer generates lightmaps anymore. It just does a remip optimization pass as well as calculates smoothed normals to make things look better. Eventually this may be done differently using some sort of background optimization while editing.