I have the following camera code. How do change the code to get Cavalier
projection? Thanks!
https://en.wikipedia.org/wiki/Oblique_projection
Mike
/////////////////////////////////////////////
#local cam_dist = 8;
#local cam_move = 1/2;
// military
#local cam_area = 2 * 5/4;
#local cam_loca = -z * cam_dist;
#local cam_dirc = +z;
#local cam_rgvc = +x * cam_area;
#local cam_upvc = +y * cam_area * sind(045);
#local cam_tran = transform
{
rotate +x * 045
rotate +y * 045
translate +y * cam_move
}
/*
// 8-bit video game style
#local cam_area = 2 * 5/4;
#local cam_loca = -z * cam_dist;
#local cam_dirc = +z;
#local cam_rgvc = +x * cam_area;
#local cam_upvc = +y * cam_area * sind(045);
#local cam_tran = transform
{
rotate +x * 045
translate +y * cam_move
}
*/
camera
{
orthographic
location cam_loca
direction cam_dirc
up cam_upvc
right cam_rgvc
transform {cam_tran}
}
Post a reply to this message
|