Blender->Collada->Irrlicht : no 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
thrash242
Posts: 8
Joined: Wed Jun 08, 2011 11:15 pm

Blender->Collada->Irrlicht : no textures

Post by thrash242 »

I'm no expert in Blender or Irrlicht, so I'm sure I'm doing something wrong, but when I add textures in Blender, the scene loads up fine, but there are no textures--everything is flat (with lighting).

I changed mapping to UV, as I read that this was needed, but I have no clue what to do now.

Any help would be much appreciated.
Last edited by thrash242 on Wed Aug 22, 2012 8:24 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9718
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Blender->Collada : no textures

Post by CuteAlien »

Can you post the test-file somewhere - or maybe send it to one of us? Also take a look at the console-messages on loading - maybe there is some error-message there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Blender->Collada : no textures

Post by hybrid »

The Collada loader currently depends on a certain file order, as it does not store all forward references, but needs to resolve some upon read time. I've fixed some things for texture loading, but a generic file order is not yet possible.
thrash242
Posts: 8
Joined: Wed Jun 08, 2011 11:15 pm

Re: Blender->Collada->Irrlicht : no textures

Post by thrash242 »

Well, Xcode seems to be able to read Collada files and display their contents. The order of the entity folders is:
Geometries
Materials
Cameras
Lights
Animations

Is this order the problem? If so, is there some way to load Collada files exported by Blender into Irrlicht correctly?

I don't see any obvious error messages in the output when I run my program. I see messages about the texture and material that sound like it should work.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Blender->Collada->Irrlicht : no textures

Post by hybrid »

Not sure, materials before geometry might be better. Anyway, an example file would help more.
thrash242
Posts: 8
Joined: Wed Jun 08, 2011 11:15 pm

Re: Blender->Collada->Irrlicht : no textures

Post by thrash242 »

Here is the file:http://dl.dropbox.com/u/36445244/test.dae

And here is the code involved in loading the file:

Code: Select all

 
//set up scene manager
ISceneManager* smgr = device->getSceneManager();
smgr->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true);
    
//set up mesh
IMesh* mesh = smgr->getMesh("test.dae");
IMeshSceneNode* node = smgr->addMeshSceneNode(mesh);
 
CuteAlien
Admin
Posts: 9718
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Blender->Collada->Irrlicht : no textures

Post by CuteAlien »

Thanks. One more question - which Irrlicht version are you using? (I fixed already some problem on the loader in svn some months ago compared to 1.7 versions)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
thrash242
Posts: 8
Joined: Wed Jun 08, 2011 11:15 pm

Re: Blender->Collada->Irrlicht : no textures

Post by thrash242 »

I'm using a nightly build from about a week or two ago.
CuteAlien
Admin
Posts: 9718
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Blender->Collada->Irrlicht : no textures

Post by CuteAlien »

There's a bunch of problems with that collada. First it only affects one of the nodes in there - aka just one of the cubes, the others are not textures. Next the textures is exported as bump+specular while you probably want emission or diffuse. You can search for the material-effect used by looking for tileable5k_png in the collada file and then in below in <technique sid="common"> <phong> you can see what it uses for each light-type. The last problem might be because I don't have your textures but had to create an own. I used a 320x320 and the UV's for that were in a way that it only used a tiny part of the whole texture, but maybe your's was larger.

Irrlicht seems to load the texture and apply it - the problem so far is in export.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply