Irredit and Irrlicht path problem

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

Irredit and Irrlicht path problem

Post by Terrachild »

I'm new to Irredit, but there appears to be a problem with the way Irredit stores paths in the .irr file.

I have set up my Irrlicht project folder and in it I have a scene folder, a mesh folder and a texture folder. I use Irredit to lay out the scene, but when I load the scene into my Irrlicht app. the paths that Irredit creates in the .irr file don't correspond to what Irrlicht wants. It looks like Irredit is using relative paths in the .irr file, but the stored paths are unncecessarily long.

For example:
Instead of saving the mesh path the way Irrlicht wants, like this:

<string name="Mesh" value="../meshes/room.3ds" />

or, in english, up 1 folder from the scene folder and down into the meshes folder;


Irredit does this,

<string name="Mesh" value="../../../../documents and settings/christopher/my documents/visual studio projects/irrlicht vb.net/irrlicht scene practice/meshes/room.3ds" />

When I try to load the scene in Irrlicht, it doesn't know what to do with this. Do I have to go in and modify all the paths in the .irr file? :(

puzzled
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

in the irredit folder copy your media into whatever folders it will be found in your game, inside the irredit folder.

Thats how I did it and it worked.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Can't you just run IrrEdit from the same directory as your Irrlicht executable? Seems like that should work...

If you use a shortcut, set the working directory to the same directory as the Irrlicht executable is in. If you run from the command line change directories to the directory the Irrlicht executable is in before running IrrEdit.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Vitek's idea is much easier and better.

I think too hard sometimes. =|
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

Still not working

Post by Terrachild »

I tried putting Irredit into the same folder as my executable, and in theory this should work, but Irredit doesn't play nice with the Irrlicht DLL I'm using with my VB.NET executable. Irredit crashes. If I replace my DLL with the one in the Irredit folder, then my app crashes! Either way they won't both run in the same folder.

I guess I can nest Irredit in another folder in my 'Bin' folder, that is where my exe. is, and copy the 'meshes', and 'textures' folders into my 'Bin' folder, and let Irredit and my app. use different media folders. I'll just have to remember to copy the two folders whenever I change a texture. There should be a way to make both Irredit and my app. use the same media folders.

Now the only problem is Irredit 0.4 uses an incompatible intro, so I have to open up my scene file everytime i make a change and alter the first paragraph from this:

<attributes>
<string name="Name" value="root" />
<int name="Id" value="-1" />
<colorf name="AmbientLight" value="0.000000, 0.000000, 0.000000, 0.000000" />
</attributes>

To this:

<attributes>
<string name="Name" value="root" />
<int name="Id" value="-1" />
<vector3d name="Position" value="0.000000, 0.000000, 0.000000" />
<vector3d name="Rotation" value="0.000000, 0.000000, 0.000000" />
<vector3d name="Scale" value="1.000000, 1.000000, 1.000000" />
<bool name="Visible" value="true" />
<bool name="AutomaticCulling" value="true" />
<bool name="DebugDataVisible" value="false" />
<bool name="IsDebugObject" value="false" />
<colorf name="AmbientLight" value="0.000000, 0.000000, 0.000000,
0.000000" />
</attributes>


That is really annoying.
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Post by mandrav »

vitek wrote:Can't you just run IrrEdit from the same directory as your Irrlicht executable? Seems like that should work...

If you use a shortcut, set the working directory to the same directory as the Irrlicht executable is in. If you run from the command line change directories to the directory the Irrlicht executable is in before running IrrEdit.
No, it doesn't. This is a problem that I 've seen since I first tried irrEdit (I think v0.3) and it's just frustrating.
  • Can't run it from a different working directory: it looks for its resources and can't find them.
  • If you run it from its own directory it works, but uses relative paths to your assets from its own directory :!: (just what Terrachild said). I just can't see why an artist's tool would assume that its own directory is the base for your project?!?
The correct way would be able to set the base directory for assets, *per-scene*. This way you could set it to the same dir where your executable will reside and all will work fine.

Don't get me wrong: I think irrEdit has what it takes to be a really great app. It's just that little details :?: like this need refinement.
Last edited by mandrav on Wed Sep 20, 2006 10:26 am, edited 1 time in total.
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

Thank You!

Post by Terrachild »

You beat me to it, I was just about to write, that Irredit should have an option to store the paths in the .irr file relative to the scene file and not relative to the Irredit.exe

Wow, that was a quick reply mandrav! :wink:
mandrav
Posts: 117
Joined: Sat Aug 27, 2005 8:29 pm
Contact:

Re: Thank You!

Post by mandrav »

Terrachild wrote:Wow, that was a quick reply mandrav! :wink:
No, this is a quick-reply ;).
Post Reply