"textured models" in OGRE . I am using OGRE 1.06 and Blender 2.41 on FedoraCore 4 Linux .
The Procedure will be same on any Operating System because everything
being used is cross-platform. May be It could be of some help for
Beginners . I am , in the meantime , having good typing practice .
1) In Blender scale up your cube. Make Wall , Fort or Anything. Then Press F.
2) Move your cursor to upper boundary till you see a 2 sided arrow.
Right click , SPLIT AREA (Left Click) , Left Click to decide the margins for
2 nd window .
3) Now in 2 nd window select UV/ImageEditor mode. Image->Open
and Load(MMB) any texture from your ogrenew/samples/media/material/
texture Directory.
4) Press Alt + Z and you would now see textured object .
5) Press U and Select Cube or anything that suits you. May be LSCM.
6) File->Export->OgreXML , Select "Game Engine Material ".
7) Export . Quit Blender . Just now you exported Cube.mesh.xml and
Scene.material. Cube.mesh.xml is the Mesh itself and Scene.material
contains the name of the texture applied and how it is applied.Where
textures are stored is stored in the resources.cfg file (/material/texture)
BTW models are stored in /models , .material scripts in /material/scripts.
Type "OgreXMLConverter Cube.mesh.xml" . Press ENTER. Your xml
file has been converted to OGRE understandable .mesh format.
9) Now you have Cube.mesh (Which is the Mesh itself) ,
Scene.material(Which contains the name of the texture applied to Cube.mesh)
Where to find textures , is specified in the resources.cfg file.
10) Now copy Cube.mesh into /models folder (Somewhere under
your "ogrenew" folder.
Copy Scene.material to /material/scripts/ folder
*Copy "your texture" to /material/texture/ folder , if you applied some other texture other than those supplied with OGRE.
11) Open your working OGRE program and replace "robot.mesh"
with "Cube.mesh" in your createEntity() function.
***You just need to do this, "resources.cfg" knows where Cube.mesh is, Cube.mesh will automatically find Scene.material through "resources.cfg" (name of associated .material file is written inside Cube.mesh). Scene.material knows what texture to apply . Where to find the texture
is already known to "resources.cfg" .***
12) Press F8 to build and Shift+F9 to execute (KDevelop,LINUX).
Youll see Textured Object loaded.
Any Questions ???
Thanks
