Question about scaled meshes and scaled normals

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
bicunisa
Posts: 34
Joined: Thu Apr 27, 2006 10:34 pm
Contact:

Question about scaled meshes and scaled normals

Post by bicunisa »

Hi guys!

I got a question about scaling stuff in Irrlicht.

When you scale a mesh using the setScale method, it does scale the normals too. So when you scale a mesh by a factor of 2, the normals should scale by a factor of 2 too.

Then could someone explain to me why when you scale a mesh bigger than it's original size it darkens, and why when you scale it below it's original size it lightens?

I know that you need to recalculate the normals to avoid this problems, but I'm looking to understand why it darkens when you scale it bigger, and not the other way around.

Thanks!
OMG another MMORPG project! AztlanRPG
Fido
Posts: 9
Joined: Sat Apr 29, 2006 11:02 am
Location: Lithuania

Post by Fido »

I know that you need to recalculate the normals to avoid this problems,
Oh dude, you solved my problem without even answering a question, i had a problem with this stuf... now i know what to do :)
Stephen Randy Davis:

A COMPUTER IS AMAZINGLY FAST, BUT INCREDIBLY STUPID MASHINE.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There is a flag which you can set such that normals are automaticlly normalized. Read the examples code.
Post Reply