Skip to main content
GameDev.net gamedev.net
🔒 Locked

Projection matrix

Started by Quiksilver Jul 28, 2001 at 1:28 AM 1 replies 600+ views
Original Post
Quiksilver
Quiksilver
I am trying to make a program that is a very basic 3D engine, in software - no opengl calls. The idea is, I have a transformation matrix, and the openGL projeciton matrix. However, the object I am projecting is specified in local coordinates (ie around 0,0,0). In order for the projection to work correctly, the object has to be in the viewing volume, so I translate it. The problem is the translation messes up the transformation matrix. let P be the projection matrix, f = 200, n = 1, l=b=1, r=t=-1 let T be the transformation matrix let B be the translation to get the object into global coordinates currently, I am multiplying every point in the object by the matrix X=TPB This doesn''t work, because when the transformation is a rotation not around the axis of translation, very obvious quirks appear(not rotating the object around its origin). I swear I have tried every combination of putting the translation and inverse of the translation in, and it just will NOT come out correctly. Any help would be reaaallly nice . Thanks, Dan
dmounty
dmounty
should you not just transform, translate, then project....
ie:

X=PBT
Quiksilver
Quiksilver
Depends on your assumptions I thought. . .Does the same thing, except your model will be all right multiply, including the point, and mine will be all left multiply, including the point.

-Dan

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.