Source code change for Loading Height Maps
by Grant D · in Torque 3D Beginner · 01/27/2011 (12:22 am) · 3 replies
Hi, Just purchased Torque3D and tried it out by loading a Satellite height map image, which worked ok but now I'd like to load the associated Satellite Color map (see picture) but unfortunately I cannot. Fortunately I have the source code but after looking through TerrImport.cpp i realise my basic 'C' skills isn't going to cut it!
Would someone help me add a new data input field into the HeightMap window, just below the Height Map Image field, being Color Map Image. How this new data interacts with the current Overlays, I'm not sure? Replace or Blend? Maybe a bit of experimentation?
But as you can see from the quality of the Satellite color maps, they are a MUST! :)
http://i738.photobucket.com/albums/xx23/ArchaicWarrior/ROME_2048_24BIT_COLOR_cr.jpg
Thanks
Grant.
Would someone help me add a new data input field into the HeightMap window, just below the Height Map Image field, being Color Map Image. How this new data interacts with the current Overlays, I'm not sure? Replace or Blend? Maybe a bit of experimentation?
But as you can see from the quality of the Satellite color maps, they are a MUST! :)
http://i738.photobucket.com/albums/xx23/ArchaicWarrior/ROME_2048_24BIT_COLOR_cr.jpg
Thanks
Grant.
About the author
12 years IT development in the finance / insurance Industry. Hobbies : war gaming, computer gaming.
#2
There wasn't a game\art\terrains\<MyProjectName>_basetex.dds so i created one but it doesn't seem to work. I reloaded the heightmap file but still that stupid red "No Material" texture.
The file size is 2048 * 2048, same size as heightmap.
01/27/2011 (3:16 am)
Thanks, The original Color Map File was 24 bit PNG but when I loaded it into the Overlay section, it split it into it's 3 color components (RGB) it didn't work. There wasn't a game\art\terrains\<MyProjectName>_basetex.dds so i created one but it doesn't seem to work. I reloaded the heightmap file but still that stupid red "No Material" texture.
The file size is 2048 * 2048, same size as heightmap.
#3
IF any C++ programmer is willing to do these changes then I'm willing to pay.
Thanks
Grant.
03/26/2011 (5:20 pm)
I think i've worked out what I need, When loading a Height map, a Color map input box is also needed so Satellite color maps can be loaded over the entire map. To load Terrain Detail Overlays then that would be done by checking the color on the colormap/terrain, for example if the color is dark green then that would imply grass and a grass texture overlay would be loaded in the general area. If the color is gray then that implies stone and a stone texture overlay would be loaded. Sounds a bit more complicated than normal but doable I think.IF any C++ programmer is willing to do these changes then I'm willing to pay.
Thanks
Grant.
Torque 3D Owner Caylo Gypsyblood
I am ignorant to what data "Satellite Color map" is defining.
If you wish to use the "Satellite color map" as a terrain covering texture see folder gameartterrains and find file YOUR TERRAIN FILENAME_basetex.dds. One could easy edit that file to place one texture over the full terrain hightmap.
Do consider that the _basetex.dds is dynamically generated from the Terrain Painter feature(F3 hotkey), so use of the Terrain Painter feature from the editor will overwrite any 'edit' to the _basetex.dds file.