I am finally playing around with Ogre and have found the only way for me to create levels on my Mac is to use Blender, export the scene, open VPC and convert the .xml to .mesh using the command line tools, export back to my Mac partition and then run the game.
First question: Is there a simpler way of creating .mesh on a Mac? Preferably without having to rely on Windows?
Second question: For the life of me I cannot get any textures to display on the meshes I load into my level. Upon inspecting the .material file I notice that there is no texture specified. I then manually add a texture but still I get only a grey block. I then copy and paste a material definition from the ogre example.material and get the same result. The only way I get a difference onscreen is by selecting the rustedmetal.jpg texture as my texture. This results in an orange block (that does not resemble the texture at all) but at least it isn't grey
I figured the problem may be in the fact that I didn't specify a texture in blender, but rather created a coloured material for the meshes. I then went back into blender and changed my material from using Stucci texture to using an image texture and re-exported the meshes and looked at the created .material file. Still it makes no reference to any image files, nor any texture coords nor any texture repitions as specified in blender.
Can anyone please tell me how to create a scene in blender and actually make it appear in an Ogre app, please? I would really appreciate that VERY MUCH indeed
Last question: How do i use the .scene file to load a scene? I know this must be the most stupid question of the bunch but at the moment I am forced to ignore it completely, name all the meshes in my scene numerically cube001, cube002 etc and then load them in manually using a for loop and string creation routine.
Back to the texturing part: I create a plane and texture it using
Code: Select all
ground->setMaterialName("Examples/Rockwall");Code: Select all
for (int x = 1; x < 9; x++)
{
sprintf(scenery,"Cube.00%d.mesh",x);
sprintf(sceneryName,"SceneryPart%d",x);
GenericEntity = mSceneMgr->createEntity(sceneryName,scenery);
mSceneMgr->getRootSceneNode()->attachObject(GenericEntity);
GenericEntity->setMaterialName("Examples/Rockwall");
}
Please help me out here...please! I have been stuck on this for days now. I have thus far managed to get the Newton physics lib to compile into my app and now need some scenery to test Newton on and for the life of me I have had so much trouble trying to get scenery into my level that I havent even been able to think about testing it out.
I thank you in advance for any help on the matter.
For interrest sake, here is my exported .material file after specifying textures for the cubes.
BTW, it gets exported as JapLevel.material but each one of my meshes when inspected in it's .xml format reveals that it is looking for scene.mesh. Go figure...
Code: Select all
material Walls/SOLID
{
technique
{
pass
{
diffuse 0.524899 0.401376 0.237636
specular 0.500000 0.500000 0.500000 12.500000
}
}
}
material Floor/SOLID
{
technique
{
pass
{
diffuse 0.187121 0.107596 0.020073
specular 0.500000 0.500000 0.500000 12.500000
}
}
}
material WallCorner/SOLID
{
technique
{
pass
{
diffuse 0.860636 0.878031 0.599721
specular 0.500000 0.500000 0.500000 12.500000
}
}
}
