Note: This is an archived version of the Blender Developer Wiki (archived 2024). The current developer documentation is available on developer.blender.org/docs.

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 (rB9973c2c2).
  • Separated each mode's parameters into their own sockets.
  • It seems that d'Eon's melanin mapping works as an absolute quantity, not as a ratio, so I lifted the established max melanin. (rB6d8eb3bd)
  • Added PBRT's and Benedikt Bitterli's sane defaults (rBb891aa81, rB257a7701)
    • 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 (rB6e8ab6d2).
    • 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 (rBf1bcaabb, rBb7d540f2, rBc33fbdb9, rB1eb55b6d, rB332b2d62)
    • This lets you add further realism by varying the properties of each strand.
    • 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.
    • Do notice that this needs Hair Info->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 master commits (rB9e59a1f7).
    • Two formatting issues were fixed.

The node now looks like this:

The node's current appearance and sockets for the Direct Coloring mode.
The node's current appearance and sockets for the Melanin Concentration mode.
The node's current appearance and sockets for the Absorption Coefficient mode.

nirved on IRC provided me with a reference scene that implements Bitterli's "Hair Curls". 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 -> Random -> Modulo 0.05 -> 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)
nirved's scene rendered with no randomized parameters.
nirved's scene rendered with 10% randomness.
nirved's scene rendered with 25% randomness.
nirved's scene rendered with 50% randomness.
nirved's scene rendered with 100% randomness.

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?