How to make rendering prettier?

Michalis Kamburelis edited this page Jul 30, 2018 · 3 revisions

This page is the opposite of the manual page How to optimize your games :)

  • Use bump mapping (by CommonSurfaceShader.normalMap or Appearance.normalMap). In general, use CommonSurfaceShader with various optional texture slots it offers: diffuse texture, specular texture, emissive texture, normal map etc. See ComonSurfaceShader documentation. Our Blender exporter can export X3D or castle-anim-frames files with the CommonSurfaceShader node set up.

  • Use engine effects like shadows and screen effects.

  • Set shading to Phong. You can set shading per-shape, but usually it's easier to just set Scene.Attribtues.PhongShading := true for the whole scene (TCastleScene instance).

    Note that Phong shading is activated automatically (for a particular shape) when you use bump mapping or shadow maps or some other engine effect. So you may not need to actually request it explicitly.

  • Turn on SeparateDiffuseTexture. This makes lighting calculation prettier, as the diffuse texture really affects only the diffuse lighting term, and it doesn't affect e.g. specular highlights.

    Some day PhongShading and SeparateDiffuseTexture will be the default in Castle Game Engine (after some major release version bump, like 7.0 or 8.0). But we want to optimize them more before doing this.

  • Use post-processing, called "screen effects" in our engine: https://castle-engine.io/x3d_extensions_screen_effects.php

  • Coming soon: You will be able to use physically based rendering (PBR), see my plans.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.