Hi everyone, Wanted to share with you my work-in-progress terrain system for Unity. I know there are several similar out there, each with their individual advantages but also limitations (in performance, features, quality, dependencies and so on) that only make them suitable to certain scenarios. In the recent years various aspects of terrain rendering have seen improvements, both academical as well as empirical, however currently there's no single system that puts all of them together. My goal is to create a general purpose terrain system, which can serve as a good alternative to Unity's built-in terrain. It would incorporate as many state-of-the-art solutions as possible, but remain practical above all. It's worth the effort because typically a game's terrain visually occupies most of the screen (and therefore strongly impacts the player's impression of the game), costs a lot of memory / GPU (between all the textures and meshes, including vegetation) and takes a lot of time to design and edit (for all maps/levels). Therefore it's expected that any terrain system that can give an improvement in any of the above areas, without detracting from others, would give a significant payoff. Here's what I've done so far: * Geometry: this is a voxel terrain, but with a new contouring technique that allows precise control over the position of each vertex in the generated mesh. As such it allows mixing smooth and sharp surfaces as well as a wide range of brushes. Disk usage is on par with plain mesh representations as only surface voxels are persisted in a compact format. * Brushes: basic "cube" + "sphere", "grow", "smooth" and direct vertex control. More interesting brushes are possible. Brushes can be used both inside Unity's editor as well as at runtime. * Details/objects: supports painting of grass, details and trees similar to Unity's terrain. Objects with a mesh can optionally be merged automatically into patches, to minimize draw calls. Supports more prefab types than Unity's terrain, for example particle effects. * Texturing: allows up to 64 textures per terrain (and up to 2 per voxel), each with diffuse, height, normal, emissive and specular maps. These are automatically atlased and rendered with a single draw call per chunk. * Heightmap blending between textures. Having two textures per voxel allows creating decals, for example pavement stones sticking out of dirt. * Persistence/streaming/infinite terrain: Maximum theoretical terrain size is 2^69 voxels on each dimension. As such a large terrain can't fit in a Unity scene it is stored in a separate file and gets streamed in/out of memory as the camera moves. * Support for combining generated and hand-edited terrain. Only hand-edited portions of the terrain are persisted, which allows creating maps with hand edited detail in areas of interest, and generated detail for large filler areas. (However no terrain generators are provided yet). The code is C# only, with no native DLL dependencies, and it requires Shader Model 3.0 but not DX11. In terms of performance I'm targeting equal or better performance than Unity's terrain, as far as direct comparisons are possible. The following work is still in progress: * Far LOD: support for multiple levels of detail is not finalized, which means far view distance is not working yet. * Near LOD: sparse representation and ability to edit at different LODs would allow high-resolution details for close-ups. * Ambient occlusion, updated at runtime. * More brushes: simple ones such as raise/flatten/stairs/ramp/copy+paste terrain, or more difficult ones like CSG (boolean operations on mesh) * Import from Unity terrain * Terrain generation mechanism. There are nice terrain generation tools out there, so if possible I'd prefer to integrate with an existing asset that allows generation at runtime rather than build a new one. I'd appreciate any feedback on which points you consider more important, or if you have other ideas not listed here. I'm also interested in the scenarios for which you need your terrain, and trade-offs you're forced to make. For your specific game, what are the features that an ideal terrain would support?