Hair on displaced geometry with Redshift

   2222   1   1
User Avatar
Member
413 posts
Joined: March 2014
Offline
Does anyone know how to get hair to follow displaced geometry when using Redshift shaders ?

I found some info about setting the “displace along normal” to match the skin shader, which I've done. I tried setting a “specified shader” as well.

But so far no cigar…

Thanks.
User Avatar
Member
61 posts
Joined: April 2018
Offline
Displace Along Normal is the mode you want. The others are intended for use with Mantra shaders.

Under Hair Generate's Skin > Displacement Values, you also need to reference the displacement texture, setting scale and offset values that match those used for skin displacement in Redshift. For an example, have a look at the attached scene:

  1. A displacement texture ranging from 0 to 1 is created at /obj/T__Displacement. This texture is referenced in /mat/Surface, which is assigned to /obj/testgeometry_pighead1. In /mat/Surface/Displacement1, the texture is remapped to a range between -0.5 and 0.5, in order to have negative displacement.
  2. For /obj/testgeometry_pighead1, under Redshift OBJ > Tessellation / Displacement, the Displacement Scale is set to 0.2.
  3. To match that, /obj/hairgen1 is set, under the Skin tab, to Displace Along Normal, using Texture "op:/obj/T__Displacement/OUT", with a Scale of 0.2. Since the texture as read by Redshift is centered at 0.0, and Hair Generate is reading the texture still ranging between 0 and 1, the Offset is left at -0.5 in order to center the texture at 0.0 here as well. Also, given that the skin is tessellated at rendertime, Move Curves To Subdivision Surface is set to Always On. (This option may be toggled off and on if the texture has changed, but the Hair Generate node didn't move the curves accordingly.)

This doesn't guarantee a perfect match between hair roots and displaced skin, especially if you are using tessellation, but should be fairly close. You can also tune the Offset value to compensate for overall mismatches.

Attachments:
rs_displacement_hair.jpg (3.3 MB)
redshift_hair_displacement__forum.hiplc (867.7 KB)

  • Quick Links