do not loading .iir files

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

do not loading .iir files

Post by wahagn »

the example loading .irr files works :D .. but if i am write other irr files it dont work.. than i see many warnings that the engine not can open the textures i used :( ... what to do now?? :?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, fix it :D (the file...)
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

how do you mean ?? the file is good but the engine dont load the file
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

anybody??...
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Using my spooooooky mind powers...

Image

... I determine that your issue is with the paths to the textures. Ensure that the paths in the .irr file refer to the correct location relative to your Irrlicht executable or project working directory, not the location relative to the IrrEdit executable.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

i dont understand you i have removed all textures to the folder media but that do not work ... i dont know how to do that de engine know where the textures are.... :?
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Some model formats have texture information encoded in the model data itelf. Others get their texture data from the .irr file. If you look in the file (it's just XML) then you'll find (for example, from media/example.irr

Code: Select all

<texture name="Texture1" value="../../media/particlewhite.bmp" />
When you load that .irr file using Irrlicht, the path will be interpreted as relative to the current working directory. You (yes, you) have to ensure that the paths specify valid relative locations.

Since you haven't given us any hint about what model formats you're using, the .irr file, or the exact errors that you're getting, I can't be more specific.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

can u load the irr in irredit? where did irr file come from?

post your directory structure, your .irr, and code
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

i can load it...if i open the .irr fil with notepad it looks so:

<?xml version="1.0"?>
<irr_scene>

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

<node type="cube">

<attributes>
<string name="Name" value="testCube" />
<int name="Id" value="-1" />
<vector3d name="Position" value="-454.866119, 0.000000, 493.122406" />
<vector3d name="Rotation" value="0.000000, 0.000000, 0.000000" />
<vector3d name="Scale" value="1.414479, 0.021712, 1.368664" />
<bool name="Visible" value="true" />
<enum name="AutomaticCulling" value="box" />
<int name="DebugDataVisible" value="0" />
<bool name="IsDebugObject" value="false" />
<float name="Size" value="10.000000" />
</attributes>

<materials>
<attributes>
<enum name="Type" value="solid" />
<color name="Ambient" value="ffffffff" />
<color name="Diffuse" value="ffffffff" />
<color name="Emissive" value="00000000" />
<color name="Specular" value="ffffffff" />
<float name="Shininess" value="0.000000" />
<float name="Param1" value="0.000000" />
<float name="Param2" value="0.000000" />
<texture name="Texture1" value="../irrlicht-1.4.2/media/zwart.jpg" />
Trimmed here by Rogerborg
Mirror
Posts: 218
Joined: Sat Dec 01, 2007 4:09 pm

Post by Mirror »

better just post a link to the file, it will make everyone's life better, this .irr file is huge ;) as you can see it's already truncated
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Code: Select all

<texture name="Texture1" value="../irrlicht-1.4.2/media/zwart.jpg" /> 
That path needs to be relative to your application directory, not the Irrlicht SDK.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

the path/directory structure is very important when trying to load an irr file....

i suggest do the ff. (simplest)
1. when using irredit, save the .irr in the directory where irredit.exe is located
2. place your application.exe where the .irr and irredit.exe is.... and just simply have in your code load the .irr file (no more path since its in the same directory as ur exe)

try it
wahagn
Posts: 186
Joined: Sat Dec 06, 2008 5:11 pm
Location: Zundert (Netherlands)

Post by wahagn »

okay... than i must reamove the .iir to irredit 1.4.2.... but how do you mean a aplication.exe i dont have
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

application.exe means your irrlicht program you wrote to load the irr
roelor
Posts: 240
Joined: Wed Aug 13, 2008 8:06 am

Post by roelor »

make it so
irredit -> irrscene
irredit - > media (models and such)
and then copy your program directory
program -> irrscene
program -> media (models and such)
Post Reply