Insert detailed DEM, merging and mesh simplification
💬 0 replies
Insert detailed DEM
Inserts heights from a GeoTIFF (any coordinate system) into the mesh like Ortho4XP: detail only in the mesh, the DEMS raster stays unchanged, so objects, roads and forests sit on the mesh. The area boundary and water do not change; in the blend band the DEM blends smoothly. The Insert detailed DEM section of the Terrain & water panel.
Local detail only – not a whole tile The Studio only inserts the GeoTIFF heights into the mesh of a finished DSF. Everything else is taken over from the original DSF and not recomputed: textures, water and its levels, shores and beaches, roads (burn and grades), airports (flat surfaces) and the DEMS rasters. The Skip roads and Skip airports masks only protect them from the DEM, they do not recompute them. When RenderFarm generates a tile it computes all of this together with the DEM and keeps the point budget. One operation: recommended up to 40 km², at most 100 km²; a tile can have more places, each one separately. Build a whole tile from a new DEM in RenderFarm.
GeoTIFF – the full path to the raster (GeoTIFF, VRT…). With RenderFarm it offers Suggestions from the INPUT-elevation folder. The info (coordinate system, resolution, footprint) loads by itself shortly after you enter the path – Loading… shows meanwhile; Reload reads it again.
- Mosaic of several files:+ Another file adds another sheet (e.g. a neighbouring or overlapping LIDAR tile), Add all adds all suggestions for the tile. The sheets are combined into one grid at the resolution of the finest file; where they overlap, the file higher in the list wins (the main GeoTIFF is first, the Up / Down arrows change the order), another coordinate system is reprojected to WGS84. After loading the whole mosaic is checked: the summary n files · CRS · resolution, overlaps, gaps and files outside the tile (not used). Below the summary is the file list: colour, size, resolution, CRS, state (✓ / outside the tile), ⌖ points the camera at the file and As region sets the region to the file extent. The extent of each file is drawn in its colour in 3D and in the window Overview, the data footprint on the tile in white (toggle GeoTIFF outlines). History, the tile seam and patches support mosaics (every sheet is a separate input).
Area: Draw region (clicks in 3D, double-click / Enter = done), GeoTIFF footprint, or Project window. Without an area = the GeoTIFF footprint clipped to the tile and the project window. With files in several separate places GeoTIFF footprint takes all the places at once (no region is drawn). The clipped area may have at most 100 km², over 40 km² the Studio warns (see Limits below).
Target: height tolerance (inserts points until the mesh deviation from the DEM drops below Max vertical error, e.g. 0.2 m) or tolerance + at most N points (Max points = a cap, worst places first).
Blend band – the width of the smooth transition at the boundary, water and tile edge (0 = sharp edge).
Keep textures – texture borders stay as forced edges; Transitions (TRNS) – rebuild on the new triangles, or drop; Normals – auto (like the source DSF), compute from mesh, zero.
DEM vertical offset – added to all DEM heights (e.g. ellipsoid → geoid). The preview shows DEM − old (median); a large value usually means a different vertical datum. No limits temporarily turns off the time limit (600 s) and the 400-round cap and processes the DEM at full resolution even beyond free memory, up to total RAM minus 4 GB (see Limits below).
Optionally Where not to insert the DEM (masks): Skip airports (airport boundary, or runways and pavements only; Margin), Skip roads (corridor by the .net width + margin), Water (always unchanged; a margin > 0 also keeps a land strip along water), Custom masks (Draw mask). At a mask edge the DEM blends with the same band. Masks are orange in 3D.
Preview runs as a job with progress by phases and rounds (Cancel stops it). Result: Project · DSF (in which project and on which terrain mesh the preview was made; opening another project discards the preview, changing the terrain – Properties, Continue from it, the switch on opening – makes it outdated), vertices, triangles, transitions, Error max / mean, deviation from the DEM, smallest angle; views mesh before, mesh after, error map; the 3D surface button shows a shaded surface before / after / DEM. The After edit button in the 3D view shows the terrain after the insert textured like the original terrain (see Terrain after the edit in the 3D view), ⇆ Compare puts it next to the original.
Write new DSF. Verification: reader, DEM, DSFTool (if set), raster unchanged, original pools identical, cracks, orientation.
GeoTIFF across a tile boundary (seam). When the insert area – drawn, or the GeoTIFF outline – reaches into a neighbouring tile, Also edit neighbouring tiles (seam) appears above the options (on) together with a choice of the DSF for each neighbouring tile: the list of versions of that tile (Laminar, our output, Studio edits, packages), terrain meshes only. Preselected is the DSF from the same package as the project terrain (e.g. your edited pair of tiles), otherwise the one X-Plane draws for the tile; Other path… accepts a path to a DSF. The DEM is then inserted into all affected DSFs (at most 4) and the vertices on the shared edge get the same position and height from the DEM in both – no step and no band at the boundary. Without a drawn area the whole GeoTIFF outline in the affected tiles is used (not clipped to the project window). The preview lists the seam points, the write creates a new DSF for each tile and verifies the seam (shared vertices, largest height difference). Continue from it works for the project tile; the new DSF of the neighbouring tile is in DSF › Edits and in that tile's project you pick it in Properties › Base. Both belong in X-Plane. With the seam off only this tile is edited as before and the detail blends towards the edge within 100 m.
Limits
Large area: the tool is for local detail. One operation inserts at most 100 km² (the area clipped to the tile and the project window counts); the Studio refuses a larger area – also when you give no area and the GeoTIFF footprint is used. Over 40 km² the panel and the preview warn that it is a lot for one operation. A tile can have more places, each one as another edit. For a large territory feed the DEM to a generator (RenderFarm) and regenerate the tile.
Many files: the number of files in a mosaic is not limited; over 400 the Studio warns that loading and checking take longer. Only the sheets inside the insert area are used.
Files far apart: the mesh and the DEM grid span the envelope of the whole region. Places tens of km apart at once = a huge grid and the DEM is coarsened when read (e.g. from 1 m to 3.7 m); the mosaic summary and the preview say so. Insert such places one by one, each with its own settings (tolerance, blend band, masks, offset…): As region at the file → settings → Preview → Write new DSF → Continue from it – new version as the base, then As region at the next file and its settings. Without Continue from it the next write would start from the original DSF and the previous place would not be in it.
Large increase: above 1 million new vertices or 500 thousand rebuilt transition triangles the Studio warns – the DSF gets bigger and X-Plane loads it slower. Shrink the area, raise the tolerance or choose "drop" for transitions.
Memory: when the full DEM resolution does not fit into free memory, the preview is computed coarser (with a bigger step) and the result says so explicitly. For full accuracy shrink the area, close other programs, or turn on No limits.
Time: the preview and the write insert points for at most 600 s and 400 rounds; then they stop (Stopped: time limit) and the deviation from the DEM may stay above the tolerance. No limits (not remembered) runs until the mesh reaches the tolerance – even tens of minutes – and uses memory up to total RAM minus 4 GB (Windows may page, other programs slow down). The Studio refuses it while RenderFarm runs. Cancel still works, it stops after the current round.
Sharp edges: at vertical steps in the DEM (walls, embankments, ramparts) and at texture borders with Keep textures the tolerance may not be reachable everywhere – points at fixed edges and texture borders and closer than 0.25 m to a vertex cannot be inserted. The preview and the write verification report this as a warning with the actual deviation from the DEM, and the write passes.
DEM insertion was verified in X-Plane on the demo (Saint-Denis).
Merge with another DSF
When you have several DSFs of the same tile and each has a better place (e.g. someone else's with an inserted lidar), the Merge with another DSF tool (Terrain & water mode) transfers the terrain mesh of the second DSF inside an area into a copy of the project base DSF. There can be several places, each from a different DSF – you build a list of them and write it at once into one new DSF. All DSFs are only read; the result is a new DSF in the edits cache.
Second DSF – a DSF of the same tile from the catalogue (Global Scenery, scenery folders, Studio edits).
Area: Use at the Densified places of the second DSF (area = the place outline expanded by the blend band + 10 m, the whole detail stays), or Draw area in 3D (click = point, double-click / Enter = done).
Add to list – the area with the chosen second DSF is added as another place to the Places to merge list. Then choose another second DSF or area and add another place. Add all places adds all densified places of the chosen second DSF at once. Each place has its own outline colour in 3D (the same as the square in its row).
Order – places are written top to bottom. Where areas overlap, the place lower in the list wins (mesh and scenery); change the order with the ↑ ↓ arrows, × removes a place. The row says which earlier place it overlaps.
Scenery from the second DSF (for each place separately) – the Studio counts the items in the area by kind (autogen, objects, facades, forests, draped polygons, lines, object strings) as base → second DSF. A checked kind is taken from the second DSF inside the area: items of that kind whose centre lies in the area (an object by its position, an area by its centroid, a line by the centroid of the line) are removed from the base and taken from the second DSF. Each item thus belongs to one side of the boundary only – nothing is doubled. An unchecked kind stays from the base. Default: nothing checked (terrain only).
Blend band (30 m by default, one for all places) – second DSF triangles are transferred only inside the area shrunk by the band; in the band the mesh joins the base (triangulation between the base boundary and the transferred mesh boundary, base texture).
Write merged DSF – one job with progress (Merging place 2/5…, Cancel). For each place the mesh (vertices with heights from the second DSF, also from its raster), textures and texture transitions (TRNS) are transferred, then the chosen scenery kinds. Roads and rasters stay from the base. Without a list the button writes only the area in progress (terrain only).
Verification after each place: cracks, areas, orientation, vertex copy heights, rasters and tile edge unchanged, heights of all transferred vertices against the second DSF, removed and added scenery items, DSFTool. The result lists triangle and scenery item counts for each place. Continue from it – new version as the base goes on from the result.
Limits
A mesh with a projected texture (ortho s,t, Ortho4XP) cannot be transferred from the second DSF yet – the Studio says so.
At most 100 km² per place (the list marks a larger place and Write does not start), at most 32 places at once. A large dense area takes minutes (16 km² with 2 million triangles about 7 minutes); each place is written and verified separately.
Scenery: items of the second DSF with curves or custom UV are not transferred (the row shows them as not transferable); parts that are neither in the library nor in the project (from the second DSF package) are not found by X-Plane without that package – the row warns about them. Roads from the DSF network are not transferred.
A project with taken-over base scenery: scenery from the second DSF cannot be chosen (the take-over would no longer match). Merge the terrain, Continue, then take the scenery over again.
Simplify mesh
Removes base mesh points inside a drawn area (sea, flat fields) only where the terrain surface changes by at most the tolerance. No new points are created, kept points stay byte-identical. The Simplify mesh section of the Terrain & water panel.
Preview: mesh points, triangles, transitions before → after, deviation max / mean; views mesh before / after, deviation map, protected vertices; the Not removed because list (area boundary, shore, texture border, sharp break, deviation above tolerance…).
Write to a new DSF.
Measure project window (with a window over 0.1° Measure the area at the camera, the region button is then Area at the camera) compares several variants (textures protected, texture borders may vanish, an upper bound without textures) – how many points and transitions could be removed. On generated tiles the biggest saving is usually in TRNS transitions.
Not verified: mesh simplification in X-Plane Simplification is verified on the mesh (deviation within the tolerance, kept points unchanged, mesh checks). Its look in X-Plane has not been verified yet – in the area check mainly texture transitions and the shore.
Based on the RF Studio manual (F1 › Manual, version 0.11.2-beta). Post your questions and experience in this thread.
Insert detailed DEM
Inserts heights from a GeoTIFF (any coordinate system) into the mesh like Ortho4XP: detail only in the mesh, the DEMS raster stays unchanged, so objects, roads and forests sit on the mesh. The area boundary and water do not change; in the blend band the DEM blends smoothly. The Insert detailed DEM section of the Terrain & water panel.
.netwidth + margin), Water (always unchanged; a margin > 0 also keeps a land strip along water), Custom masks (Draw mask). At a mask edge the DEM blends with the same band. Masks are orange in 3D.GeoTIFF across a tile boundary (seam). When the insert area – drawn, or the GeoTIFF outline – reaches into a neighbouring tile, Also edit neighbouring tiles (seam) appears above the options (on) together with a choice of the DSF for each neighbouring tile: the list of versions of that tile (Laminar, our output, Studio edits, packages), terrain meshes only. Preselected is the DSF from the same package as the project terrain (e.g. your edited pair of tiles), otherwise the one X-Plane draws for the tile; Other path… accepts a path to a DSF. The DEM is then inserted into all affected DSFs (at most 4) and the vertices on the shared edge get the same position and height from the DEM in both – no step and no band at the boundary. Without a drawn area the whole GeoTIFF outline in the affected tiles is used (not clipped to the project window). The preview lists the seam points, the write creates a new DSF for each tile and verifies the seam (shared vertices, largest height difference). Continue from it works for the project tile; the new DSF of the neighbouring tile is in DSF › Edits and in that tile's project you pick it in Properties › Base. Both belong in X-Plane. With the seam off only this tile is edited as before and the detail blends towards the edge within 100 m.
DEM insertion was verified in X-Plane on the demo (Saint-Denis).
Merge with another DSF
When you have several DSFs of the same tile and each has a better place (e.g. someone else's with an inserted lidar), the Merge with another DSF tool (Terrain & water mode) transfers the terrain mesh of the second DSF inside an area into a copy of the project base DSF. There can be several places, each from a different DSF – you build a list of them and write it at once into one new DSF. All DSFs are only read; the result is a new DSF in the edits cache.
Simplify mesh
Removes base mesh points inside a drawn area (sea, flat fields) only where the terrain surface changes by at most the tolerance. No new points are created, kept points stay byte-identical. The Simplify mesh section of the Terrain & water panel.
Measure project window (with a window over 0.1° Measure the area at the camera, the region button is then Area at the camera) compares several variants (textures protected, texture borders may vanish, an upper bound without textures) – how many points and transitions could be removed. On generated tiles the biggest saving is usually in TRNS transitions.
Based on the RF Studio manual (F1 › Manual, version 0.11.2-beta). Post your questions and experience in this thread.