• Create Account

Banner advertising on our site currently available from just \$5!

#ActualTom KQT

Posted 13 June 2013 - 11:59 PM

For the longest time I was content to think that 'w' was just added to vector processors to fill in the extra value in the set of four to match the four values neccessary for color. From all this I've gathered that 'w' is neccessary to make the perspective matrix work. So if I were to carry this logic further I would surmise that 'w' is scaled down by the projection matrix math for vertices that are further back and scaled up for objects that are closer to give the illusion of depth. Thus we have perspective on the matter!

It's actually more general than this. Homogenous coordinates are used for transformations done by matrix multiplication. For example even simple translation would not be possible with just x,y,z vectors and a 3x3 matrix.

Btw, to the discussion - IMHO you really don't need to understand homogenous coordinates to be able to work with 3D graphics. You can be fine for a looooong time with just remembering that direction vectors have w = 0 and points have w = 1. That's what you'll eventually may need to code manually in a shader or something, when you have just a x,y,z vector and want to make matrix transformations with it.

But of course it's always better if you do understand it.

#3Tom KQT

Posted 13 June 2013 - 10:54 PM

For the longest time I was content to think that 'w' was just added to vector processors to fill in the extra value in the set of four to match the four values neccessary for color. From all this I've gathered that 'w' is neccessary to make the perspective matrix work. So if I were to carry this logic further I would surmise that 'w' is scaled down by the projection matrix math for vertices that are further back and scaled up for objects that are closer to give the illusion of depth. Thus we have perspective on the matter!

It's actually more general than this. Homogenous coordinates are used for transformations done by matrix multiplication. For example even simple translation would not be possible with just x,y,z vectors and a 3x3 matrix.

Btw, to the discussion - IMHO you really don't need to understand homogenous coordinates to be able to work with 3D graphics. You can be fine for a looooong time with just remembering, that direction vectors have w = 0 and points have w = 1. That's what you'll eventually may need to code manually in a shader or something, when you have just a x,y,z vector and want to make matrix transformations with it.

But of course it's always better if you do understand it.

#2Tom KQT

Posted 13 June 2013 - 10:53 PM

For the longest time I was content to think that 'w' was just added to vector processors to fill in the extra value in the set of four to match the four values neccessary for color. From all this I've gathered that 'w' is neccessary to make the perspective matrix work. So if I were to carry this logic further I would surmise that 'w' is scaled down by the projection matrix math for vertices that are further back and scaled up for objects that are closer to give the illusion of depth. Thus we have perspective on the matter!

It's actually more general than this. Homogenous coordinates are used for transformations done by matrix multiplication. For example even simple translation would not be possible with just x,y,z vectors and a 3x3 matrix.

Btw, to the discussion - IMHO you really don't need to understand homogenous coordinates to be able to work with 3D graphics. You can be fine for a looooong time with just remembering, that direction vectors have w = 0 and points have w = 1. That's what you'll eventually may need to code manually in a shader or something, when you have just a x,y,z vector and want to make matrix transformations with it.

#1Tom KQT

Posted 13 June 2013 - 10:45 PM

For the longest time I was content to think that 'w' was just added to vector processors to fill in the extra value in the set of four to match the four values neccessary for color. From all this I've gathered that 'w' is neccessary to make the perspective matrix work. So if I were to carry this logic further I would surmise that 'w' is scaled down by the projection matrix math for vertices that are further back and scaled up for objects that are closer to give the illusion of depth. Thus we have perspective on the matter!

It's actually more general than this. Homogenous coordinates are used for transformations done by matrix multiplication. For example even simple translation would not be possible with just x,y,z vectors and a 3x3 matrix.

PARTNERS