Tessalator Posted January 11, 2023 Share Posted January 11, 2023 I'm starting something in a new area (for me) and looking for a little help getting started. Process: Game - Land Selection Environment: World/Planet Scenario: Player is selecting a "build zone". The world is a low-res terrain with procedural "fill". 1. Player claims an area by placing a group of markers. 2. On "OK", the makers convert to a "high-res terrain mesh" matching the perimeter of the hex group. Each mesh/area is a mine, farm, city, etc. that gets altered during the game. Actions: Player selects a location on the planet and clicks This places a hex "marker". Clicking a hex edge adds another hex. Each hex can "drill down" and look at the planet - soils composition, water tables, resources, etc. Planning/Approach Questions: 1. Is the inserting of (much) higher res mesh a good approach? There may be a couple hundred of them. 2. The terrain has layers of topology (water, resources, etc.). Many of the distributions are density/concentration driven. There are resource density ("height") maps with gradual changes and "vein masks". Can I "stack" these on the layers of a Terrain and take a vertical core somehow? 3. Are there any tools/tricks for finding the (top-down 2d) perimeter (points or edges) on groups of objects? I'm not tied to these ideas. Hoping Oil and Gas users may have an industry approach to the layers. Any help appreciated. Link to comment
silent Posted January 12, 2023 Share Posted January 12, 2023 Quote 1. Is the inserting of (much) higher res mesh a good approach? There may be a couple hundred of them. It maybe suboptimal, but that's the only way to make an internals of the terrain without writing a complex voxel systems. If your camera would not see all of them at once I guess you are safe in terms of performance. Maybe you would need to create LODs if you will have GPU bottleneck somehow. Do a quick stress test to find out how these meshes affects the performance. Quote Can I "stack" these on the layers of a Terrain and take a vertical core somehow? Not sure that I understand the exact question. You can use LandscapeLayerMaps with different data density and stack them in that way that high-quality heightmaps would be blended on top of the low quality basic terrain. There are some samples available in Art Samples that demonstrates this approach. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Tessalator Posted January 12, 2023 Author Share Posted January 12, 2023 (edited) The layers idea is based on using LandscapeLayerMap and interpolation. Conceptually I have a "crust" (top plane). The normal "surface" terrain. Each mesh below it represents data at points on the world XY. Below this could be water table and bedrock. A player can take a core of this to determine things like top-soil depth. Other layers have value data (e.g., silver gm/m3). The point resolution varies, but all of these cover the same area. I can survey and "core" areas to see what is there. Manually, I can keep a collection of meshes, iterate the collection and interpolate values at any point. But this is unchanging world structure, so I would like to keep it in the world and not on the backend. Taking the term "Terrain Layer" literally, lazy me thought I might be able to use TerrainLayers. This would handle alignment, locating, and (I think) interpolation. I could extend LandscapeTerrain: [] core = landscapeTerrain.LayersAt(x, y); Edited January 12, 2023 by Tessalator Link to comment
silent Posted January 13, 2023 Share Posted January 13, 2023 I don't think that default buillt-in LayerMaps are suitable for that task, they can only affect the top-layer (visible terrain) behavior and look. 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts