Hi, I'm basicly trying out the first few tutorials with a couple of differences. I'm not using a fix model but creating one out of a bunch of volume data.
First I use this function to create a meshbuffer.
CDynamicMeshBuffer *newBuffer = new CDynamicMeshBuffer(EVT_STANDARD, EIT_32BIT);
Then I have a function which fills this one with stuff and then in my main loop execute the following.
SMesh* mesh;
mesh = new SMesh();
mesh->addMeshBuffer(newBuffer);
IMeshSceneNode* node = smgr->addMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, true);
}
The result is that I see the model but it's completely black, I do have a light source added and I've also tried disabling lightning.
Black model
Re: Black model
Well, I don't see how you create it - do you set any colors?
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
-
- Posts: 56
- Joined: Wed Nov 23, 2011 11:53 pm
Re: Black model
I would also venture a guess is because you have no lights in the scene and you turned on the lighting flag.
Re: Black model
He mentioned those, that's why I rather guess vertex-colors might be black.
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