scenes-v3: orthographic projection vs. perspective projection

19 views
Skip to first unread message

Jan Walter

unread,
Jun 27, 2023, 11:02:51 AM6/27/23
to pb...@googlegroups.com
Hi,

There is a comparison between orthographic projection and perspective
projection (online):

https://www.pbr-book.org/3ed-2018/Camera_Models/Projective_Camera_Models#fig:ortho-vs-perspective

I tried to find the example scene from the download page here:

https://pbrt.org/scenes-v3

I assume it's trivial to change, but I couldn't find an "orthographic"
camera in any
of the .pbrt files.

The one for bmw-m6.pbrt has the parameters for the "perspective" camera:

LookAt -11 .8 5 -2 -.5 0 0 1 0
Camera "perspective" "float fov" 30

I tried the replace it by:

LookAt -11 .8 5 -2 -.5 0 0 1 0
##Camera "perspective" "float fov" 30
Camera "orthographic" "float screenwindow" [ -6 4 -3.57 3.57 ]

Which kind of works, but isn't exactly the same resulting image.
Maybe you can share those lines in question which were used for the web page.

Thanks in advance,
Jan

Matt Pharr

unread,
Jul 5, 2023, 5:27:53 AM7/5/23
to pb...@googlegroups.com
I’m not able to find that scene (and many of the scenes used for figures aren’t checked into the scenes distribution), but here’s the scene we used for the corresponding figure in the 4th edition (put it in the pbrt-v4-scenes/kroken directory and it should get everything it needs from there…)

Thanks,
Matt

Integrator "volpath" "integer maxdepth" 15

# - Camera 2: Camera_02___Chaise_Longue
# - Aspect ratio : 1
Film "gbuffer"
"integer xresolution" [1536]
"integer yresolution" [2048]

Scale -1 1 1
LookAt 227.7574 292.38632 -95.856049
227.91086 291.89169 -96.711502
0.087331988 0.86910665 -0.48685396

Camera "perspective" "float fov" [17.061531]

#Camera "orthographic" "float screenwindow" [ -60 75 -90 90 ]

WorldBegin

Include "lights.pbrt"
Include "materials.pbrt"
Include "geometry.pbrt"
> --
> You received this message because you are subscribed to the Google Groups "pbrt" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pbrt+uns...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pbrt/CAKXUb-ChBYOWCU_4XYtJOEdD4mkt22gx_2i8bF52MUt2CZjsKg%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages