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.
Blender->Collada->Irrlicht : no textures
Blender->Collada->Irrlicht : no textures
Last edited by thrash242 on Wed Aug 22, 2012 8:24 pm, edited 1 time in total.
Re: Blender->Collada : no textures
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Blender->Collada : no textures
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
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.
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.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Blender->Collada->Irrlicht : no textures
Not sure, materials before geometry might be better. Anyway, an example file would help more.
Re: Blender->Collada->Irrlicht : no textures
Here is the file:http://dl.dropbox.com/u/36445244/test.dae
And here is the code involved in loading the file:
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
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Blender->Collada->Irrlicht : no textures
I'm using a nightly build from about a week or two ago.
Re: Blender->Collada->Irrlicht : no textures
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.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm