rgl-epfl / differentiable-sdf-rendering

Source code for "Differentiable Signed Distance Function Rendering" (Siggraph 2022)
BSD 3-Clause "New" or "Revised" License
861 stars 53 forks source link

Could it supports surface SDF #22

Closed LowRanker closed 1 week ago

yilmazdoga commented 3 months ago

I believe that instead of using <emitter type="envmap">, you can define custom illumination settings using <emitter type="point"> and <emitter type="area">. I have attached an example below. If your target scene contains complex illumination settings, modeling the illuminants in blender and exporting them using the mitsuba-blender add-on might be handy.


<!-- Emitters -->

    <shape type="rectangle" id="emit-Area">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 0.207677 0.000000 1.005986 -0.000000 0.000000 0.207677 1.743940 0.207677 0.000000 0.000000 0.504078 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="28.982344 28.982344 28.982344" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>
    <shape type="rectangle" id="emit-Area.001">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 0.197070 0.000000 -0.002348 -0.000000 0.000000 0.197070 1.743940 0.197070 0.000000 0.000000 0.504078 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="32.186264 32.186264 32.186264" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>
    <shape type="rectangle" id="emit-Area.002">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 0.197070 0.000000 0.001613 -0.000000 0.000000 -0.197070 -0.744040 -0.197070 0.000000 0.000000 0.504078 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="32.186264 32.186264 32.186264" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>
    <shape type="rectangle" id="emit-Area.003">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 0.197070 0.000000 1.002026 -0.000000 0.000000 -0.197070 -0.744040 -0.197070 0.000000 0.000000 0.504078 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="32.186264 32.186264 32.186264" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>
    <shape type="rectangle" id="emit-Area.006">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 -0.197070 0.000000 0.001613 0.197070 0.000000 0.000000 0.490169 0.000000 0.000000 0.197070 1.807220 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="32.186264 32.186264 32.186264" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>
    <shape type="rectangle" id="emit-Area.007">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 -0.197070 0.000000 1.002026 0.197070 0.000000 0.000000 0.488310 0.000000 0.000000 0.197070 1.807220 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="32.186264 32.186264 32.186264" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>
    <shape type="rectangle" id="emit-Area.004">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 0.197070 0.000000 1.002026 0.197070 0.000000 0.000000 0.515303 0.000000 0.000000 -0.197070 -0.796824 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="32.186264 32.186264 32.186264" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>
    <shape type="rectangle" id="emit-Area.005">
        <boolean name="flip_normals" value="true"/>
        <transform name="to_world">
            <matrix value="0.000000 0.197070 0.000000 0.001613 0.197070 0.000000 0.000000 0.509802 0.000000 0.000000 -0.197070 -0.796824 0.000000 0.000000 0.000000 1.000000"/>
        </transform>
        <emitter type="area">
            <rgb value="32.186264 32.186264 32.186264" name="radiance"/>
        </emitter>
        <bsdf type="null"/>
    </shape>