During the past few days, I was able to push the development of the upcoming
Ca3DE Material System another great step forward.
In preparation for switching the Ca3D-Engine core to use the new MatSys for all
rendering, I converted this week the old TerrainViewer to use the MatSys. In
parallel, I added features to the MatSys that were still missing but required
for the rendering of huge terrains. This has partially been very difficult due
to the special nature of terrains: Their need for automatically generated
texture coordinates, specific texture wrap modes and the combination of terrain
and detail textures all have to be mastered by the MatSys.
Therefore, I took the large-scale approach for a solution:
- Added arbitrary wrap mode support to the "map compositions" that can be
specified in the cmap material scripts.
- Added general-purpose rendering parameters that can be set in CaWE, by
(future) entity scripts, and by engine and MOD code. These parameters are
accessible in the cmap files.
- Added general-purpose shader parameters that the cmap scripts can set
in order to control the shaders.
These features make it possible to change the rendering of a material according
to pretty much
anything, e.g. the remaining ammo level in a weapon,
the health status of a player, the waveform of the sound that is currently
playing, ... options are endless.
Details will be presented in the documentation that comes with the next New
Materials Development Kit.
Oh, and the terrain rendering works now, too: