Paul.Brodin Posted February 2, 2015 Posted February 2, 2015 Hi Ive used to the imagedds tool to convert a large image to a dds - is there a way to use this tool to carve this up into the array that is needed in the terrain node? if not is there another tool with the SDK that will create the array (like the 'import' from node UI screen does)
unclebob Posted February 3, 2015 Posted February 3, 2015 Hey Paul, You can use ObjectTerrain::setHeights (https://developer.unigine.com/en/docs/1.0/scripting/library/objects/class.objectterrain#setHeights_int_int_Image_float_int) function and pass that dds image to it. Make sure your image dimensions are the same as terrain grid.
Paul.Brodin Posted February 3, 2015 Author Posted February 3, 2015 Hi 'Bob' Its no so much the heights that we want to set - weve already produced a TER file using the external terrain.exe function. its adding the aerial photography as a texture to that terrain node. I can do it through the UI by 'IMPORTing' a .PSD for the diffuse/Normal/Holes, and that creates an array of the dds files. Its that process iam trying to achieve programatically. Thanks
unclebob Posted February 3, 2015 Posted February 3, 2015 Oh, I see, sorry for misinforming you. :) If you want to go 'command line toolchain' way then it's possible to write simple usc script (https://developer.unigine.com/en/docs/1.0/tools/usc/) which will split input image and save the slices properly. You can take a look at editor's terrain import functions to see how it's done. If you're using Unigine 2.0 then it's located in <data folder>/editor/editor_objects_terrain_import.h file.
Recommended Posts