Hi,
I'm using the xml converter to convert a .mesh file to a mesh.xml file. Then using blender, I am adjusting the uv map by dragging points around to make them fit the image a different way. Then I export as a mesh.xml file. If I close blender and open the newly created xml, my changes are visible, so everything seems to be OK at this point.
However, after I convert the mesh.xml back to a .mesh file, the changes that I made do not appear in the game I am modding (battlezone 98 redux). Somehow it reverts back to the original UV mapping.
I'm pretty new to OGRE. Can someone tell me what I am doing wrong or failing to do?
UV changes lost when converting .xml to mesh
-
- Gnoblar
- Posts: 6
- Joined: Sat May 21, 2016 2:41 pm
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Re: UV changes lost when converting .xml to mesh
Hmm, I didn't know Rebellion used Ogre to make Battlezone 98 Redux. But looking online, I see mentions of it. Cool.
I don't have the game so I don't know how the data is organised. But is there some form of package file that the game assets are stored in? Some games won't accept modified resources outside of the pack files unless a certain option is set (via command line or a config file or something). Or they need the assets to be placed in a very specific directory to be picked up.
Try opening the model in Ogre Meshy ( http://www.ogre3d.org/tikiwiki/Ogre+Meshy ). That will show if the model is really changed.
Something else to consider, the version of the ogre tools you are using (the xml converter) may not be compatible with the version of ogre used in Battlezone. For example if Rebellion used Ogre 1.8 but you are using the xml converter from ogre 1.9, the model won't load in the game and it may fall back on a pack file version instead. Have a look for an ogre.log file in the battlezone directory somewhere. Apparently they do have an ogre.cfg (in C:\Program Files (x86)\Steam\steamapps\common\Battlezone 98 Redux), so with luck there's a log there too. That will say which version of ogre is used.
I don't have the game so I don't know how the data is organised. But is there some form of package file that the game assets are stored in? Some games won't accept modified resources outside of the pack files unless a certain option is set (via command line or a config file or something). Or they need the assets to be placed in a very specific directory to be picked up.
Try opening the model in Ogre Meshy ( http://www.ogre3d.org/tikiwiki/Ogre+Meshy ). That will show if the model is really changed.
Something else to consider, the version of the ogre tools you are using (the xml converter) may not be compatible with the version of ogre used in Battlezone. For example if Rebellion used Ogre 1.8 but you are using the xml converter from ogre 1.9, the model won't load in the game and it may fall back on a pack file version instead. Have a look for an ogre.log file in the battlezone directory somewhere. Apparently they do have an ogre.cfg (in C:\Program Files (x86)\Steam\steamapps\common\Battlezone 98 Redux), so with luck there's a log there too. That will say which version of ogre is used.
-
- Gnoblar
- Posts: 6
- Joined: Sat May 21, 2016 2:41 pm
Re: UV changes lost when converting .xml to mesh
Thanks for the info Kojack!. It doesn't seem that the models are packed in an archive in any way. They are just in a models folder inside of BZ_Assets.
I checked for a log and found BZOgrelogfile.log. It had these 2 lines, 18:30:21: *-*-* OGRE Initialising and, 18:30:21: *-*-* Version 1.9.0 (Ghadamon). I'm taking that is it's using version 1.9, same as me. I'll give Ogre Meshy a try and see what I find. Thanks again.
I checked for a log and found BZOgrelogfile.log. It had these 2 lines, 18:30:21: *-*-* OGRE Initialising and, 18:30:21: *-*-* Version 1.9.0 (Ghadamon). I'm taking that is it's using version 1.9, same as me. I'll give Ogre Meshy a try and see what I find. Thanks again.
-
- Gnoblar
- Posts: 6
- Joined: Sat May 21, 2016 2:41 pm
Re: UV changes lost when converting .xml to mesh
Well I've tried using Meshy for a couple of nights and all it will show is a mesh with no texture. I posted on the Meshy forum, but I think it's dead. The last post was almost a year ago. Using Meshy 1.6 and Ogre 1.9. Any other ideas?
-
- Gnoblar
- Posts: 6
- Joined: Sat May 21, 2016 2:41 pm
Re: UV changes lost when converting .xml to mesh
OK, I am a dumbass. I was using the wrong model. There are 2 that look just alike in the models folder. Both are cockpits. When I modify the correct model in Blender, export it, convert it back to a .mesh file, there is definitely a difference in game. Unfortunately, the difference is, now I have no textures on the mesh (appears grey or white) and the mesh is Much larger. Any idea what I am doing wrong in Blender when I export to Ogre. I'm used to Nifskope and Nif files but Ogre is very foreign to me. I don't see any options for scaling during import or export.