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

Render Arnold's scene description #55

Open
wahn opened this Issue Aug 22, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@wahn
Owner

wahn commented Aug 22, 2018

I started to implement a parser, which can read Arnold's .ass (Arnold Scene Source) files:

> ./target/release/examples/parse_ass_file -i assets/ass/cornell_box.ass
FILE = assets/ass/cornell_box.ass
search_directory is /mill3d/users/jan/git/github/rs_pbrt/assets/ass
5174 bytes read
options {
 xres 500 
 yres 500 
 camera "CACamera" 
 GI_total_depth 11 }
persp_camera { name CACamera 
 matrix ... 
 fov 39.14625 }
standard_surface { name MAdefault }
gaussian_filter { name filter }
driver_exr { name driver }
driver_exr { name driver_emission }
driver_exr { name driver_diffuse_direct }
driver_exr { name driver_specular_direct }
driver_exr { name driver_transmission_direct }
driver_exr { name driver_transmission_indirect }
driver_exr { name driver_diffuse_indirect }
driver_exr { name driver_specular_indirect }
polymesh { name MELight 
 matrix ... 
 nsides ... 
 vidxs 4 1 UINT ... 
 vlist 4 1 VECTOR ... }
ray_switch_rgba { name MAEmitter }
mesh_light { name MALight_light 
 color 1 1 1 
 intensity 100 
 samples 2 
 mesh "MELight" }
polymesh { name MElarge_box 
 matrix ... 
 nsides 6 1 UINT ... 
 vidxs 24 1 UINT ... 
 vlist 8 1 VECTOR ... }
standard_surface { name MAbox_Material }
polymesh { name MEsmall_box 
 matrix ... 
 nsides 6 1 UINT ... 
 vidxs 24 1 UINT ... 
 vlist 8 1 VECTOR ... }
polymesh { name MEcornell_box 
 matrix ... 
 nsides 5 1 UINT ... 
 vidxs 20 1 UINT ... 
 vlist 8 1 VECTOR ... }
standard_surface { name MAcbox_Material }
standard_surface { name MAcbox_red }
standard_surface { name MAcbox_green }
render_camera = "CACamera" 
fov = 39.14625 
filter_name = "gaussian"
filter_width = 2.0
max_depth = 11
number of primitives = 36
resolution = Point2 { x: 500, y: 500 }
BVHAccel::recursive_build(...)
PT0.000493672S seconds for building BVH ...
BVHAccel::flatten_bvh_tree(...)
PT0.000001119S seconds for flattening BVH ...
Rendering with 8 thread(s) ...
1024 / 1024 [==========================================================================================================] 100.00 % 119.54/s  
Writing image "pbrt.png" with bounds Bounds2 { p_min: Point2 { x: 0, y: 0 }, p_max: Point2 { x: 500, y: 500 } }

Currently (since commit 15e69c0) it renders using path tracing and a default matte material everywhere:

pbrt

This issue keeps track of the progress ...

@wahn wahn added the enhancement label Aug 22, 2018

@wahn wahn self-assigned this Aug 22, 2018

@wahn

This comment has been minimized.

Owner

wahn commented Aug 28, 2018

Since commit 41e8b7c we can read and use the parsed standard_surface materials, but we translate them simply to a MatteMaterial using only the base_color parameter:

> ./target/release/examples/parse_ass_file -s 128 -i assets/ass/cornell_box.ass
FILE = assets/ass/cornell_box.ass
search_directory is /mill3d/users/jan/git/github/rs_pbrt/assets/ass
5174 bytes read
...
Writing image "pbrt.png" with bounds Bounds2 { p_min: Point2 { x: 0, y: 0 }, p_max: Point2 { x: 500, y: 500 } }

pbrt

BTW the -i command line parameter allows you to specify the samples_per_pixel (in this case 128).

@wahn

This comment has been minimized.

Owner

wahn commented Aug 29, 2018

Since commit c262229 we can render two more (variations of the same) scene(s). See commit 866cfbd ...

pbrt

We have to support more materials though, like glass, metal, mirror (for the mirror behind the vase and rose), or plastic (for some specular highlights) ...

@wahn

This comment has been minimized.

Owner

wahn commented Aug 29, 2018

Since commit d67d8fa we support MetalMaterial and MirrorMaterial based on Arnold's standard_surface shader parameters metalness, specular_color, and specular_roughness:

pbrt

We still miss glass and plastic like materials ...

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