could not load mesh,beause file couldn't be opened room.3ds

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.
Post Reply
caiten
Posts: 6
Joined: Sun Sep 02, 2012 6:37 pm

could not load mesh,beause file couldn't be opened room.3ds

Post by caiten »

hi,all
i try to example 08.SpecialFX but visual studio message error in screen dos:
could not load mesh,beause file couldn't be opened ::.../.../media/room.3ds

how to fix error???
help me :(

thanks
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: could not load mesh,beause file couldn't be opened room.

Post by hybrid »

Well, ... looks strange, and in general this is just due to a wrong working directory.
caiten
Posts: 6
Joined: Sun Sep 02, 2012 6:37 pm

Re: could not load mesh,beause file couldn't be opened room.

Post by caiten »

i from vietnamese . my english is bad.
I download irrlicht -1.7.3 from http://irrlicht.sourceforge.net/downloads/
in directory's irrlicht-1.7.3 have directory media.i don't repair or remove anything
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: could not load mesh,beause file couldn't be opened room.

Post by hybrid »

Yes, all the files are there. But when starting the example from somewhere, you have to make sure that the relative(!) path you give the application is correct from where you are. So to be sure move to the bin/win32-visualstudio directory and start the app by clicking, or change to that directory on command line and run the example. Then it should work.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: could not load mesh,beause file couldn't be opened room.

Post by Cube_ »

I assume youa re using Code::Blocks and MinGW, either way the working directory is often set as the dir where either your source files or binary files are, thus try this file path "media/room.3ds"

also, make sure your media directory is in the folder where you have your source files. if that won't work try where the binary files are, or manually set the working dir to where you want it.
"this is not the bottleneck you are looking for"
utunnels
Posts: 37
Joined: Thu Apr 05, 2012 2:52 pm

Re: could not load mesh,beause file couldn't be opened room.

Post by utunnels »

Hmm, I assume he just copied that example to another place like I did for the first time, in which case the media folder could not be found.

Because the paths are all hard coded in cpp files, you can simply edit them before compiling. They are usually in a pattern like "../../media/dwarf.x", just change that if you want your media folder to be in another place.
caiten
Posts: 6
Joined: Sun Sep 02, 2012 6:37 pm

Re: could not load mesh,beause file couldn't be opened room.

Post by caiten »

hybrid wrote:Yes, all the files are there. But when starting the example from somewhere, you have to make sure that the relative(!) path you give the application is correct from where you are. So to be sure move to the bin/win32-visualstudio directory and start the app by clicking, or change to that directory on command line and run the example. Then it should work.
i copy file main.cpp from example 8.specialFX.
i had run example 01 hello_world success.
When i research function getMesh(),i don't understand it.
in library IAnimatedMesh.h ,i look getMesh()

Code: Select all

virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) = 0;
so,in example i don't see arguments
i had read tutorial in place :http://irrlicht.sourceforge.net/docu/example008.html
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: could not load mesh,beause file couldn't be opened room.

Post by serengeor »

I can't spot any getMesh function being used with no arguments in that sample. It's just that instead passing all of the values, default ones are used.
Working on game: Marrbles (Currently stopped).
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: could not load mesh,beause file couldn't be opened room.

Post by hybrid »

You are mixing methods from different classes. You want to find the one from ISceneManager, which loads meshes. But the one you show is from IAnimatedMesh, returning a mesh pose at a certain animation.
Post Reply