Outlining Mesh? [SOLVED]

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.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

That's why Wikipedia suggests flipping the culling. Turn backface culling off and frontface culling on for the outline mesh. Now the renderer will only draw the back of the object and not the front, and the second render of the object (the main render, not the outline) will win the z-fight. Nightmare over.
Ravi08
Posts: 249
Joined: Thu Jul 17, 2008 12:25 pm

Outlining Mesh? [SOLVED]

Post by Ravi08 »

thanks for all your help.

I have followed what all you people have said and this is my solution:

i created another node to act as the outline node, scaled it and added these lines of code:

Code: Select all

        NodewithLine->setMaterialFlag(EMF_WIREFRAME, true);
        NodewithLine->getMaterial(0).EmissiveColor.set(255,255,0,0);
        NodewithLine->setMaterialFlag(EMF_BACK_FACE_CULLING, false);
        NodewithLine->setMaterialFlag(EMF_FRONT_FACE_CULLING, true);
Once again thank you :D

PS i dont know how to change the title of this post to [SOLVED] so could someone help.
"Hey Baby Wobbling Wobbling"
-Russell Peters
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

You do that by editing the subject of your original post.
Ravi08
Posts: 249
Joined: Thu Jul 17, 2008 12:25 pm

Post by Ravi08 »

k ty
"Hey Baby Wobbling Wobbling"
-Russell Peters
Post Reply