Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 02 August 2012 - 06:43 AM
Posted 02 August 2012 - 06:49 AM
Posted 02 August 2012 - 07:00 AM
Posted 02 August 2012 - 07:06 AM
Edited by mhagain, 02 August 2012 - 07:07 AM.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
Posted 02 August 2012 - 09:50 AM
It doesn't really have anything to do with square root being plotted as a curve. It has to do with the fact that you can use the Pythagorean theorem, which involves a square root, to determine the length of the vector. And by dividing the vector through its length, you get a vector with the length 1 -> a unit vector.The basic problem is that normalization involves a square root, and a square root does not plot as a straight line - it's a curve. Linear interpolation is not going to preserve that.
Edited by CryZe, 02 August 2012 - 09:51 AM.
Posted 02 August 2012 - 10:09 AM
Edited by japro, 02 August 2012 - 10:10 AM.
Posted 02 August 2012 - 10:28 AM
There isn't really a general rule when to normalize or not... You use normalized vectors when you need a normalized vector. So face normals or light directions often have to be normalized for the dot products/reflections you do during lighting calculation to make sense. On the other hand when you want to raycast something, normalization of the ray direction is often not required. There isn't really a way around understanding the math behind the operations you do.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.