User:Lukasstockner97/Weekly Reports

Week 4 and 5 (2023-01-23 to 2023-02-05)

 * Fixed (Side-by-side stereoscopic renders in 3.3.1 ignore color management)
 * Fixed (Incorrect diffuse color pass for Sheen)
 * Looked into (AO node is not supported for direct lighting transparency)
 * Looked into (Emissive meshes and shadowcatcher)
 * Started submitting pieces of the Principled v2 work:
 * Created and merged (Switching to non-separable shadowing-masking term for Microfacet BSDFs)
 * Created and merged (Using a faster and exact GGX VNDF sampling algorithm)
 * Created and merged (Reorganizing Fresnel handling in the Microfacet BSDFs)
 * Created (Merge Anisotropic BSDF node into Glossy BSDF node)
 * Created (Use per-microfacet Fresnel term for Glass closures)
 * Created (Reorganizing Fresnel handling further, implement OSL MaterialX closures)
 * Working on splitting out the next step: Removing the MultiGGX code
 * Created and merged (Cycles tests comparison helper option)
 * Committed (Small Cycles closure cleanup)

Week 48 to 3 (2022-11-28 to 2023-01-22)

 * Looked into (artifacts when baking Bevel normals in Cycles)
 * Created and merged to fix one of the two issues with Bevel baking
 * Fixed (Workbench render crash in 3.4)
 * Looked into and closed (Unexpected behavior when combining Color Attributes with White Noise Texture)
 * Fixed (Incorrect Depth Pass rendering for Shadow Catcher Objects)
 * Looked into, was already fixed
 * Fixed (World background contributing to wrong lightgroup)
 * Fixed (Lightgroups receiving light on shadowcatcher objects)
 * Fixed (Cycles viewport deadlock)
 * Looked into and closed (Black areas in Refraction BSDF)
 * Fixed (Incorrect light passes with volumetric scattering)
 * Fixed (AO pass broken for shadow catcher objects)
 * Fixed (Incorrect stereoscopic panoramas)
 * Fixed (Several Cycles issues with objects with negative scale)
 * Fixed (Slightly incorrect handling of motion blur shutter curve)
 * Fixed (Missing viewport update for shadowcatcher self-shadowing)
 * Looked into (New particles aren't rendered when Vector pass is enabled)
 * Fixed (Incorrect handling of muted nodes in Cycles)
 * Started creating additional Cycles tests to cover some of the bugs above
 * Looked into updating the Node socket Panel patch, still need to discuss data layout further
 * Started splitting some of the parts of Principled v2 out into separate patches can be reviewed, first up are Microfacet changes and removal of MultiGGX code
 * Working on finishing several changes to Principled v2 so they can be pushed (thin sheet mode, metallic thin film, new sheen model, artistic controls)
 * Christmas break :)

Week 43 to 47 (2022-10-24 to 2022-11-27)

 * Blender Conference!
 * Continued work on Principled v2
 * Implemented thin film option for iridescence effects
 * Implemented node sections to keep large nodes manageable
 * Added Wavelength unit for thin film and wavelength node
 * Various small fixes and improvements
 * Worked on the following topics, not yet finished:
 * Fixing SSS on GPUs
 * Nested dielectrics
 * Thin Sheet mode
 * Artistic controls
 * Thin Film support for metals
 * Improved sheen model: https://tizianzeltner.com/projects/Zeltner2022Practical/
 * Merged (Parallel ImBuf conversion to float)
 * Fixed (First render with unknown image colorspace looks different) with
 * Created to fix  (Shadow catcher objects are double-counting data passes)
 * Investigated (Cycles does not generate the exact same images when a scene is rendered twice)

