Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Projection Problems; can't work the formula out.
Topic Started: May 18 2008, 05:20 AM (113 Views)
Dead1yM00
Member Avatar
Genius
[ *  *  * ]
a few of you may remeber i once tried to create an unregistered GM 3D engine.
it relied completly on point_direction for the projection.

Im having another crack at making one. However, this time i am going to use the correct formulas so i dont get any image distortion.

i started off using:
Draw_x = (cameraCanvas_dist * yPoint) / (cameraCanvas_dist + xpoint);
Draw_y = (cameraCanvas_dist * zPoint) / (cameraCanvas_dist + xpoint);

and having the camera look down the x axis (im using GM axis with z out towards the screen). The math behind these formulas is basicaly that the x draw point is calculated by having a td view and using trig to find where it intersects the canvas. Same for the y except it uses a platform view. See pic.

this method required that you keep the camera still and move/rotate the objects to make it look like your moving the camera.

Does anyone know the correct formula or code to get a projectio if you know the point x/y/z, the camera x/y/z, the canvas size/dist to camera, and the rotation of the camera?

Dr Best should know the answer to this because he created a whole dll for 3D.
"I can't uninstall it, there seems to be some kind of 'Uninstall Shield'."

"Crap... Someone knocked over my recycle bin... There's icons all over my desktop..."

"'INSERT DISK THREE' ? But I can only get two in the drive !"

http://www.gdargaud.net/Humor/QuotesComputer.html
Offline Profile Quote Post Goto Top
 
« Previous Topic · Off-topic · Next Topic »
Add Reply