-
I'm implementing a custom I start with the current ...
Ray3f ray = Ray3f(ray_);
Spectrum throughput = 1.f;
Spectrum result = 0.f;
Float eta = 1.f;
UInt32 depth = 0;
Vector3f si_wi = 0.f;
...
// Accumulate, being careful with polarization (see spec_fma)
result =
spec_fma(throughput,
dr::select(emitter_mask && prev_bsdf_pdf > 0.f,
mis_bsdf, 0.f),
result);
si_wi = dr::select(emitter_mask, si.wi, si_wi);
}
// Continue tracing the path at this point?
Bool active_next =
(depth + 1 < m_max_depth) && si.is_valid() && !emitter_mask;
...
*aovs++ = si_wi.x();
*aovs++ = si_wi.y();
*aovs++ = si_wi.z();
return { /* spec = */ dr::select(valid_ray, result, 0.f),
/* valid = */ valid_ray };
}
... and add a line I use a scene config file of a cornell box ... <!-- Camera and Rendering Parameters -->
<integrator type="my_path" id="integrator">
<integer name="max_depth" value="8"/>
</integrator>
<!--<sensor type="perspective" id="sensor">-->
<!--<string name="fov_axis" value="smaller"/>-->
<!--<float name="near_clip" value="0.001000"/>-->
<!--<float name="far_clip" value="100.000000"/>-->
<!--<integer name="focus_distance" value="1000"/>-->
<!--<float name="fov" value="39.307700"/>-->
<!--<transform name="to_world">-->
<!--<rotate x="1" angle="180.00000500895632"/>-->
<!--<rotate z="1" angle="180.00000500895632"/>-->
<!--<translate value="0.000000 0.000000 3.900000"/>-->
<!--</transform>-->
<!--<sampler type="independent">-->
<!--<integer name="sample_count" value="$spp"/>-->
<!--</sampler>-->
<!--<film type="hdrfilm">-->
<!--<integer name="width" value="$resx"/>-->
<!--<integer name="height" value="$resy"/>-->
<!--<rfilter type="gaussian"/>-->
<!--<string name="pixel_format" value="rgb"/>-->
<!--<string name="component_format" value="float32"/>-->
<!--</film>-->
<!--</sensor>-->
<sensor type="radiancemeter" id="sensor">
<film type="hdrfilm">
<integer name="width" value="1"/>
<integer name="height" value="1"/>
<rfilter type="box" />
</film>
<sampler type="independent">
<integer name="sample_count" value="1"/>
</sampler>
</sensor>
...
If I comment the But, if I keep the XML file intact and use the
I'm providing Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @gerwang
|
Beta Was this translation helpful? Give feedback.
Hi @gerwang
si_wi
should be a loop state variable in yourmy_path
integrator. (It's surprising that this works at all with theperspective
sensor.)