<div dir="ltr"><div><i>(This week, I'll try and post a full-featured report instead of the text-only version. As usual, it's posted to <a href="https://wiki.blender.org/index.php/User:LeonardoSegovia/GSoC_2018/Reports/Week_4">https://wiki.blender.org/index.php/User:LeonardoSegovia/GSoC_2018/Reports/Week_4</a>.)<br></i></div><h1> <span class="gmail-mw-headline" id="gmail-Week_4"></span></h1><h1><span class="gmail-mw-headline" id="gmail-Week_4"> Week 4 </span></h1>
<p>Hi everyone! Yet another week's now gone. This is my report.
</p>
<h2> <span class="gmail-mw-headline" id="gmail-Objectives"> Objectives </span></h2>
<p>This week, I think we've finished the Weeks 4-5 objectives:
</p>
<ul><li> Test shader functionality. If working, release test build.
</li><li> Evaluate received feedback. Start bug fixes.
</li></ul>
<h2> <span class="gmail-mw-headline" id="gmail-What.27s_been_done"> What's been done </span></h2>
<ul><li> Added some documentation to the node's parameters (<a href="http://developer.blender.org/rB9973c2c26f3554660546dd3452ae1234f447a00b" class="external gmail-text" rel="nofollow">rB9973c2c26f3554660546dd3452ae1234f447a00b</a>).
</li><li> Separated each mode's parameters into their own sockets.
<ul><li> Melanin: <a href="http://developer.blender.org/rB31c3476fd31c2e497a3508e3b2390a3f9c18d945" class="external gmail-text" rel="nofollow">rB31c3476fd31c2e497a3508e3b2390a3f9c18d945</a>
</li><li> Direct coloring: <a href="http://developer.blender.org/rB30369e55c1458832b4057bf94a78a66fee2e15f7" class="external gmail-text" rel="nofollow">rB30369e55c1458832b4057bf94a78a66fee2e15f7</a>
</li><li> Absorption coefficient: <a href="http://developer.blender.org/rB8547643039a22cc998479b016660d54079851ea8" class="external gmail-text" rel="nofollow">rB8547643039a22cc998479b016660d54079851ea8</a>
</li></ul>
</li><li> It seems that d'Eon's melanin mapping works as an absolute quantity, not as a ratio, so I lifted the established max melanin. (<a href="http://developer.blender.org/rB6d8eb3bdbceb09da8229946461eaff377e395e44" class="external gmail-text" rel="nofollow">rB6d8eb3bdbceb09da8229946461eaff377e395e44</a>)
</li><li> Added PBRT's and Benedikt Bitterli's sane defaults (<a href="http://developer.blender.org/rBb891aa81094707c36504b28b40ace7996401be3c" class="external gmail-text" rel="nofollow">rBb891aa81094707c36504b28b40ace7996401be3c</a>, <a href="http://developer.blender.org/rB257a7701e04db99bd5c9def75729dc07042bcb47" class="external gmail-text" rel="nofollow">rB257a7701e04db99bd5c9def75729dc07042bcb47</a>)
<ul><li> What does this mean? By default, the shader should return in all its modes brownish hair.
</li><li> I decided to follow Bitterli's defaults wrt. melanin 
concentration because his reference render (in Tungsten) used 
pheomelanin to achieve the desired colors.
</li></ul>
</li><li> Added the ability to dye hair (<a href="http://developer.blender.org/rB6e8ab6d2139590c5454f146746dc8d990b4d7e84" class="external gmail-text" rel="nofollow">rB6e8ab6d2139590c5454f146746dc8d990b4d7e84</a>).
<ul><li> To use it, simply set the melanin to a low quantity and then choose the desired color.
</li><li> This ability was inspired in <a href="https://www.chaosgroup.com/blog/v-ray-next-the-science-behind-the-new-hair-shader" class="external gmail-text" rel="nofollow">the new V-Ray hair shader</a>.
</li><li> I don't know if the way I did it is exactly how it should work, but it surely looks nice!
</li></ul>
</li><li> Added Melanin and Roughness randomization (<a href="http://developer.blender.org/rBf1bcaabb8ad141356aa217bd3f0b49b684a23f5b" class="external gmail-text" rel="nofollow">rBf1bcaabb8ad141356aa217bd3f0b49b684a23f5b</a>, <a href="http://developer.blender.org/rBb7d540f245aa4adf48ea0481f686a46cbc812ec1" class="external gmail-text" rel="nofollow">rBb7d540f245aa4adf48ea0481f686a46cbc812ec1</a>, <a href="http://developer.blender.org/rBc33fbdb9cc68bc7dd8f7e14cba9eece4d1b19e12" class="external gmail-text" rel="nofollow">rBc33fbdb9cc68bc7dd8f7e14cba9eece4d1b19e12</a>, <a href="http://developer.blender.org/rB1eb55b6d12bd5741c866d0406b8e37088db01166" class="external gmail-text" rel="nofollow">rB1eb55b6d12bd5741c866d0406b8e37088db01166</a>, <a href="http://developer.blender.org/rB332b2d6206c128bd7ac2474c8b80a55a1fcc64af" class="external gmail-text" rel="nofollow">rB332b2d6206c128bd7ac2474c8b80a55a1fcc64af</a>)
<ul><li> This lets you add further realism by varying the properties of each strand.
</li><li> To use it, set the "(Parameter) Randomization" 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.
</li><li> Do notice that this needs Hair Info->Random or other number source to work.
</li><li> 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.
</li></ul>
</li><li> Merged the latest <code>master</code> commits (<a href="http://developer.blender.org/rB9e59a1f7b5c0aca666cda737936d9fb5621423f4" class="external gmail-text" rel="nofollow">rB9e59a1f7b5c0aca666cda737936d9fb5621423f4</a>).
<ul><li> Two formatting issues were fixed.
</li></ul>
</li></ul>
<p>The node now looks like this:
</p>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:258px"><a href="https://wiki.blender.org/index.php/File:ZootopiaShaderNode-DirectColoring-week-4.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/0/0a/ZootopiaShaderNode-DirectColoring-week-4.png/256px-ZootopiaShaderNode-DirectColoring-week-4.png" class="gmail-thumbimage" width="256" height="256"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:ZootopiaShaderNode-DirectColoring-week-4.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>The node's current appearance and sockets for the Direct Coloring mode.</div></div></div></div>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:258px"><a href="https://wiki.blender.org/index.php/File:ZootopiaShaderNode-MelaninConcentration-week-4.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/3/38/ZootopiaShaderNode-MelaninConcentration-week-4.png/256px-ZootopiaShaderNode-MelaninConcentration-week-4.png" class="gmail-thumbimage" width="256" height="320"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:ZootopiaShaderNode-MelaninConcentration-week-4.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>The node's current appearance and sockets for the Melanin Concentration mode.</div></div></div></div>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:258px"><a href="https://wiki.blender.org/index.php/File:ZootopiaShaderNode-AbsorptionCoefficient-week-4.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/2/20/ZootopiaShaderNode-AbsorptionCoefficient-week-4.png/256px-ZootopiaShaderNode-AbsorptionCoefficient-week-4.png" class="gmail-thumbimage" width="256" height="256"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:ZootopiaShaderNode-AbsorptionCoefficient-week-4.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>The node's current appearance and sockets for the Absorption Coefficient mode.</div></div></div></div>
<p>nirved on IRC provided me with a reference scene that implements 
Bitterli's "Hair Curls". These images were rendered with the following 
properties:
</p>
<ul><li> For all hair curls:
<ul><li> Offset: 2.5º
</li><li> Roughness: 0.3 azimuthal and longitudinal
</li><li> Primary Reflection Roughness: 1.0 (i.e. disabled)
</li><li> Randomness: left 0 (i.e. disabled), 1 right (i.e. fully randomized)
</li><li> Hair width: 2
</li><li> Hair strands: 1 parent, 1000 children, Simple
</li><li> Random source: Hair Info -> Random -> Modulo 0.05 -> Multiply 20
<ul><li> Reduced the number of possible variations in exchange for more distinctiveness
</li></ul>
</li></ul>
</li><li> For each curl:
<ul><li> Dark: Melanin 0, Melanin Redness 8
</li><li> Brown: Melanin 0, Melanin Redness 3
</li><li> Red: Melanin 0, Melanin Redness 1.3
</li><li> Blond: Melanin 0, Melanin Redness 0.35
</li></ul>
</li><li> Sampling: Branched path tracing, 784 samples (Square), max 64 
bounces, Clamp Indirect 25, and Denoised (default parameters, but enable
 for all modes)
</li></ul>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:502px"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-norandom.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/8/83/Nirved-HairCurls-norandom.png/500px-Nirved-HairCurls-norandom.png" class="gmail-thumbimage" width="500" height="417"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-norandom.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>nirved's scene rendered with no randomized parameters.</div></div></div></div>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:502px"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-10.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/d/d6/Nirved-HairCurls-10.png/500px-Nirved-HairCurls-10.png" class="gmail-thumbimage" width="500" height="417"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-10.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>nirved's scene rendered with 10% randomness.</div></div></div></div>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:502px"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-25.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/e/e2/Nirved-HairCurls-25.png/500px-Nirved-HairCurls-25.png" class="gmail-thumbimage" width="500" height="417"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-25.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>nirved's scene rendered with 25% randomness.</div></div></div></div>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:502px"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-50.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/c/c6/Nirved-HairCurls-50.png/500px-Nirved-HairCurls-50.png" class="gmail-thumbimage" width="500" height="417"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-50.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>nirved's scene rendered with 50% randomness.</div></div></div></div>
<div class="gmail-center"><div class="gmail-thumb gmail-tnone"><div class="gmail-thumbinner" style="width:502px"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-100.png" class="gmail-image"><img alt="" src="https://wiki.blender.org/uploads/thumb/b/b6/Nirved-HairCurls-100.png/500px-Nirved-HairCurls-100.png" class="gmail-thumbimage" width="500" height="417"></a>  <div class="gmail-thumbcaption"><div class="gmail-magnify"><a href="https://wiki.blender.org/index.php/File:Nirved-HairCurls-100.png" class="gmail-internal" title="Enlarge"><img src="https://wiki.blender.org/skins/common/images/magnify-clip.png" alt="" width="15" height="11"></a></div>nirved's scene rendered with 100% randomness.</div></div></div></div>
<h2> <span class="gmail-mw-headline" id="gmail-Next_up"> Next up </span></h2>
<p>Depending on user feedback, I may change the existing melanin mapping from <i>absolute concentration</i> to <i>ratio of eu/pheomelanin</i> v. <i>concentration factor</i>.
 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.
</p><p>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.
</p><p>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!
</p>
<h2> <span class="gmail-mw-headline" id="gmail-Questions"> Questions </span></h2>
<ul><li> Do you feel the current features are sufficient and/or correct for usage by artists?
<ul><li> What would you add, change, or remove, if anything?
</li></ul>
</li></ul><br><br>-- <br>Lic. Leonardo E. Segovia<br>Departamento de Ciencias e Ingeniería de la Computación<br>Universidad Nacional del Sur<br>San Andrés 800 - Campus Palihue, B8000 Bahía Blanca, Argentina<br></div>