How to load a .x file including all textures

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
fastbit
Posts: 4
Joined: Thu Nov 23, 2006 11:47 am

How to load a .x file including all textures

Post by fastbit »

Hello folks,

can someone tell me how to load a .x mesh including the textures?
E.g. a mesh created with Delgine3D Editr an exported as x mesh with all textures.

I use PureBasic with irrlichtwrapper but I think its the same in C++.

Its easy If you want to load a Quake 3 BSP Map:

code:

IrrAddZipFile( "data\map-20kdm2.pk3", #IRR_IGNORE_CASE, #IRR_IGNORE_PATHS )
*BSPMesh = IrrGetMesh( "Data\20kdm2.bsp" )
*BSPNode = IrrAddMeshToSceneAsOcttree( *BSPMesh )


This loads the mesh and the textures. This works fine.

But if i write the following:

code:

*BSPMesh = IrrGetMesh( "Data\castle.x" )
*BSPNode = IrrAddMeshToSceneAsOcttree( *BSPMesh )

only the mesh model is being loaded.


How can I add the texture bound to this mesh?

Its the same when using an ogre3D mesh with .material script

Thanx a lot guys.

Greets

Andi
n00b
Posts: 58
Joined: Tue Sep 05, 2006 3:00 pm
Location: Earth
Contact:

Post by n00b »

it should work. maybe there's something wrong with the exporter?
i have no trouble with .x files
fastbit
Posts: 4
Joined: Thu Nov 23, 2006 11:47 am

Thats really intersting

Post by fastbit »

So does it mean that the code line

IrrGetMesh("mymesh.x")

loads the mesh with all textures?

There noting more to be done?
Andi
n00b
Posts: 58
Joined: Tue Sep 05, 2006 3:00 pm
Location: Earth
Contact:

Post by n00b »

if you already have textures in the 3d editor then all you do is load the mesh and the textures will come with it automatically.
fastbit
Posts: 4
Joined: Thu Nov 23, 2006 11:47 am

Thanx a lot

Post by fastbit »

Okay thank you very much.

I check the exporter. Maybe there's the problem

Andi
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Be sure all textures are in the same folder as the mesh !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply