This page is the opposite of the manual page How to optimize your games :)
Use Physical-Based Rendering (PBR).
The easiest way to use PBR is by using glTF format for your assets. glTF by default uses PBR materials. You can design and export glTF with PBR e.g. using Blender.
You can also read about PBR in X3D. In short: Michalis has designed PBR in X3D 4 to match glTF PBR exactly.
Use bump mapping. In Blender, just set a normalmap texture (texture that affects normal vectors) and export to glTF.
Internally we do bump mapping by
PhysicalMaterial.normalTexture X3D fields.
Use other textures (occlusion texture, emission texture, specular and shininess texture (Phong), metallic/roughness texture (PBR)) to provide interesting features varying over the surface.
Material (Phong) or
PhysicalMaterial (PBR) in X3D 4 for various optional texture slots to affect various additional material parameters.
Use animation blending when appropriate. To do this, set
TCastleScene.DefaultAnimationTransition to non-zero on your scene, or use
TPlayAnimationParameters.TransitionDuration set as non-zero.
Use linear color space. It is automatically used with
PhysicalMaterial, so it is automatically used with glTF models using PBR. You can set
ColorSpace := csLinear to just use it always (also with Phong lighting or unlit materials).
This makes calculations more correct with respect to reality. This should be turned "on" from the begging of working on your graphic assets — as it necessarily affects to colors of everything.
Try and use one of the
tone mapping options if you feel they improve your colors.
To improve this documentation just edit the source of this page in AsciiDoctor (simple wiki-like syntax) and create a pull request to Castle Game Engine WWW (cge-www) repository.
Copyright Michalis Kamburelis and Castle Game Engine Contributors.
This webpage is also open-source and we welcome pull requests to improve it.