Texturing Worlds

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
BiggerStaff
Posts: 7
Joined: Sat Mar 13, 2004 6:56 pm

Texturing Worlds

Post by BiggerStaff »

Sorry if this is a bit of a dumb question, but how do you load texturing information for worlds (ie terrain, levels etc) into Irrlicht?

I've made some stuff in maya, and happily loaded the .obj into Irrlicht, but what's the best way go about texturing it? (as objectfiles only contain geometry, it comes out grey). How was that pretty town in the screenshots made?

Irrlicht is great to use btw - keep it up!

Cheers
Xception
Posts: 22
Joined: Tue Feb 24, 2004 10:05 am

Post by Xception »

If you use 3ds files then the textures are loaded and applied automatically if they are in the same directory.
zzino
Posts: 7
Joined: Fri Feb 27, 2004 6:44 am
Location: Toronto

But isn't there anyway to put textures in obj level mesh?

Post by zzino »

I was trying to do same thing but....I could not fugure it out yet.

Please help!!
Yesterday is history.
Tomorrow is a mystery.
Today is a gift. That's why it's called the "present."
Caecus
Posts: 36
Joined: Fri Aug 22, 2003 6:33 am
Location: California, USA

Post by Caecus »

From my understanding of the .obj format (I've never used them), it probably works like an md2 instead of a 3ds. Like in the HelloWorld example you have to load/apply the texture in the code, as follows:

scene::IAnimatedMesh* mesh = smgr->getMesh("mymodel.obj");
scene::IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
node->setMaterialTexture(0, driver->getTexture("mytexture.bmp");
zzino
Posts: 7
Joined: Fri Feb 27, 2004 6:44 am
Location: Toronto

Emm....

Post by zzino »

I know how to load 1 texture...on 1 object.

If I have a levelmesh in .obj format.
We may need more than 1 texture for floor, door, windows,wall....hallway...etc

Should I separate each object to different file and load one by one??
Yesterday is history.
Tomorrow is a mystery.
Today is a gift. That's why it's called the "present."
Post Reply