Loading an obj file

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
Vesuvian
Posts: 2
Joined: Sun Apr 04, 2010 8:13 pm

Loading an obj file

Post by Vesuvian »

Hi

I have no 3d programming experience at this kind of level and have only just touched Irrlicht today!

Basically I wanted to manipulate the hello world tutorial to use an obj instead of md2 since I don't really want to go to the trouble of compiling Quake 2 models.

What I have written is:

Code: Select all

IMesh* mesh = smgr->getMesh("data/models/brick.obj");
	if (!mesh)
	{
		device->drop();
		return 1;
	}
	IMeshSceneNode* node = smgr->addMeshSceneNode( mesh );
My program quits instantly as it can't open the file. What am I doing wrong?

Also, I had to guess at the functions to load a static mesh. Is there any documentation that lists every function in Irrlicht?

Thanks
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Post by freetimecoder »

If the mesh cannot be loaded, there should be a note in the console. "Couldn't open mesh.." something like that. Depending on what it says, the path or the model format might be wrong.

greetings
Vesuvian
Posts: 2
Joined: Sun Apr 04, 2010 8:13 pm

Post by Vesuvian »

I had my model in the wrong part of the project folder.

Thanks for the documentation link.
Post Reply