User:LeonardoSegovia/GSoC 2018/Reports/Week 4

= Week 4 =

Hi everyone! Yet another week's now gone. This is my report.

Objectives
This week, I think we've finished the Weeks 4-5 objectives:


 * Test shader functionality. If working, release test build.
 * Evaluate received feedback. Start bug fixes.

What's been done

 * Added some documentation to the node's parameters.
 * Separated each mode's parameters into their own sockets.
 * Melanin:
 * Direct coloring:
 * Absorption coefficient:
 * It seems that d'Eon's melanin mapping works as an absolute quantity, not as a ratio, so I lifted the established max melanin.
 * Added PBRT's and Benedikt Bitterli's sane defaults
 * What does this mean? By default, the shader should return in all its modes brownish hair.
 * I decided to follow Bitterli's defaults wrt. melanin concentration because his reference render (in Tungsten) used pheomelanin to achieve the desired colors.
 * Added the ability to dye hair.
 * To use it, simply set the melanin to a low quantity and then choose the desired color.
 * This ability was inspired in the new V-Ray hair shader.
 * I don't know if the way I did it is exactly how it should work, but it surely looks nice!
 * Added Melanin and Roughness randomization
 * This lets you add further realism by varying the properties of each strand.
 * To use it, set the &quot;(Parameter) Randomization&quot; factor to how much (less) of the desired factor you wish your hairs to have. This is implemented as a linear progression, e.g. 0 = no randomization at all, 0.5 = hairs can have as much as 50% less melanin or roughness, 1 = completely random up to the specified value.
 * Do notice that this needs Hair Info-&gt;Random or other number source to work.
 * If you wish to disable this feature, EITHER set the Randomization factor to 0, OR unsocket the random source and set Random to 0.5.
 * Merged the latest  commits.
 * Two formatting issues were fixed.

The node now looks like this:







nirved on IRC provided me with a reference scene that implements Bitterli's &quot;Hair Curls&quot;. These images were rendered with the following properties:


 * For all hair curls:
 * Offset: 2.5º
 * Roughness: 0.3 azimuthal and longitudinal
 * Primary Reflection Roughness: 1.0 (i.e. disabled)
 * Randomness: left 0 (i.e. disabled), 1 right (i.e. fully randomized)
 * Hair width: 2
 * Hair strands: 1 parent, 1000 children, Simple
 * Random source: Hair Info -&gt; Random -&gt; Modulo 0.05 -&gt; Multiply 20
 * Reduced the number of possible variations in exchange for more distinctiveness
 * For each curl:
 * Dark: Melanin 0, Melanin Redness 8
 * Brown: Melanin 0, Melanin Redness 3
 * Red: Melanin 0, Melanin Redness 1.3
 * Blond: Melanin 0, Melanin Redness 0.35
 * Sampling: Branched path tracing, 784 samples (Square), max 64 bounces, Clamp Indirect 25, and Denoised (default parameters, but enable for all modes)











Next up
Depending on user feedback, I may change the existing melanin mapping from absolute concentration to ratio of eu/pheomelanin v. concentration factor. I don't know what maximum should we choose or the relationship between concentration factor and resulting absolute quantity (linear? logarithmic?). There is no data on this in either Pharr's or d'Eon's paper.

Please note that the university has asked me to prepare a public class as part of the examination process for my old TA post (lapsed at the end of March, prior to GSoC). Therefore, next week I may not be available immediately for bug fixes and new features.

If no bugs or feature requests arise in the next weeks, I'll begin designing tests. In the BA thread there have been requests for .blend hairstyles for this purpose -- it'll be great if you could post them!

Questions

 * Do you feel the current features are sufficient and/or correct for usage by artists?
 * What would you add, change, or remove, if anything?