Discussion:
[Pipmak-Devel] A strange behaviour: visualization bug or what?
Andrea Viarengo
2008-02-27 14:00:23 UTC
Permalink
Hi, Chris,

I continue to my esperiments using patch with 3D positioning,

I have tryed this simple code:

------------------------------------------------------------------------------------------------
cubic {
"SkyBoxFront.jpg",
"SkyBoxRight.jpg",
"SkyBoxBack.jpg",
"SkyBoxLeft.jpg",
"SkyBoxTop.jpg",
"white.png"
}

p=patch {nw=1,nh=1,nx=0,ny=-0.5,nz=1,anglex=90,image="circle.png",anchorh=256,anchorv=256}

p:setcolor(1,0,0)
p=patch {nw=1,nh=1,nx=0,ny=0.5,nz=1,anglex=90,image="circle.png",anchorh=256,anchorv=256}

p:setcolor(0,0,1)
p=patch {nw=1,nh=1,nx=0,ny=0,nz=1,anglex=0,angley=0,image="white.png",anchorh=256,anchorv=256}

p:setcolor(0,1,0)
-------------------------------------------------------------------------------------------------

And I have obtained the pictures that I have attached to this email (the
second use angley=55)

Well, as you can see in the pictures, there are something wrong....
Why the rectangular patch (the third) doesn't cut circles exactly half? But
it seems moved back?

Why the center of the circle isn't at the same level of maximum extension of
the circle?

Bye,

Andrea
Andrea Viarengo
2008-02-27 14:19:41 UTC
Permalink
The attached picture is shown what I would have expected ....

Obtained moving the third patch forward:

------------------------------------
.....
p=patch {nw=0.88,nh=1,nx=0,ny=0,nz=0.75,anglex=0,angley=0,image="white.png",anchorh=256,anchorv=256}

....
------------------------------------

-Andrea
Christian Walther
2008-02-27 18:38:22 UTC
Permalink
Why the rectangular patch (the third) doesn't cut circles exactly half? But it seems moved back?
Let me guess: The rectangle does cut the circles in half. But you're
using an extremely large field of view and therefore have lots of
perspective distortion.

Try placing your eye so close to the screen that you actually see it
under the field of view that you've set the camera to, and you'll see
that the cylinder looks perfectly normal.

Or try zooming in the camera as far as it will go (5 degrees) and move
the scene farther away in the y direction so you still see all of it.
The attached picture is shown what I would have expected ....
You'd expect that with an orthographic camera, or in the limit of FOV ->
0 for a perspective camera.

-Christian

Loading...