New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EnvironmentCamera #69

Closed
wahn opened this Issue Nov 21, 2018 · 2 comments

Comments

Projects
None yet
1 participant
@wahn
Copy link
Owner

wahn commented Nov 21, 2018

I asked on the PBRT mailing list (pbrt@googlegroups.com):

Are there any example .pbrt files for EnvironmentCamera and/or RealisticCamera? I couldn't find any example scenes using them ...

And Haarm-Pieter Duiker replied with:

https://github.com/hpd/PBRTForMaya/tree/master/maya/renderData

Finding the one example for the EnvironmentCamera:

> rg environment
pbrt_feature_demo_camera_environment.pbrt
27:Camera "environment"

And the resulting image (rendered with the C++ version of PBRT):

pbrt_camera_environment

Now, lets add the Rust code to render the same image ...

@wahn wahn self-assigned this Nov 21, 2018

@wahn wahn added the enhancement label Nov 21, 2018

@wahn

This comment has been minimized.

Copy link
Owner Author

wahn commented Nov 21, 2018

Here an image rendered by the Rust version (after fixing some parser problems - see commit 3a3eefd):

pbrt_camera_perspective

The environment camera was replaced by a perspective camera:

> git diff
diff --git a/maya/renderData/pbrt_feature_demo_camera_environment.pbrt b/maya/renderData/pbrt_feature_demo_camera_environment.pbrt
index 7d4182f..7ec17de 100644
--- a/maya/renderData/pbrt_feature_demo_camera_environment.pbrt
+++ b/maya/renderData/pbrt_feature_demo_camera_environment.pbrt
@@ -24,7 +24,7 @@ Accelerator "bvh"
 # Camera begin
 Scale -1 1 1
 LookAt 0.000000 4.250000 -45.000000 -0.000000 -0.177129 -2.878684 -0.000000 0.994522 0.104528
-Camera "environment"
+Camera "perspective"
        "float screenwindow" [-1.0 1.0 -0.5 0.5]
 # Camera end

We had to use the Rust version with OpenEXR support, but everything is prepared now to work on the EnvironmentCamera ...

@wahn

This comment has been minimized.

Copy link
Owner Author

wahn commented Nov 21, 2018

After commit 1ac0ef5 the Rust version (with OpenEXR support) renders fine:

pbrt_rust_camera_environment

@wahn wahn closed this Nov 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment