Hello guys,
I've been working on a custom mesh format, i've got the max exporter done and the basic of the irrlicht loader for it, however im having some issues when rendering the resulting mesh as an octree.
If i add the mesh as a normal mesh node it does render without any problem, texture looks good and no weird vertices of flipped faces, however, when i add the same mesh as an octree node it just renders a bunch of triangles without sense.
Does anyone know what could cause this behavior?
Thanks!
Problem with octree node
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Problem with octree node
Sounds like an old version of Irrlicht. We've fixed this problem about a year ago, was hopefully also in Irrlicht 1.7.
Re: Problem with octree node
Well im using the 1.8 version published at the main page, something i've also noticed is that if i set my material to EMT_SOLID textures doesn't render at all, i have to set EMT_LIGHTMAP for them to render which is weird ... i dont know if im missing something on the loading code but this is the first time i've saw this behavior on irrlicht.
EDIT: I've noticed something, if i save my custom loaded mesh as a obj file using the irrlicht writer and then load it as a normal Mesh scene node the same behaviour happens (same as displaying my original mesh as an octree).. i guess there's something wrong in my loader but no idea of what as it does render fine as a mesh scene node but doesn't as an octree...
EDIT2: Found the problem.. in my loader i was creating the meshbuffers with 32 bit indices, changing them to 16 solved the problem, maybe there's an issue with octree when using 32 bit indices? However the textures not rendering when using the EMT_SOLID still happens (and i have lighting disabled)
EDIT: I've noticed something, if i save my custom loaded mesh as a obj file using the irrlicht writer and then load it as a normal Mesh scene node the same behaviour happens (same as displaying my original mesh as an octree).. i guess there's something wrong in my loader but no idea of what as it does render fine as a mesh scene node but doesn't as an octree...
EDIT2: Found the problem.. in my loader i was creating the meshbuffers with 32 bit indices, changing them to 16 solved the problem, maybe there's an issue with octree when using 32 bit indices? However the textures not rendering when using the EMT_SOLID still happens (and i have lighting disabled)
Code: Select all
pMeshBuffer->recalculateBoundingBox();
pMeshBuffer->getMaterial().MaterialType = video::EMT_SOLID;
pMeshBuffer->getMaterial().setTexture( 0, tex );
pMeshBuffer->getMaterial().Lighting = false;
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Problem with octree node
Yes, the problem had been with 32bit indices. But IMHO we resolved all those problems... Not sure about the textures.
Re: Problem with octree node
Well today i started to debug the black textures problem and found why.. looks like the EMT_SOLID adds up the vertex color to the final result and i had them set to blackhybrid wrote:Yes, the problem had been with 32bit indices. But IMHO we resolved all those problems... Not sure about the textures.