====== Terrain ====== [[:documentation:terrain:procedural_terraingeneration|Terrain Generation]] [[:documentation:terrain:hydrolic_errosion_and_river_creation|Hydrolic errosion and River Creation]] Polygonal generation! [[http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/|http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/]] found this link with some nice ideas (not much explaining though) http://procworld.blogspot.be ===== Client ===== Structure todo Note: currently the loading from disk for the terrain resides in Editor\Temp\Terrain\TerrainFullData.cs in the LoadFullData function. Long term: add dynamic loading (and preprocessed loading) from disk for the heightfields. Idea: maybe it is possible to buffer heightfields in ram, since the real overhead here is running them in physX? **BELANGRIJKE KLASSE:** ServerclientOud/TODO/Wereld/QuadTree deze bevat info over de oude physx quadtree ==== TerrainBlockHeightfieldBuilder ==== This class Creates a PhysX heightfield (with stilldesign.physx wrapper), from a scene and TerrainFullData for a terrainblock. It returns the actor created. **Note:** Maybe this class should be static? ==== TerrainBlockClientPhysics ==== Handles the Client Physics logic of a terrain block. Creates and destroys the physics actor when required by the client physics. IMPORTANT! This class assumes that the terrainblock fits perfectly into one quadtreenode. ==== TerrainClientPhysics ==== This class represents a terrain and its client physics functionality. One of these represents one terrain, and ensure that physics is enabled correctly in the Client Physics. It creates the TerrainBlockClientPhysics objects, places them in the client physics engine. It is also responsible for supplying dynamic loading methods for the physics. TODO: Implement the creation of the actor by using a Factory passed by the constructor. This moves the creation/caching logic to the outside. ===== Editor - World Editor ===== **WARNING: this part is probably deprecated** Todo: Hier een modes maken waarin de gpu paint op height and weight textures (ipv dat de processor dat doet) Vervolgens gebruikt een andere shader die als input om in de editor te renderen. De normal map kan ook gemaakt worden met behulp van de gpu. De uitbreiding aan de World Editor voor het terrain bestaat uit: ==== TerrainEditorModule ==== Dit is de application logic voor de Terrain Editor, en zorgt ervoor dat de terrain editor doet wat hij moet doen in The Wizards Editor. Huidige functies: World Editor terrain tools ==== TerrainWorldEditorGUI (was: TerrainWorldEditorExtension) ==== De GUI voor de Terrain Editor functionality in de World Editor. Plaatst de gui controls in de WorldEditor. Alle bindings aan de tools zitten in de tools, GEEN REFERENCES NAAR TOOLS. References: alleen WorldEditor ==== Tools: (TerrainCreateTool, TerrainRaiseTool ,…) ==== Verschillende tools voor de World Editor References: Verwijzen naar de World Editor?, naar de GUI extension en de TerrainService?. ==== TerrainEditorForm ==== Dit is het formulier dat de TerrainWorldEditorGUI gebruikt om de DevExpress interface te laden. De effectieve controls zitten hier op ==== TerrainWorldEditorExtension ==== Deze klasse wordt gebruikt door de TerrainEditorModule, en zorgt ervoor dat de World Editor functionaliteiten van de Terrain Editor in de World Editor worden geladen. De verschillende tools: ==== TerrainCreateTool ==== This tools enables the user to click places on where to place a terrain. It uses the TerrainService? to do the action placing. And the editor to get EditorTerrains (this is bad practice). ==== TerrainRaiseTool ==== **DESIGN ERROR:** Currently the terrainraisetool has a method that raises the terrain independently from the editor, and a private method that raises the terrain optimized for the editor. This is redundant code, and this issue should be fixed! ==== TerrainPaintTool ==== TODO (describe)