Trying to apply a river mesh to sculptable terrain. In order to do so, I am wrapping a river plane against a terrain grid mesh in a 3D modelling program. It is not precise enough as the heightmap application algorithms differ between the 3D modelling program and LumenRT.
So I would like to export the LumenRT sculptable terrain into a 3D mesh file.
I've found that opening a LumenRT scene generates a terrain .bin file within a AppData temporary folder. The BIN file seems to be VUE related, but I have been unable to open it in e-on's VUE Infinite.
I've also tried to do it with Python programming, which with LumenRT 11 is now an option. Even though there is a function that spits out all altitudes of the EONTerrain, I cannot pinpoint the EONTerrain object as it does not appear in ObjectList(). Perhaps Sculptable Terrain is either not VUE Terrain or extendes the EONTerrain?
This .bin file is not a VUE file actually.What is the format of your terrain grid mesh?Is it an regular 3D object (like .obj etc)?In this case LumenRT does not perform any interpolation or smoothing to this object, so if you can retrieve the altitudes from this mesh in your modelling program, then they should stay the same in LumenRT.Otherwise, if your mesh is converted to a LumenRT heightmap, then as a workaround you can use lrt.GetDropOnGroundTransformation() (as proposed in my reply from your previous post) to "sample" the terrain at several XY locations.
As a workaround, created a Python script that uses the mentioned function to export LumenRT terrain as comma delimited CSV file.
# radius of block from center
size = 1000
if __name__ == "__main__":
f = open( 'lumenrt_exported_terrain.csv', "w" )
ray = lrt.Ray()
vx = size
vy = size
while vx > -size:
while vy > -size:
ray.start = lrt.float3(vx,vy,0.0)
# vz - height
vz = lrt.GetDropOnGroundTransformation(lrt.GetSelectedObject(), ray)
f.write(str(vx) + ',' + str(vy) + ',' + str(vz) + '\n')
vy = vy - 1
vx = vx - 1
vy = size
How to use:
1) Set the size Python parameter, 2000 for 4km X 4km LumenRT scene, 4000 for 8km X 8km etc.2) Add a cube object to LumenRT scene or use a rectangular building, like Building 17.3) Resize the object to 10 cm in all dimensions, press F5 to zoom in on it4) While having the object in view, open the Python file import window5) Switch to LumenRT and choose the Selection tool6) Keep clicking on the object until its parameter window appears7) Switch to Python import window and run the script8) The resulting CSV will be generated beside the .py file5 of these steps are necessary due to the function requiring an Instance, not VUE EONBasicObject, type of object as its first parameter.
Answer Verified By: Oto