POV-Ray : Newsgroups : povray.general : Orthographic decapitation Server Time
1 Nov 2024 11:15:51 EDT (-0400)
  Orthographic decapitation (Message 1 to 7 of 7)  
From: gregjohn
Subject: Orthographic decapitation
Date: 12 Dec 2012 12:45:01
Message: <web.50c8c2599933dd6e47b8a80e0@news.povray.org>
I was playing around with tiled characters for the purposes of making sprite
sheets.  I am finding that (with code I write) that the characters of the bottom
of the screen are always cut off when I use an orthographic projection.

Can anyone fix my code so that:

1) The red spheres stay exactly on edges of screen and green spheres in corner.
(I want 100% control of the field of view here).

2) The "fakeman" objects at the bottom are not cut off?

thanks.








camera {orthographic angle  90
        location < 0.00,200*pow(2,0.5),-200*pow(2,0.5)>
        look_at 0
        right x*image_width/image_height
      }

light_source{<-31110,50000,-40000> color rgb 1}
light_source{<12220,500,40000> color rgb 2 shadowless}

#declare fakeman=union{
        cylinder{0,80*y,8 pigment {blue 1} finish {ambient rgb 0.15}}
        sphere{0,16 translate 80*y pigment{rgb <1,0.5,0>}}}
#declare tiley=//box{<-45,-5,-45>,<45,10,45> pigment{rgb 0.9}}
        superellipsoid{<0.45,0.25> scale 45*<1,0.2,1>  pigment{rgb 0.9}}
#declare unity=union{
        object{fakeman}
        object{tiley}
        }
#declare nx=-4.5;
#while(nx<6)
        #declare nz=-2.5;
        #while (nz<6)
                object{unity translate <nx*100,0,nz*200>}
        #declare nz=nz+1;
        #end
#declare nx=nx+1;
#end

sphere{0,28 pigment{red 1}}
sphere{0,28 pigment{red 1} translate <-400,  0, 400>}
sphere{0,28 pigment{red 1} translate < 400,  0, 400>}
sphere{0,28 pigment{red 1} translate <-400,  0,-400>}
sphere{0,28 pigment{red 1} translate < 400,  0,-400>}
sphere{0,28 pigment{green 1} translate < 400,  0,-400*pow(2,0.5)>}
sphere{0,28 pigment{green 1} translate <-400,  0,-400*pow(2,0.5)>}
sphere{0,28 pigment{green 1} translate < 400,  0, 400*pow(2,0.5)>}
sphere{0,28 pigment{green 1} translate <-400,  0, 400*pow(2,0.5)>}


Post a reply to this message

From: gregjohn
Subject: Re: Orthographic decapitation
Date: 12 Dec 2012 12:50:01
Message: <web.50c8c2d363ae579247b8a80e0@news.povray.org>
Bah!  double distance and 53 angle fixed it.


:"-)


Post a reply to this message

From: James Holsenback
Subject: Re: Orthographic decapitation
Date: 12 Dec 2012 13:02:42
Message: <50c8c6c2@news.povray.org>
On 12/12/2012 12:45 PM, gregjohn wrote:
> Bah!  double distance and 53 angle fixed it.
>
>
> :"-)
>
>
hey cool ... and LOL I've gotten a little comfort in seeing that I'm not 
the only one who answers my own posts ;-)


Post a reply to this message

From: Kenneth
Subject: Re: Orthographic decapitation
Date: 12 Dec 2012 23:30:01
Message: <web.50c9583163ae5792c2d977c20@news.povray.org>
In my own experience, the orthographic camera makes objects entirely disappear
when they are too close to camera, or when the camera angle zooms in to see
*slightly less* than the whole object.  What seems to be happening is the camera
doesn't work well when the view is 'inside' the borders of the object's bounding
shape.


Post a reply to this message

From: Kenneth
Subject: Re: Orthographic decapitation
Date: 13 Dec 2012 01:30:08
Message: <web.50c9751263ae5792c2d977c20@news.povray.org>
Sorry, I need to retract that, I'm mistaken. Just did some tests and the ortho
camera seems to work fine (given the caveats in the wiki docs.) Well, I *did*
have odd problems with it at one time, but I can't seem to reproduce them now.
Probably my own error in its use.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Orthographic decapitation
Date: 13 Dec 2012 03:18:57
Message: <50c98f71$1@news.povray.org>
On 12-12-2012 19:02, James Holsenback wrote:
  hey cool ... and LOL I've gotten a little comfort in seeing that I'm not
> the only one who answers my own posts ;-)

Been there, done that too ;-)

Thomas


Post a reply to this message

From: Cousin Ricky
Subject: Re: Orthographic decapitation
Date: 13 Dec 2012 13:55:01
Message: <web.50ca246363ae579278641e0c0@news.povray.org>
"gregjohn" <pte### [at] yahoocom> wrote:
> I was playing around with tiled characters for the purposes of making sprite
> sheets.  I am finding that (with code I write) that the characters of the bottom
> of the screen are always cut off when I use an orthographic projection.

I don't bother with angle when I use the orthographic camera.  I just use the up
and right vectors.


Post a reply to this message

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