Jump to content
  • Advertisement
Sign in to follow this  
Scavenger23

model's normals are problem

This topic is 4841 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Image I imported a .obj into Irrlicht and created a light, and this is what I got. This is the creation code:
   scene::IAnimatedMesh* mesh = smgr->getMesh("fighter_outside.obj"); 
   scene::ISceneNode* node = 0; 
   scene::ILightSceneNode* light = 0; 
    
   if (mesh) 
   { 
      node = smgr->addOctTreeSceneNode(mesh->getMesh(0)); 
      node = smgr->addLightSceneNode(); 
   } 


   if (node) 
   { 
      node->setPosition(core::vector3df(-1,-5,5)); 
   } 

   if (light) 
   { 
      node->setPosition(core::vector3df(50,5,-7)); 
   } 
Does anyone have suggestions on how to fix this? [Edited by - Scavenger23 on August 19, 2005 4:54:18 PM]

Share this post


Link to post
Share on other sites
Advertisement
You mean like this?

scene::IAnimatedMesh* mesh = smgr->getMesh("fighter_outside.obj");
scene::ISceneNode* node = 0;
scene::ILightSceneNode* light = 0;

if (mesh)
{
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
light = smgr->addLightSceneNode();
}


if (node)
{
node->setPosition(core::vector3df(-1,-5,5));
}

if (light)
{
light->setPosition(core::vector3df(50,5,-7));
}


That doesn't work either. The model acts like the normals are inverted, but when I flip the normals on the model it is still the same. The light actually lights up the right parts, though.

Share this post


Link to post
Share on other sites
well, I fixed almost all of it, but it stil looks inverted. The shading is right, buy it always looks as if the normals are facing inward, no matter what I do to the model.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!