OGREs everywhere! Can you help?

AD

Finder of things, Doer of stuff
Hey everyone! I certainly am no computer programer. Heck, I'm not really a 3D artist, but I like to pretend every now and again. Here's my current dilema for which I could use some help. I have some *.mesh files that appear to use the open source OGRE 3D engine. I can get them to display their basic shape in some of the free ogre viewers online.

I have all the textures for these meshes (in JPG and PNG format)... but I'm missing the *.material files. Well, they aren't exactly missing. But the source that the models are from uses a separate XML file to keep track of this sort of thing and the ogre viewers don't seem to recognize it.
Code:
 <Material Name="Rechargestation_blue/PaintJob" NumTextures="2" Texture0="rechargestation_blue_paintjob.jpg" Texture1="RechargeStation_normalmap.png" VertexShader="1" PixelShader="1" />
    <Material Name="Rechargestation_blue/TeamColor" NumTextures="2" Texture0="RechargeStation_teamcolor.jpg" Texture1="RechargeStation_normalmap.png" VertexShader="1" PixelShader="1" />
    <Material Name="Rechargestation_green/PaintJob" NumTextures="2" Texture0="rechargestation_green_paintjob.jpg" Texture1="RechargeStation_normalmap.png" VertexShader="1" PixelShader="1" />

Yeah, I know... not exactly the same as a normal material file. I've tried changing the info within the xml into normal *.material file format but no luck. The model is still just a white blob with no textures in the viewer and it keeps telling me it can't find the textures. I think I may be missing something that tells it to group the mesh with the textures. Any suggestions?
 
I'm not where I have regular internet access at the moment.. but you can send them to me if you want.. (models and textures both) and I'll see what I can work out.

admin at avtcomp dot com
 
"Meshworks" is a plugin for "Rhino 3D"

http://www.codenautics.com/meshwork/
Meshworks program for MAC OS

I'm not entirely sure what Meshwork does that I don't already have, and I don't have a Mac or Rhino. Theoretically I can export new material files using the same textures if I can convert the *.mesh files into something usable. There are a lot of exporters to turn other formats into the OGRE format but not much to do the reverse.
 
Well, I've had moderate success converting the big "main" xml into individual material files! It was mostly an issue of figuring out the proper syntax, though this is still tedious as hell. For now I've got a basic material script that shows the textures correctly. But I still need help getting thiese decently lit and shaded. Here's the basic script:
Code:
material Gun_Laser

{
   technique
   {
      pass
      {
         texture_unit
         {
           texture gun_laser_paintjob.jpg
         }
          texture_unit normalMap
            { texture gun_laser_normalmap.png             
            
         }
         
         }
      }
   }
}

This results in the following textured model:

attachment.php


Not really pretty, but I think you guys might be able to help me tweak the material script to get this thing lit correctly.
 

Attachments

  • gun.jpg
    gun.jpg
    17.9 KB · Views: 129
Back
Top