Im trying to display TEXTURED custom mesh... but its black, either lighting is disabled or enabled. And i got one light in my scene with radius 1000 when its on 0,0,50 and mesh is at 0,0,0. Can somebody tell me what I missed? Texture's loaded properly, i chek'd in log.
Probably wrong normals. Lighting calculation depends on it. And of course missing texture coords as well.
Or winding order, since you're using cutsom render methods. Why not just create a mesh from your vertices and add it to a scene node?
I cannot just load mesh, im working on my own scene node.
Well, I checked everything again, and im almost sure that the textures coords, normals, and textures are loaded properly.
Can you help me get it to work without lighting?
EDIT: Now I found out really strange thing!! I made lil test with vertex colors (still without lighting).
First I seted color of each vertex to blue and commented the "setTexture" line. Mesh was blue.
Then I uncommented the "setTexture" line. And mesh appeared textured?! However still blue'ed... so I setted each of colors of each vertex to 100... and it fixed it!! So now everything works, but idk why...
Last edited by Malgodur on Sat Jun 13, 2009 4:47 pm, edited 1 time in total.
Malgodur wrote:I cannot just load mesh, im working on my own scene node.
Why can't u just load a mesh?
The scenenode is only there to place the mesh animate and call the render method. Drawing itsef is done by IVideoDriver.
You can for example draw meshbuffers with IVideoDriver::drawMeshBuffer (const scene::IMeshBuffer *mb).
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.