mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.81k stars 431 forks source link

simple scattering scene for simplevolpath #433

Open oferyaron opened 1 month ago

oferyaron commented 1 month ago

In order to better understand the volumetric scattering basics, I am looking for a scene that complies with the simplevolpath integrator: a cube of uniform fog, a camera and an area light source which is located not in infinity. Where can I find such scene?

mmp commented 1 month ago

Here's a simple scene from our internal tests that consists of a sphere-shaped participating medium on a plane. It does have an environment map for lighting, but that's easy enough to change yourself.

Integrator "volpath"
    "integer maxdepth" [ 10 ]
Sampler "paddedsobol"
    "integer pixelsamples" [ 16 ]
Film "rgb"
    "integer xresolution" [ 512 ]
    "integer yresolution" [ 512 ]
Scale -1 1 1
LookAt 0.0715308 -4.17677 5.33558
    0.0720194 -3.62456 4.50187
    -0.000323605 0.833706 0.552208
Camera "perspective"
    "float fov" [ 45 ]

WorldBegin

AttributeBegin
    Rotate 90 1 0 0
    ConcatTransform [ 0 0 -1 0 1 0 0 0 0 1 0 0 0 0 0 1  ]
    LightSource "infinite"
        "string filename" [ "../textures/skylight-morn.exr" ]
AttributeEnd
MakeNamedMedium "absmedium"
    "rgb sigma_a" [ 4 4 4 ]
    "rgb sigma_s" [ 1 1 1 ]
    "string type" [ "homogeneous" ]

AttributeBegin
    Material ""
    MediumInterface "absmedium" ""
    Shape "sphere"
        "float radius" [ 1 ]
AttributeEnd

AttributeBegin
    Material "diffuse"
        "rgb reflectance" [ 0.5 0.5 0.5 ]
    Translate 0 0 -1
    Scale 100 100 100
    Shape "trianglemesh"
        "point3 P" [ -1 -1 0 1 -1 0 1 1 0 -1 1 0 ]
        "integer indices" [ 0 2 1 0 3 2 ]
AttributeEnd
oferyaron commented 1 month ago

Thanks, I will check it.

Ofer

בתאריך יום ד׳, 7 באוג׳ 2024, 01:45, מאת Matt Pharr ‏< @.***>:

Here's a simple scene from our internal tests that consists of a sphere-shaped participating medium on a plane. It does have an environment map for lighting, but that's easy enough to change yourself.

Integrator "volpath" "integer maxdepth" [ 10 ] Sampler "paddedsobol" "integer pixelsamples" [ 16 ] Film "rgb" "integer xresolution" [ 512 ] "integer yresolution" [ 512 ] Scale -1 1 1 LookAt 0.0715308 -4.17677 5.33558 0.0720194 -3.62456 4.50187 -0.000323605 0.833706 0.552208 Camera "perspective" "float fov" [ 45 ]

WorldBegin

AttributeBegin Rotate 90 1 0 0 ConcatTransform [ 0 0 -1 0 1 0 0 0 0 1 0 0 0 0 0 1 ] LightSource "infinite" "string filename" [ "../textures/skylight-morn.exr" ] AttributeEnd MakeNamedMedium "absmedium" "rgb sigma_a" [ 4 4 4 ] "rgb sigma_s" [ 1 1 1 ] "string type" [ "homogeneous" ]

AttributeBegin Material "" MediumInterface "absmedium" "" Shape "sphere" "float radius" [ 1 ] AttributeEnd

AttributeBegin Material "diffuse" "rgb reflectance" [ 0.5 0.5 0.5 ] Translate 0 0 -1 Scale 100 100 100 Shape "trianglemesh" "point3 P" [ -1 -1 0 1 -1 0 1 1 0 -1 1 0 ] "integer indices" [ 0 2 1 0 3 2 ] AttributeEnd

— Reply to this email directly, view it on GitHub https://github.com/mmp/pbrt-v4/issues/433#issuecomment-2272285621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVPLLF23CSOMPTUDFKNAMIDZQFGZJAVCNFSM6AAAAABL2QUT7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZSGI4DKNRSGE . You are receiving this because you authored the thread.Message ID: @.***>