Dumb 3D question about my Scale Matrix

Dumb 3D question about my Scale Matrix

Post by Peter Wilso » Sun, 09 Feb 2003 01:19:12



I'm writing my own custom 3D routines and I'm curious about something...
although I wouldn't say I'm stuck....

(Background... I'm using Column Vector notation in my code, so read this
from Right-to-Left)

This part works fine. Everything gets applied as I would expect.
WorldPoints =  Translation * Rotations * Scale * ObjectPoints[my cube]

The following works also, everything seems to be great:
ViewOrientationPoints = ViewMappingMatrix * WorldPoints

However when I then apply a Perspective Transform, two things happen:
 1) The perspective gets applied correctly and everything seems to rotate
and translate where I would expect it too, however,
 2) The original scale that I applied to my 3D object way back in the
beginning, has gone missing!  The object is now being
    viewed correctly, however it's just not the size I want it too be.

I'm not a maths guru, so this is puzzling me.  If anyone can shed some light
on this I would be appreciative.  I'm not entirely finished coding the
Perspective/View Volume transforms, however it seems to me, that if I have
already lost the scale at this point, then there is no way I can get it
back. What's going on?

- Peter

 
 
 

Dumb 3D question about my Scale Matrix

Post by Peter Wilso » Mon, 10 Feb 2003 07:50:42


I'm still stuck!

Any ideas?


Quote:> I'm writing my own custom 3D routines and I'm curious about something...
> although I wouldn't say I'm stuck....

> (Background... I'm using Column Vector notation in my code, so read this
> from Right-to-Left)

> This part works fine. Everything gets applied as I would expect.
> WorldPoints =  Translation * Rotations * Scale * ObjectPoints[my cube]

> The following works also, everything seems to be great:
> ViewOrientationPoints = ViewMappingMatrix * WorldPoints

> However when I then apply a Perspective Transform, two things happen:
>  1) The perspective gets applied correctly and everything seems to rotate
> and translate where I would expect it too, however,
>  2) The original scale that I applied to my 3D object way back in the
> beginning, has gone missing!  The object is now being
>     viewed correctly, however it's just not the size I want it too be.

> I'm not a maths guru, so this is puzzling me.  If anyone can shed some
light
> on this I would be appreciative.  I'm not entirely finished coding the
> Perspective/View Volume transforms, however it seems to me, that if I have
> already lost the scale at this point, then there is no way I can get it
> back. What's going on?

> - Peter


 
 
 

Dumb 3D question about my Scale Matrix

Post by Just d' FAQ » Mon, 10 Feb 2003 09:39:45


On Sat, 8 Feb 2003 03:19:12 +1100, "Peter Wilson"


>This part works fine. Everything gets applied as I would expect.
>WorldPoints =  Translation * Rotations * Scale * ObjectPoints[my cube]

>The following works also, everything seems to be great:
>ViewOrientationPoints = ViewMappingMatrix * WorldPoints

>However when I then apply a Perspective Transform, two things happen:
> 1) The perspective gets applied correctly and everything seems to rotate
>and translate where I would expect it too, however,
> 2) The original scale that I applied to my 3D object way back in the
>beginning, has gone missing!  The object is now being
>    viewed correctly, however it's just not the size I want it too be.

All I can surmise from the limited information you supply is that you
seem to have a bug ... somewhere. If you could at least state the
elements of your matrices, perhaps more would be evident.
 
 
 

1. How to get the sign of the scale in a 3D transform matrix

I using DirectX to render objects modeled in 3DS.
But some objects are mirrors, that means that they have been scaled with negative values.
I need to find such cases. I have the 3D transform matrix (4x3), i know how to get the translation,
but i don't known how to get the scale, all that i need is the sign of the scale, that can be non uniform (x<>y<>z)
Any ideias ?

thanks, in advanced
Alexandre

2. Freelance PA + MAYA Wanted

3. Indesign question-- very, very dumb question.

4. BEST RESOLUTION CANNON BJC610

5. Question re problem scaling down text with numeric scaling

6. Presets

7. Dumb and dumber Dx9.a Update install.

8. PICT. TO ILLUSTRATOR CONVERTER WANTED

9. 3D Camera Matrix question

10. 3D CAMERA MATRIX QUESTION

11. QUESTION: 3D transfor matrix

12. Question on factoring a 3D rotation matrix

13. QUESTION: 3D transform matrices