helmut.bressler Posted September 30, 2013 Share Posted September 30, 2013 Hello, I'm trying to generate a cubemap from my scene from unigine script. We have a quite big and highres terrain (8km * 8km) and a projection matrix with a far clipping plane of 10km. It seems that not all parts of the terrain are getting loaded in time, some tiles are missing. When I create a cubemap with the grabbing tool from the editor the result is a little bit better but still there are a few tiles missing. Reducing the far clipping plane seems to help but then also the appearance of the skydome changes, which I don't want because I want to use the cubemap as environment cubemap. I tried to use the ObjectTerrain::loadHeights() method, but I'm getting the following error: terrain.loadHeights(vec3(4000.0f, 4000.0f, 100.0f), vec3(-4000.0f, -4000.0f, -100.0f), 1); exDH/exDH.cpp:88: ExternClass::get_function(): can't find "loadHeights" function with 3 arguments in "class ObjectTerrain * __ptr64" class is there any way to enforce loading all terrain tiles, without changing the terrain itself? thanks in advance Helmut Link to comment
frustum Posted October 8, 2013 Share Posted October 8, 2013 loadHeights() function receives 5 arguments: the first pair is bounding sphere center and radius. the second pair is bounding box min and max extents. the last argument is force flag. the bounding box is required only for 2d area specification (z coordinate is ignored). the bounding sphere is used for bounding test with terrain directly. Try to pass the following arguments: loadHeights(vec3_zero,INFINITY,-vec3(4000.f),vec3(4000.0f),1); All bounding must be presented in the terrain relative coordinates. Link to comment
Recommended Posts