As a followup to this thread:
I have my sprites being loaded and projected onto the screen with appropriate perspective applied, great.
At this point I'm a little confused as to how to set up the coordinate system to accomplish what I'm trying to do.
I'd like a static background (ideally a skybox) placed at infinity, with the bitmaps placed at various 3D coordinates inside the "world."
So my issue is understanding how the settings in a line like this:
al_build_camera_transform(&cam_transform , 0 , 0 , 1500 , 0 , 0 , 0 , 0 , 1 , 0);
`al_perspective_transform(&proj_transform , -SCREEN_W/4 , -SCREEN_H/4 , 500 , SCREEN_W/4 , SCREEN_H/4 , 1500);`
fit in to the picture.
As I understand it, the first line sets up a camera at (0, 0, 1500) pointed towards the scene. And the second creates a perspective transform for the vertices where 500 and 1500 are the near and far object clip distances, respectively.
If I try blitting a small 2D sprite to the screen, like a star for a starfield and set its Z coordinate at something like 1400, it's scaled to be right up in front of the camera. If I set it at say 100, it's somewhat further back, but not nearly far enough back if I wanted to say scroll this starfield in the Z direction towards the camera and make it appear from "nothing."
Why is the camera position set at 1500, which is the "far" clip distance? Shouldn't it be set at the "near" clip distance?
What are the z dimensions of my 3D "world" in this setup? Is it between 500 and 1500?
I'm just having some trouble understanding how these various coordinates interrelate, any advice or references would be appreciated.