Page MenuHomeFeedback Tracker

Commands to query and manipulate terrainvertices
Closed, ResolvedPublic

Description

New functions in diag.exe for control of terrain vertices would be very handy for different purposes including addition to ingame editor for Buldozer like terrain editing.

Example commands:

_res = getTerrainResolution; //returns size/resolution of heightmap e.g. 1024,2048,...
_grid = getTerrainGridSize; //returns grid size in m, e.g. 12.5, 6.75. _res*_grid is equal to mapsize in m
_height = getTerrainVertex [i,j]; //returns height ASL of vertex i,j where [0,0] is the bottom left vertex and [getTerrainResolution-1,getTerrainResolution-1] ist the top right one.
[i,j] setTerrainVertex _heightASL; //Selfexplained

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Feature Request

Event Timeline

dedmen claimed this task.Feb 1 2021, 5:19 PM
dedmen changed the task status from New to Assigned.
dedmen set Ref Ticket to AIII-53851.
-Ben- added a subscriber: -Ben-.Feb 4 2021, 1:17 PM
dedmen added a comment.Feb 4 2021, 3:11 PM

Nular
diag_getTerrainGrid
returns terrain grid as scalar

Unary
diag_getTerrainHeight PositionWorld
returns height as scalar
diag_getTerrainSegmentOffset PositionWorld
returns [x,y] but as segment (integer, basically pixel coordinates in heightmap)

Binary
PositionWorld diag_setTerrainHeight Scalar

dedmen changed the task status from Assigned to Feedback.Feb 8 2021, 7:22 PM
Pi closed this task as Resolved.Jun 12 2021, 4:41 PM
ZaneIndelicato added a comment.EditedOct 10 2021, 10:44 PM

@dedmen Could one use the implemented commands to also get the closest terrain vertices to a position? I know that the current set of commands get the closest point when setting or getting the height nearest to a position but I have not found a decent way to find the given points before making edits to the area. If not could you extend the feature to also allow the query of terrain vertices?