Klasker's cal3d on 1.4

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
doma
Posts: 6
Joined: Tue Mar 27, 2007 7:24 am

Klasker's cal3d on 1.4

Post by doma »

I tried compile Klasker's cal3d on irr1.4 . but model is dark.
please advise me.

original:

Code: Select all

Material.Textures[0] = (video::ITexture*)renderer->getMapUserData(0);
I modified:

Code: Select all

Material.setTexture(0,(video::ITexture*)renderer->getMapUserData(0));
Image
cal3dLib(msys/local)http://www.murim.okok.tk/irr/cal3dErr/libcal3d-12.zip
modified irrcal3dhttp://www.murim.okok.tk/irr/cal3dErr/i ... irr1.4.zip
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

try to turn off lighting for your model, like:

Code: Select all

node->setMaterialFlag(video::EMF_LIGHTING, false);
doma
Posts: 6
Joined: Tue Mar 27, 2007 7:24 am

Post by doma »

I turn off lighting .
greenya wrote:try to turn off lighting for your model, like:

Code: Select all

node->setMaterialFlag(video::EMF_LIGHTING, false);

Code: Select all

    
    // Create the cal3d scene node
    scene::CCal3DSceneNode* node = new scene::CCal3DSceneNode( model, manager->getRootSceneNode(), manager );
    node->setMaterialFlag( video::EMF_LIGHTING, false );
    node->playAnimation( "walk" ); // (See note near bottom of main.cpp)
    node->drop();
I debugged "CCal3DSceneNode.cpp" line 238.

Code: Select all

if ( renderer->getMapCount() >= 1 )
then always renderer->getMapCount() return 0.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to adjust some method signatures, e.g. getMaterialCount has to be const and return a u32.
qez111
Posts: 54
Joined: Mon Apr 28, 2008 9:44 pm

Solution to Cal3d in v1.4

Post by qez111 »

Has anybody found the solution to this darkness problem?
The model is looking dark even when material flag is set to false.
hybrid
PostPosted: Mon Jan 21, 2008 2:31 pm Post subject:
You have to adjust some method signatures, e.g. getMaterialCount has to be const and return a u32.
I tried making getMaterialCount as u32, but still it is dark...

I would appreciate if somebody can help me out..
Thanks.[/quote]
Post Reply