Page 1 of 1

Blender->Collada->Irrlicht : no textures

Posted: Wed Aug 22, 2012 10:02 am
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.

Re: Blender->Collada : no textures

Posted: Wed Aug 22, 2012 1:03 pm
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.

Re: Blender->Collada : no textures

Posted: Wed Aug 22, 2012 1:48 pm
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.

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

Posted: Wed Aug 22, 2012 8:27 pm
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.

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

Posted: Wed Aug 22, 2012 11:30 pm
by hybrid
Not sure, materials before geometry might be better. Anyway, an example file would help more.

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

Posted: Thu Aug 23, 2012 6:00 am
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);
 

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

Posted: Thu Aug 23, 2012 7:59 am
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)

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

Posted: Thu Aug 23, 2012 8:12 am
by thrash242
I'm using a nightly build from about a week or two ago.

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

Posted: Sat Sep 01, 2012 9:53 am
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.