Week 41 and 42 (2022-10-09 to 2022-10-23)

 * Investigated (Random Object Info not working on instanced curves)
 * Investigated (Vector pass not being saved correctly when using the File Output node)
 * Created to fix it
 * Fixed (Animated Holdout not updating on frame change)
 * Fixed (Noise texture shows incorrect behaviour for large scale values)
 * Fixed (Regression: cycles not updated when off object types in "View object Types" menu)
 * Investigated (Cycles: not updating for homogeneous to heterogeneous volume change in viewport render), was fixed already
 * Investigated (First render of barbershop appears different)
 * Investigated (Problem mixing Hair shader using color ramp and Hair Info Intercept value), was fixed already
 * Fixed (Blender still generates subsurface render passes)
 * Ended up being a overall change to the way Blender handles render passes, see
 * Fixed (Cycles: No Hair Shadows with Transparent BSDF)
 * Fixed (Crash when using large texture with nonstandard colorspace)
 * Also created to speed up the image loading here
 * Fixed (Regression: EXR 'JPG Preview' doesn't use color space anymore)

Week 40 (2022-10-02 to 2022-10-08)
Finally back and able to spend time on Blender properly again!
 * Merged latest master changes (e.g. Spectral data type preparation, ray differentials change) into Principled v2 branch
 * Unified old and new Principled clearcoat BSDFs
 * Started working on more general Fresnel control for Principled v2 (to allow e.g. compatibility with glTF and Spec/Gloss workflow)
 * Fixed (Crash in the new Mikktspace code for meshes consisting only of invalid triangles)
 * Fixed (Cycles crash when device initialization fails)
 * Fixed Cycles side of (Crash when using a boolean input in an OSL script)

Week 31 to 33 (2022-07-25 to 2022-08-21)

 * Vacation! I was away for most of the time, but I did manage to get some stuff in.
 * Created (Mikktspace C++ port for more performance)
 * Most of the time I had was spent on the initial port as well as tons of cleanup and optimization
 * Also created for moving the relevant BKE files to C++
 * Looked into bugs and
 * Continued working on Principled v2
 * Not a lot though, most of the time went into Mikktspace

Week 29 and 30 (2022-07-11 to 2022-07-24)

 * Updated (Nishita Sky support in Eevee), should be ready for merging now
 * Merged (Render: Update lightgroup membership in objects and world if lightgroup is renamed)
 * Looked into (Black dots in Shadow Catcher)
 * Fixed (Light group passes do not work when shadow catcher is used)
 * Continued working on Principled v2
 * Looked through user feedback, especially regarding Fresnel term
 * Spent more time looking into how others are doing Fresnel controls to ensure broad compatibility
 * Replaced Generalized Schlick Fresnel for the metallic component with Adobe's F82 model
 * Provides more realistic look (darkening at near-grazing angles, full reflection at grazing angles)
 * Compatible with Principled v1 at default (edge color white)
 * Created script for fitting the F82 metallic model to real-world metal measurements
 * Provided values and example renders for several metals in
 * Created, the sampling patch from the last weeks

Week 27 and 28 (2022-06-28 to 2022-07-10)

 * Continued working on Principled v2
 * Published first version of the branch (https://developer.blender.org/diffusion/B/history/principled-v2/)
 * Created, a task for tracking development progress
 * Fixed several bugs (e.g. incorrect glass reflection/transmission pick, black glass at zero roughness)
 * Started working on Iridescence component
 * Looked closer into what others in the field are doing for compatibility
 * Went to EGSR 2022, saw many great papers and talked to many great people
 * Revisited the sampling work from week 22/23, WIP version of the patch will go up soon
 * Significantly reduces noise in some cases
 * The improved stratification helps when individual dimensions are causing the noise (e.g. time dimension for strong motion blur, lens dimensions for DoF, light picking dimension for direct lighting)
 * When the noise comes from the overall light transport (e.g. indirect lighting), the effect is not really noticeable
 * Some details still need to be worked out (e.g. jittering distance controls)

Week 26 (2022-06-20 to 2022-06-27)

 * Continued working on Principled v2
 * Fixed incorrect clearcoat tint logic
 * Spent too much time trying to get an analytical and later numerical approximation to the average exit bounce extinction, ended up just leaving a comment for now
 * Replaced GTR1 distribution for clearcoat with GGX
 * Implemented proper energy conservation for diffuse/SSS and clearcoat layers
 * Started reviewing (path guiding)
 * Started reviewing current state of ) (GSoC multi light sampling)
 * Started reading EGSR 2022 papers

Week 25 (2022-06-13 to 2022-06-19)

 * Continued working on Principled v2
 * Basic components are all working now
 * Cleanup is still needed, but probably good enough to publish as a branch
 * Spent a lot of time on trying to avoid or shrink albedo LUTs, unfortunately with mixed results

Week 24 (2022-06-06 to 2022-06-12)

 * Continuing work on Principled, Sampling and Mikktspace
 * Created Wiki page with notes regarding Principled: https://wiki.blender.org/wiki/User:Lukasstockner97/Principled_v2

Week 22 and 23 (2022-05-23 to 2022-06-05)

 * Worked on "Principled v2"
 * Refactored SVM implementation of Principled node to clean up input passing
 * Split SVM implementation of old Principled BSDF into components (diffuse+SSS, specular, glass etc.)
 * Started implementing components of new Principled BSDF
 * Spent some time looking into Cycles sampling improvements
 * Better hash function for reordering samples, preserving 2D stratification for PMJ during reordering, proper hash-based Owen scrambling, padding Sobol sequence to avoid higher dimension vectors...
 * Got some promising results but needs further investigation
 * Will also look into screen-space blue noise
 * Ported Mikktspace tangent code to C++
 * Allows to simplify code considerably
 * Currently ~30% faster
 * New code opens up parallelization opportunities
 * Many additional small optimizations possible (e.g. SIMDify vector operations, use saved memory to cache normals, ...)
 * Should also look into parallelizing tangent computation across meshes in Cycles since this step does not make use of the Blender API

Week 21 (2022-05-16 to 2022-05-22)

 * Spent the entire week on-site in Amsterdam
 * Cleaned up the Microfacet code further to improve maintainability
 * Replaced Multi-scattering GGX with a albedo-scaling factor on top of the regular GGX closures
 * Worked on design for "Principled v2" (placeholder name) and started implementation
 * Still need to create a design task and branch

Week 20 (2022-05-09 to 2022-05-15)

 * Not a lot happened this week, I spent more time on university so I can spend the entire next week on Blender while I'm in Amsterdam.
 * Mostly researched options for the Principled BSDF work
 * The entire thing might be growing from a few small fixes into a Principled v2 at this point
 * Goal would be to "catch up" to improvements in the physically-based shading space over the last few years
 * Tricky part will be balancing flexibility and power vs. ease of use (avoid having 50 inputs...)

Week 19 (2022-05-02 to 2022-05-08)

 * Fixed, then realized that a commit with the same fix (for a different bug) had already been committed a few days ago and I hadn't updated my checkout :(
 * Looked into some other open bugs (,, and a bunch of others related to Multiscattering GGX)
 * Created (GGX Microfacet refactor)
 * Not much changes from the user perspective, just slightly brighter reflections at grazing angles due to a more accurate shadowing-masking function
 * Also basically no impact on performance or noise, but makes the code easier to understand and maintain
 * Finally produces expected results for approximate multiscattering precomputation (see Week 17)
 * Got initial version of the two approximate multiscattering approaches working, will compare further
 * Still needs glass version and color handling to properly replace the current multiscattering code
 * Will create test build when it's ready for user feedback

Week 18 (2022-04-25 to 2022-05-01)

 * Reviewed (LRU cache for dynamic Cycles kernels)
 * Fixed (Light leaks with Multiscatter GGX and normal maps)
 * Created to fix  (Object Attributes not updating when rendering on GPU)
 * Started to fix, currently tracked it down to an uninitialized stack read in the SVM code of a shader
 * Looked into the GGX issue mentioned last week a bit more, nothing solid yet. Might be related to different versions of the Smith shadowing term?
 * More planning regarding Principled BSDF improvements, will write proper description soon.

Week 17 (2022-04-18 to 2022-04-24)

 * Merged (Speeing up tangent space computation)
 * Created, fixes (Nodes not draggable when clicking on labels since the tooltip change)
 * Created (Updating lightgroup membership of objects and world when renaming lightgroups)
 * Started to work on Principled BSDF improvements:
 * Created precomputation code for the approximate multiscattering code, noticed discrepancy between Cycles' GGX and other renderers at grazing angles. Need to investigate further.
 * Implemented improved GGX VNDF importance sampling code, doesn't make much difference for noise or render time but is simpler.

Week 16 (2022-04-11 to 2022-04-17)

 * Merged (Node socket tooltip support), Blender is ready for adding socket descriptions now
 * Fixed small unreported issue (Same Material selection in grease pencil used the wrong hash type)
 * Reviewed (Fix for UDIM texture detection)
 * Looked into (Slow initialization of viewport rendering when adding an unconnected Normal Map node)
 * Created (Speeding up tangent space computation), also spent a lot of time on additional optimization that didn't really work out yet.
 * Started to look into Principled BSDF improvements:
 * Current ideas:
 * Replacing the Monte-Carlo-based Multiscattering GGX with an approximate approach
 * Would solve the same problem (darkening at high roughness) but reduce noise, render times and code complexity
 * Two approaches to correction terms are known (Kelemen-style or Turquin-style), would prefer the latter currently
 * Add support for metallic Fresnel term using an artist-friendly parametrization (e.g. "edge color" input)
 * Could maybe expose physical parameters in e.g. the Glossy BSDF
 * Fix current ad-hoc (and sometimes questionable) mixing of BSDF lobes by defining (and documenting!) a consistent and physically plausible model
 * Includes reformulating the sheen and clearcoat parts as coatings (see SPI slides below)
 * Replacing diffuse entry into random-walk SSS by refraction, would improve the bright edges at low albedo
 * Adding a thin sheet BSDF, possibly as a separate node?
 * Would need to remain close to the current BSDF of course to avoid notable changes in existing scenes
 * Relevant material:
 * "Extending the Disney BRDF to a BSDF with Integrated Subsurface Scattering" by Brent Burley, main reference for the model used in the Principled BSDF
 * "A Multi-Faceted Exploration" by Stephen Hill, great blog series about multiscattering corrections
 * "Practical multiple scattering compensation for microfacet models" by Emmanuel Turquin, technical report about multiscattering correction
 * "Revisiting Physically Based Shading at Imageworks" by Christopher Kulla and Alejandro Conty, fantastic reference for physically-based BSDF models

Week 15 (2022-04-04 to 2022-04-10)

 * Reviewed (UDIM packing), ready for merge now.
 * Updated (Light group improvement collection)
 * Merged (Light Group UI improvement: Adding light groups from object/world properties)
 * Fixed (Color AOV passes missing their alpha pass since Blender 3.0)
 * Created (Light group improvement: Operators for adding all used or removing all unused lightgroups)
 * Started working on showing lightgroups in viewport rendering
 * Updated (Node socket tooltip support), much cleaner implementation now.

Week 14 (2022-03-28 to 2022-04-03)

 * Reviewed, polished and merged (Cycles Light Groups)
 * Reviewed and merged (Fix for Light Groups on lamps)
 * Fixed (Emitters themselves not showing up in Light Groups)
 * Reviewed (UDIM packing)
 * Created (Light Group UI improvement: Adding light groups from object/world properties)

Week 13 (2022-03-21 to 2022-03-27)

 * Continued to catch up on code changes (e.g. C++ification of the core)
 * Updated (Nishita Sky support in Eevee) to address review comments.
 * Updated (Tooltip support for node sockets) to address review comments
 * Uses a different approach now to reduce hackiness and also supports tooltips in the Material Properties tab
 * Also spent way too much time digging through the UI code trying yet another approach that went nowhere...
 * Reviewed (Preparation for UDIM packing)
 * Reviewed (UDIM packing)
 * Started reviewing (Cycles Light Groups)

Week 12 (2022-03-14 to 2022-03-20)

 * Went through the onboarding process
 * Set up my local development setup properly again
 * Caught up on the development process changes and the Cycles-X architecture (not fully happy with my understanding yet, will continue, probably by fixing bugs)
 * Updated (Nishita Sky support in Eevee) and prepared compatibility with rewrite branch
 * Updated (Tooltip support for node sockets) and integrated the existing work on Geometry Node introspection. The actual tooltip content and showing them in the Material Properties tab is still TODO.