• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

doc/dev/H11-May-2014-166143

src/H03-May-2022-130,621105,895

READMEH A D11-May-20144.3 KiB7859

tesseract_unixH A D11-May-20141.5 KiB6645

README

1Tesseract is a fork of the Cube 2: Sauerbraten engine. The goal of Tesseract
2is to make mapping more fun by using modern dynamic rendering techniques, so
3that you can get instant feedback on lighting changes, not just geometry.
4
5No more long calclight pauses... just plop down the light, move it, change its
6color, or do whatever else with it. It all happens in real-time now.
7
8Tesseract removes the static lightmapping system of Sauerbraten and replaces
9it with completely dynamic lighting system based on deferred shading and
10shadowmapping.
11
12It provides a bunch of new rendering features such as:
13
14* deferred shading
15* omnidirectional point lights using cubemap shadowmaps
16* perspective projection spotlight shadowmaps
17* orthographic projection sunlight using cascaded shadowmaps
18* HDR rendering with tonemapping and bloom
19* real-time diffuse global illumination for sunlight (radiance hints)
20* screen-space ambient occlusion
21* screen-space reflections and refractions for water and glass (use as many water planes as you want now!)
22* screen-space refractive alpha cubes
23* deferred MSAA/CSAA, subpixel morphological anti-aliasing (SMAA 1x, T2x, S2x, and 4x), FXAA, and temporal AA
24* runs on both OpenGL Core (3.0+) and legacy (2.1+) contexts
25* Oculus Rift support
26
27Editing:
28
29To 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.
30
31To make cascaded shadowmapped sunlight, just use the normal sunlight commands:
32sunlight
33sunlightyaw
34sunlightpitch
35You can also set sunlightyaw and sunlightpitch from your current direction with the following command:
36getsundir
37
38You can control the diffuse global illumination of sunlight using the following parameters:
39giscale - scales the contribution of indirect light
40gidist - limits the distance which indirect light travels (smaller values are more intense, but higher values allow farther travel)
41giaoscale - controls the contribution of atmospheric light
42skylight - controls the color of atmospheric light
43
44Screen-space ambient occlusion affects mostly ambient light and to a lesser degree sunlight,
45but it does not affect point lights. If you want to make use of SSAO in your map, just use
46the ambient command to set an appropriate ambient light color/intensity.
47
48To make refractive alpha cubes:
49First mark the cubes with the alpha material. Use valpha or texalpha to set the transparency level as normal.
50Then use either of the following commands:
51vrefract K [R G B]
52K 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.
53The direction of the distortion is taken from the normal-map of the texture.
54R G B are optional and specify a color for the refraction, with each component being on a scale of 0 to 1 as well.
55
56After editing operations your map may be full of small cubes and triangles, and you will notice that your map looks faceted.
57To fix this you still need to use the calclight command, however, it no longer generates lightmaps anymore.
58It just does a remip optimization pass as well as calculates smoothed normals to make things look better.
59Eventually this may be done differently using some sort of background optimization while editing.
60
61To make decals:
62
63newent decal SLOT YAW PITCH ROLL SIZE
64
65If 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.
66The slot refers to a decal slot in the map configuration, starting at offset 0.
67The size is specified in cube units.
68
69To make decal slots:
70
71decelreset // functions like texture reset, clears all decal texture slots
72
73setshader bumpspecmapdecal  // shaders work like for world shaders, but with the -decal suffix instead of -world
74texture decal "diffuse.png" // all decal slots start with the "decal" sub-slot instead of "0", and this texture must have an alpha-channel
75texture n "normals.png"
76texture s "spec.png"
77
78