diff --git a/src/integrators/mlt/mlt.cpp b/src/integrators/mlt/mlt.cpp index 1a7e74b3..4b557164 100644 --- a/src/integrators/mlt/mlt.cpp +++ b/src/integrators/mlt/mlt.cpp @@ -67,24 +67,14 @@ public: received by the scene's sensor */ m_config.luminanceSamples = props.getInteger("luminanceSamples", 100000); - /* Should direct illumination be handled separately? (i.e. not - using MLT) This is usually the right way to go, since direct - illumination is easily handled using more optimized rendering - techniques that can make use of low-discrepancy point sets. - This in turn lets MLT focus on the more difficult parts of the - light transport. On the other hand, some scenes use very - hard to find paths even for direct illumination, in which case - it may make more sense to set this property to 'false' */ - m_config.separateDirect = props.getBoolean("separateDirect", - true); - - /* When 'separateDirect' is set to 'true', this parameter can - be used to specify the samples per pixel used to render the - direct component. Should be a power of two (otherwise, it will + /* This parameter can be used to specify the samples per pixel used to + render the direct component. Should be a power of two (otherwise, it will be rounded to the next one). When set to zero or less, the direct illumination component will be hidden, which is useful - for analyzing the component rendered by MLT. */ + for analyzing the component rendered by MLT. When set to -1, + MLT will handle direct illumination as well */ m_config.directSamples = props.getInteger("directSamples", 16); + m_config.separateDirect = m_config.directSamples >= 0; /* Specifies the number of parallel work units required for multithreaded and network rendering. When set to -1, the diff --git a/src/integrators/pssmlt/pssmlt.cpp b/src/integrators/pssmlt/pssmlt.cpp index 1f0d611c..da07747d 100644 --- a/src/integrators/pssmlt/pssmlt.cpp +++ b/src/integrators/pssmlt/pssmlt.cpp @@ -201,12 +201,12 @@ public: MLT variant. The default is 0.3. */ m_config.pLarge = props.getFloat("pLarge", 0.3f); - /* When 'separateDirect' is set to 'true', this parameter can - be used to specify the samples per pixel used to render the - direct component. Should be a power of two (otherwise, it will + /* This parameter can be used to specify the samples per pixel used to + render the direct component. Should be a power of two (otherwise, it will be rounded to the next one). When set to zero or less, the direct illumination component will be hidden, which is useful - for analyzing the component rendered by MLT. */ + for analyzing the component rendered by MLT. When set to -1, + PSSMLT will handle direct illumination as well */ m_config.directSamples = props.getInteger("directSamples", 16); m_config.separateDirect = m_config.directSamples >= 0; @@ -314,9 +314,12 @@ public: nested ? "nested " : "", cropSize.x, cropSize.y, nCores, nCores == 1 ? "core" : "cores", sampleCount); + size_t desiredMutationsPerWorkUnit = + m_config.technique == PathSampler::EBidirectional ? 100000 : 200000; + if (m_config.workUnits <= 0) m_config.workUnits = (size_t) std::ceil((cropSize.x * cropSize.y - * sampleCount) / 200000.0f); + * sampleCount) / (Float) desiredMutationsPerWorkUnit); m_config.nMutations = (cropSize.x * cropSize.y * sampleCount) / m_config.workUnits; diff --git a/src/mtsgui/resources/docs.xml b/src/mtsgui/resources/docs.xml index 499007c9..bba5963a 100644 --- a/src/mtsgui/resources/docs.xml +++ b/src/mtsgui/resources/docs.xml @@ -454,16 +454,6 @@ corresponds to ∞). A value of 1 will only render directly visible light sources. 2 will lead to single-bounce (direct-only) illumination, and so on. - - Should direct illumination be handled separately? (i.e. not - using MLT) This is usually the right way to go, since direct - illumination is easily handled using more optimized rendering - techniques that can make use of low-discrepancy point sets. - This in turn lets MLT focus on the more difficult parts of the - light transport. On the other hand, some scenes use very - hard to find paths even for direct illumination, in which case - it may make more sense to set this property to false. - When separateDirect is set to true, this parameter can be used to specify the samples per pixel used to render the @@ -517,16 +507,6 @@ corresponds to ∞). A value of 1 will only render directly visible light sources. 2 will lead to single-bounce (direct-only) illumination, and so on. - - Should direct illumination be handled separately? (i.e. not - using MLT) This is usually the right way to go, since direct - illumination is easily handled using more optimized rendering - techniques that can make use of low-discrepancy point sets. - This in turn lets MLT focus on the more difficult parts of the - light transport. On the other hand, some scenes use very - hard to find paths even for direct illumination, in which case - it may make more sense to set this property to false. - When separateDirect is set to true, this parameter can be used to specify the samples per pixel used to render the @@ -545,25 +525,6 @@ more uniform over time image -- specifically, since MLT tends to get stuck in very bright regions at the cost of the remainder of the image. - - When running two-stage MLT, this parameter influences the size - of the downsampled image created in the first pass (i.e. setting this - to 16 means that the horizontal/vertical resolution will be 16 times - lower). When the two-stage process introduces noisy halos around - very bright image regions, it might might be good to reduce this - parameter to 4 or even 1. Generally though, it should be safe to leave - it unchanged. - - - Specifies the number of parallel work units required for - multithreaded and network rendering. When set to -1, the - amount will default to four times the number of cores. Note that - every additional work unit entails a significant amount of - communication overhead (a full-sized floating put image must be - transmitted), hence it is important to set this value as low as - possible, while ensuring that there are enough units to keep all - workers busy. - Number of samples used to estimate the total luminance received by the camera's sensor. @@ -616,16 +577,6 @@ Specifies the number of mutations to be performed in each Markov Chain - - Should direct illumination be handled separately? (i.e. not - using ERPT) This is usually the right way to go, since direct - illumination is easily handled using more optimized rendering - techniques that can make use of low-discrepancy point sets. - This in turn lets ERPT focus on the more difficult parts of the - light transport. On the other hand, some scenes use very - hard to find paths even for direct illumination, in which case - it may make more sense to set this property to false. - When separateDirect is set to true, this parameter can be used to specify the samples per pixel used to render the