The terrain has heightfield shapes attached to it so it collides with other objects, or the objects collide with it… Anyway, the terrain is around 20×20 km visible, but can be extended to even 250×250 km invisible/streamed from disk, because you simply add more terrain patches on the fly.
So we have the physics, a simple skybox which will evolve into a scattering solution, cubemap computed on CPU and used on a sphere as skysphere, Mie Rayleigh scattering.
The terrain texturing is now done with 4 diffuse textures, one detail normap map, but I will change it to use texture atlas for diffuse/normal/specular, this way I can have like 10 diffuse textures in one texture (stage), and same for normal and specular, and the splatting will be done in shader, we’ll have to test the performance of this approach, but it is quite appealing.
Next, after the terrain physics, I want to see some nice grass on the terrain, so the grass will be instanced on the terrain using a distribution map: Red will be used to paint grass, Green will be used to paint trees, Blue can be used to paint rocks, Alpha to paint detail objects like broken branches or soda cans.. Each channel can have its procedural parameters, like spacing, rotation,scaling,slope min/max. This system can be extended to use more than one map to generate stuff on the terrain, and you can just do something like: terrain->addDistributionChannel( someMap, CHANNEL_RED, someObjectInstancingInfo );
The grass in particular, will be culled around the camera, inside a radius, and it will fade away using alpha testing (not blending ), the grass will bend in the wind using shader driven motion, and I’ll think how I can add arbitrary forces like ship engines blowing down to the grass or helicopter’s blades. The grass blades will always face the camera, they will not be only vertically locked, actually that can be some flag for a specific channel, some sort of VERTICAL_BILLBOARDING flag.
Pictures/videos soon.
