Unit CastleTerrain
Functions and Procedures
Constants
Variables
Description
Terrain (height map) components.
TODO: Terrain API is not finalized yet, there may be significant incompatible changes to this unit in the future. Big TODOs:
Edit terrain heights in the CGE editor.
Possible approach: turn any data (including TCastleTerrainNoise) into TCastleTerrainImage, then add editing tools to just change this image.
Alternatively user could edit a TCastleTerrainImage that is combined with TCastleTerrainNoise – this seems a powerful but uncertain feature, i.e. in the end it means you cannot directly edit the output of TCastleTerrainNoise, so it may be less comfortable (although it would allow to later regenerate TCastleTerrainNoise and keep the edits – effectively they would work like Blender modifier.)
Edit textures influence using splatmap. Just a texture where RGBA are weights for each texture.
Implement this, and also add a brush to edit splatmap in CGE editor.
The existing way to determine layers influence can then be used as just a nice (optional) way to auto-generate initial splatmap.
Adding vegetation to the terrain.
Adding grass and other small things (that must be placed in large batches and density should be dynamic).
Adding trees, boulders and other large things (their density should also be dynamic for fast rendering, but at close distance they are just 3D models).
Add non-trivial rendering algorithm. Right now it is really the simplest possible approach to generate a mesh from heights with a simplest shader mixing a few texture layers.
Smaller TODOs:
TCastleTerrain.Subdivisions should be TVector2Cardinal. Needs introducing TCastleVector2CardinalPersistent.
Enable normalmaps for each layer.
? TCastleTerrain configurable textures number. Unsure – hardcoding current 4 layers sucks, but also it makes sense for coming RGBA splatmap.
? TCastleTerrain Use GridCount, GridStep instead of Subdivisions, Size? See wyrd-forest arguments.
? TCastleTerrain add property to define material type, like in primitives - unlit, physical, phong. Wait with this for our final CGE components to define materials and effects, TCastlePhysicalMaterial, TCastleShaderEffect – they will determine how to nicely expose it here.
Uses
Overview
Classes, Interfaces, Objects and Records
Types
Description
Types
TNoiseInterpolation = (...); |
This item has no description. Values
-
niNone
-
niLinear
-
niCosine
-
niSpline
|
TTerrain = TCastleTerrainData deprecated 'use TCastleTerrainData'; |
Warning: this symbol is deprecated: use TCastleTerrainData This item has no description. |
TTerrainImage = TCastleTerrainImage deprecated 'use TCastleTerrainImage'; |
Warning: this symbol is deprecated: use TCastleTerrainImage This item has no description. |
TTerrainNoise = TCastleTerrainNoise deprecated 'use TCastleTerrainNoise'; |
Warning: this symbol is deprecated: use TCastleTerrainNoise This item has no description. |
Generated by PasDoc 0.16.0-snapshot.