User:LeonardoSegovia/GSoC 2018/Reports/Week 5

= Week 5 =

Hi everyone! This is my report for the present week.

Objectives
This week I dealt with Weeks 4-5 objectives:


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

I released two builds this week:


 * one with the Week 4 features
 * the other almost mid-week after due to a bug (more on this later!).

Remember that I was partially out on Mon-Tue because of a public class I had to prepare.

What's been done

 * In the BA thread, Zanzio found that renders were wildly inconsistent between CPU and GPU. This became noticeably if rendering with both at the same time.
 * Bug #1 was a precision issue when normalizing the coordinate frame in the presence of low roughness values.
 * Bug #2, and the true reason for this, was that somehow the GPU kernel was reordering the second set of values. I don't know why it had such an effect, but it's been fixed. Thanks to nirved again for noticing!
 * Did a bit of cleanup: store and retrieve consistently the values from the stack.
 * Merged the latest  commits (,,.
 * Lukas changed the  function signature.

What I'll do later today, and during the weekend
Today, Brecht, Lukas, nirved and I discussed on IRC the current state of the shader. This is a summary of the proposed changes:


 * Rename the Roughness parameters to (Longitudinal) &quot;Roughness&quot;, &quot;Radial Roughness&quot; and &quot;Undercoat Roughness&quot;
 * Remove the &quot;Physical&quot; parameterization
 * Rename and reorder the rest to &quot;Color&quot; (&quot;Direct coloring&quot;) &quot;Melanin&quot; (&quot;Melanin Concentration&quot;), and &quot;Absorption coefficient&quot;
 * The latter remains for debugging purposes e.g. if someone wants to use the coefficients straight from the papers
 * Remap Melanin concentration to represent:
 * Melanin -&gt; quantity
 * Melanin Redness -&gt; distribution
 * Brecht asked if Melanin could be done as a percentage of saturation (0 = white, 1 = black). I know it can be done that way (V-Ray), but there is no public, reliable mapping; for example, Tungsten's melanin values have a similar representation, but Bitterli still uses d'Eon's mapping, so the Melanin value is still an absolute concentration quantity.
 * Redo the randomization to a relative tolerance
 * Formula:
 * i.e. when randomized, the roughness value should be -
 * Implement randomization by directly retrieving Hair Info -&gt; Random unless the user sockets a different source.
 * This is easy with OSL, with SVM... not so much. I do have an idea, thanks to Principled Volume.
 * Reorder the sockets as follows:
 * Color
 * Roughness
 * Azimuthal Roughness
 * Undercoat Roughness
 * IOR
 * Offset
 * Randomize Color
 * Randomize Roughness
 * Random

Next up
If no bugs or feature requests arise in the next weeks, I'll begin porting the existing hair tests to the new shader. I reiterate the previous request for .blend hairstyles for this purpose -- it'll be great if you could post them to the BA thread!

Questions
None this week!