Skip to main content

History: Ogre Terrain Textures

Source of version: 3

Copy to clipboard
            {TRANSCLUDE(page="Layout_div6", img="1492")}How to create textures for use with the Ogre Terrain Component{TRANSCLUDE}
{maketoc}
!Introduction
!ShaderMap CL
1) Get ShaderMap CL from http://www.shadermap.renderingsystems.com/
2) Create a bat file with the following contents:
CODE: SELECT ALL
CD "C:\Program Files\ShaderMap CL 1.2.2"

START /WAIT shadermap.exe cdiff "<texture_directory>\<texture_name>" -disp (60,100,12,xy) -norm (100,200,xy,0) -spec (100,-50,52,xy) -v


Replace the directory and texture name with what you want to generate maps for.

3) Generate the maps by running the bat script, once for each texture.

4) Use the following code to combine the images:
CODE: SELECT ALL
   Ogre::Image combined;

   combined.loadTwoImagesAsRGBA("moos1.jpg", "moos1_SPEC.bmp", 
      Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::PF_BYTE_RGBA);
   combined.save("moos1_diffusespecular.png");

   combined.loadTwoImagesAsRGBA("moos1_NORM.tga", "moos1_DISP.bmp", 
      Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::PF_BYTE_RGBA);
   combined.save("moos1_normalheight.png");


5) Get the nVidida texture tools (DDS Utilities) and convert the output textures to dds.

6) Done. 

!Pixplant

        

History

Information Version
Sat 14 of Feb, 2015 01:34 GMT-0000 raffamaiden 26
Sat 14 of Feb, 2015 01:22 GMT-0000 raffamaiden 25
Thu 30 of Aug, 2012 11:38 GMT-0000 duststorm 24
Thu 30 of Aug, 2012 11:38 GMT-0000 duststorm 23
Thu 30 of Aug, 2012 11:36 GMT-0000 duststorm 22
Thu 30 of Aug, 2012 11:36 GMT-0000 duststorm 21
Thu 30 of Aug, 2012 11:33 GMT-0000 duststorm 20
Thu 30 of Aug, 2012 11:32 GMT-0000 duststorm Added png to terrain tex conversion script 19
Thu 23 of Aug, 2012 22:01 GMT-0000 duststorm 18
Thu 23 of Aug, 2012 22:00 GMT-0000 duststorm 17
Thu 23 of Aug, 2012 21:59 GMT-0000 duststorm 16
Thu 23 of Aug, 2012 21:54 GMT-0000 duststorm 15
Thu 23 of Aug, 2012 21:53 GMT-0000 duststorm Added imageMagick explanation 14
Tue 09 of Aug, 2011 12:13 GMT-0000 uzik Added NetPBM 13
Wed 08 of Sep, 2010 23:47 GMT-0000 harkathmaker Clarified GIMP procedure 12
Thu 17 of Jun, 2010 10:17 GMT-0000 jacmoe 11
Thu 17 of Jun, 2010 10:15 GMT-0000 jacmoe 10
Thu 17 of Jun, 2010 10:14 GMT-0000 jacmoe 9
Thu 17 of Jun, 2010 07:44 GMT-0000 jacmoe 8
Thu 17 of Jun, 2010 07:40 GMT-0000 jacmoe 7
Thu 17 of Jun, 2010 07:38 GMT-0000 jacmoe 6
Thu 17 of Jun, 2010 07:37 GMT-0000 jacmoe 5
Thu 17 of Jun, 2010 07:36 GMT-0000 jacmoe 4
Thu 17 of Jun, 2010 07:35 GMT-0000 jacmoe 3
Thu 17 of Jun, 2010 07:29 GMT-0000 jacmoe 2