Search code examples
iosobjective-ccocos2d-iphonecocos3d

Cocos3D remove shades


I have added a node(character) to my Cocos3D scene, as it can be seen in the image below, I am getting dark shades in the edges of the node. Is there a way to remove these shades in the edges?

Its the image of the node added to Cocos3D scene


Solution

  • I got the solution for the above problem, first I had to set the ambient light of the scene in following way :

    self.ambientLight = CCC4FMake(0.4, 0.4, 0.4, 1.0);
    

    Then I had to set the diffuse color of the node which had the dark shades :

    self.austenNode.diffuseColor=CCC4FMake(0.9, 0.9, 0.9, 1.0);
    

    Thats all it worked :)

    enter image description here