POV-Ray : Newsgroups : povray.binaries.images : aspect ratio of orthographic camera : aspect ratio of orthographic camera Server Time
11 Sep 2024 22:29:39 EDT (-0400)
  aspect ratio of orthographic camera  
From: Jaap
Date: 9 Dec 2006 14:15:01
Message: <web.457b0a98988de612a8399d8d0@news.povray.org>
I'm trying to render a wall texture using an orthographic camera just in
front of a wall. (see image)
There are some shadows of boxes cast onto the wall.
The round blobs indicate the corners of the wall.
Reading the doc's, it looks like right and up vector set the size of the
camera, however my corners (round blobs) don't end up in the corners of the
rendered image. Can someone help me with this ?

The walls are generated in rhino3d, then exported to pov-ray. I add the
ray-traced textures back into the model, then export it to 3ds, then import
that into blender, then generate a standalone walkthrough using the blender
game engine.

// render options: +w256 +h256 +FN

#declare texture_corner_1 = ....
#declare texture_corner_2 = ....
// claculate camera position and size:
#declare texture_corner_1xz = texture_corner_1*<1,0,1>;
#declare texture_corner_2xz = texture_corner_2*<1,0,1>;
#declare textre_width_mm  = vlength(texture_corner_1xz-texture_corner_2xz);
#declare textre_height_mm = vlength(texture_corner_1.y-texture_corner_2.y);
#declare texture_center = (texture_corner_1+texture_corner_2)/2;
#declare texture_normal = -z;

// orthographic camera projection, using parallel camera rays:
camera {
  orthographic
  location texture_center+texture_normal*5.0  // 5.0mm in front of surface
  look_at  texture_center+texture_normal*2.5  // 2.5mm in front of surface
  right x*textre_width_mm      // horizontal size of view
  up    y*textre_height_mm     // vertical size of view
}
sphere{texture_corner_1,150 }
sphere{texture_corner_2,150 }


Post a reply to this message


Attachments:
Download 'wall_17.png' (24 KB)

Preview of image 'wall_17.png'
wall_17.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.