11#include <Common/primitive_type.h>
15namespace ph {
class IRayEnergyEstimator; }
16namespace ph {
class SampleFilter; }
38 uint64 m_numSamplesPerPixel;
40 uint32 m_glossyMergeBeginLength;
41 uint32 m_stochasticViewSampleBeginLength;
46 ClassType clazz(
"photon-mapping");
47 clazz.docName(
"Photon Mapping Visualizer");
48 clazz.description(
"Render frames with common photon mapping methods.");
53 "The photon mapping technique used by the visualizer.");
60 "Sample filter for the film sampling process.");
63 clazz.addField(sampleFilter);
70 "Number of photons used. For progressive techniques, this value is for a single pass.");
71 numPhotons.
defaultTo(commonParams.numPhotons);
73 clazz.addField(numPhotons);
77 "Number of passes performed by progressive techniques.");
78 numPasses.
defaultTo(commonParams.numPasses);
80 clazz.addField(numPasses);
84 "Number of samples per pixel. Higher values can resolve image aliasing, but can consume "
85 "large amounts of memory for some algorithms. This value can also mean the number of "
86 "statistics gathered in a single pixel for some techniques. If the value is not a "
87 "power-of-2 number, it may be adjusted.");
88 numSamplesPerPixel.
defaultTo(commonParams.numSamplesPerPixel);
90 clazz.addField(numSamplesPerPixel);
94 "Energy contribution radius for each photon. For progressive techniques, this value is for "
95 "setting up the initial radius.");
96 photonRadius.
defaultTo(commonParams.kernelRadius);
98 clazz.addField(photonRadius);
100 TSdlUInt32<OwnerType> glossyMergeBeginLength(
"glossy-merge-begin-length", &OwnerType::m_glossyMergeBeginLength);
102 "Hint for the minimum path length to start estimating energy using photons on glossy surface."
103 "If the scene contains diffuse surface and is easily reachable by photons, it is recommended "
104 "to set this to a lower value.");
105 glossyMergeBeginLength.
defaultTo(commonParams.glossyMergeBeginLength);
107 clazz.addField(glossyMergeBeginLength);
109 TSdlUInt32<OwnerType> stochasticViewSampleBeginLength(
"stochastic-view-sample-begin-length", &OwnerType::m_stochasticViewSampleBeginLength);
111 "Hint for the view path length to start random path sampling. If this value differ too much "
112 "from the mean specular path length from the scene, the energy estimation result may contain "
113 "higher variance or bias. Beware when using higher values as non-stochastic path may be "
114 "branched, which can result in exponential growth of number of rays.");
115 stochasticViewSampleBeginLength.
defaultTo(commonParams.stochasticViewSampleBeginLength);
116 stochasticViewSampleBeginLength.
optional();
117 clazz.addField(stochasticViewSampleBeginLength);
132 return m_sampleFilter;
Definition CoreCookedUnit.h:19
Definition CoreCookingContext.h:15
Definition FrameVisualizer.h:16
Common parameters of photon mapping.
Definition PMCommonParams.h:13
Definition PhotonMappingVisualizer.h:22
ESampleFilter getSampleFilter() const
Definition PhotonMappingVisualizer.h:130
void cook(const CoreCookingContext &ctx, CoreCookedUnit &cooked) override
Definition PhotonMappingVisualizer.cpp:18
EPhotonMappingMode getMode() const
Definition PhotonMappingVisualizer.h:125
PMCommonParams makeCommonParams() const
Definition PhotonMappingVisualizer.cpp:123
SampleFilter makeSampleFilter() const
Definition PhotonMappingVisualizer.cpp:102
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< PhotonMappingVisualizer >)
Definition PhotonMappingVisualizer.h:44
An image reconstruction kernel.
Definition SampleFilter.h:17
Definition TSdlEnumField.h:23
A field class that binds a integral member variable.
Definition TSdlInteger.h:21
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
A field class that binds a floating point member variable.
Definition TSdlReal.h:21
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
The root for all renderer implementations.
Definition EEngineProject.h:6
ESampleFilter
Definition sdl_sample_filter_type.h:9
EPhotonMappingMode
Definition sdl_photon_mapping_mode.h:9