Do I Understand Displacement Maps?

Here's how I think displacement maps work in DAZ Studio:

  • Black (RGB 0,0,0) is low. If your minimum displacement setting is left at the default of 0, then black = no displacement
  • White (RGB 255,255,255) is high. It will be translated to whatever is the maximum displacement setting you select in the Surfaces tab
  • Shades of gray map proportionally between the minimum and maximum displacement

I wanted to draw veins on a character's skin, so I filled a .jpg with black and used a soft white brush to draw the veins. The result looks great, except that when the displacement map is used, seams pop out between this section of skin and others that don't have displacement maps. Light reflects off the surface's edges as if there is a slightly raised area there.

The fact that it isn't seamless suggests I'm doing something wrong. Have I misunderstood how displacement maps are supposed to work?

Comments

  • WendyLuvsCatzWendyLuvsCatz Posts: 38,874

    in DAZ studio I believe zero is a neutral grey as it has positive and negative displacement

    it varies between apps

    in many other apps indeed black is zero but not in D|S

  • ChoholeChohole Posts: 33,604

    mid grey is flat.  Black recedes, goes down  White goes up       for biological features made using displacement you need a smooth transition through the shades to give the soft edge  

  • Richard HaseltineRichard Haseltine Posts: 104,149

    The default minimum is not 0, that's the issue. other than that you are correct - and mid-grey is the mid-point between the two extremes, it's neutral only if they are of the same magnitude and opposite sign.

  • gederixgederix Posts: 390

    Rather than filling the layer with 100 black you want to use 50black. In photoshop one way is to switch to the HSB color sliders and go 0 0 50.

    (PS additional tip: The HSB 0 0 50 layer is also a handy trick for using the burn/dodge tool without permanently affecting the image. Which among other things is useful for hand-painting liquids).

    Displacement map seams is a whole other issue, personally I avoid them on people for that very reason.

  • jestmartjestmart Posts: 4,449

    Black is 0 and white is 1 and all the greys in between.  Use a 16 bit or 32 bit grey-scale format to have more 'in betweens' and  smoother displacement.

     

  • Richard HaseltineRichard Haseltine Posts: 104,149
    gederix said:

    Rather than filling the layer with 100 black you want to use 50black. In photoshop one way is to switch to the HSB color sliders and go 0 0 50.

    (PS additional tip: The HSB 0 0 50 layer is also a handy trick for using the burn/dodge tool without permanently affecting the image. Which among other things is useful for hand-painting liquids).

    Displacement map seams is a whole other issue, personally I avoid them on people for that very reason.

    This wastes half of the value range - use black as the base and set the minimum value to 0 should work.

  • InkuboInkubo Posts: 745

    Thank you all.

    Richard, do you therefore believe that DS would handle displacement so that if skin part A has no displacement map and skin part B has a minimum displacement of exactly zero and a higher maximum and a displacement map that's black where the skin parts meet, then there should be no visible displacement seam?

    That was a complex sentence, so I'm going to restate the same thing in a different way:

    • Skin Part A: Displacement Map = None, Strength = 0
    • Skin Part B: Displacement Map = Mostly black jpg with smoothly graded white veins in places where no skin parts should meet, Strength = 1, Minimum = 0, Maximum = 1 or 3 or whatever.

    I drew in black and white, but didn't do anything to ask GIMP to convert my map to grayscale, so maybe that's my problem...

  • gederixgederix Posts: 390
    gederix said:

    Rather than filling the layer with 100 black you want to use 50black. In photoshop one way is to switch to the HSB color sliders and go 0 0 50.

    (PS additional tip: The HSB 0 0 50 layer is also a handy trick for using the burn/dodge tool without permanently affecting the image. Which among other things is useful for hand-painting liquids).

    Displacement map seams is a whole other issue, personally I avoid them on people for that very reason.

    This wastes half of the value range - use black as the base and set the minimum value to 0 should work.

    I guess I misunderstood what you were saying. Still dont actually. If what Chohole said is correct my method should work and would use the whole range. Paint whites for heights and blacks for depths on a 50grey surface.

     

  • kitakoredazkitakoredaz Posts: 3,526
    edited July 2017

    when I tested before which value is newtral for DS iray, with displacement map, actually gley (in gimp  H value = 50)

    was perfect newtral as default setting,,  (need to gamma setting correctly = 1.0)

    and when displace ment map = newtral grey,  and Min and max  Absolute values are equal ( min -1 max 1, or min -2 max 2)

    even though I change strength to 2.00 (default limit) , the surface not move. I can confrim compare with no displacement map surface. 

    But,, iray displacement offer min and max value,  it change newtral color.  

    if I set min =0,  and max =1, newtral grey = 0.5.. then surface up.

    if I set min =-1  and max =0 newtral grey means = - 0.5  then surface down. (min value + max value) /2 

    if I set min = -2,  and max = 1  newtral grey = -0.5, then surface down.. then   displace ment strength will be multipled. 

    apply strength zero value have no meanig. no displacement.

    then apply black map = surface down, with strength value (multiple) (when min and max absolute value equal)

    then apply white map = surface up, with strength value (mutlitple)

    then, Inkubo said, skin part A = perfect flat (if you strength = 0, this value will be multiple then, which strength map you used, there is no meaning, without DS shader corrupt)

    skin part B = mostly black with strength 1 (I assume maybe daz unit) , 1cm down.  newtral grey part = flat. 

     

    displacement1.JPG
    1454 x 893 - 136K
    displacement2.JPG
    1492 x 952 - 143K
    displacement3.JPG
    1390 x 760 - 113K
    Post edited by kitakoredaz on
  • kitakoredazkitakoredaz Posts: 3,526

    Then I do not against anyone, but most of PBR shader or 3d Paint may use grey as newtral. then produce displacement map so.

    I usually first color back as 0.5, then make brush, or displacement map.

    dark value,  0.5  to  0  use concave , 0.5 to 1 use for convex.  then sculpt. or if I export displacement map, it generate newtral as grey (0.5).   then I prefer to keep grey as background color and it is flat color.  with keep, min and max as default. then just keep same absolute values, (min and max).

    usually min value just use to adjust off set. without it, I can not concave.

    Though I understand,,  Richad suppose, inkubo only need Convex, then suggest to use full 0(black)  to 1 (white)  range for convex. (then set min 0, max 1up).

  • Richard HaseltineRichard Haseltine Posts: 104,149
    Inkubo said:

    Thank you all.

    Richard, do you therefore believe that DS would handle displacement so that if skin part A has no displacement map and skin part B has a minimum displacement of exactly zero and a higher maximum and a displacement map that's black where the skin parts meet, then there should be no visible displacement seam?

    That was a complex sentence, so I'm going to restate the same thing in a different way:

    • Skin Part A: Displacement Map = None, Strength = 0
    • Skin Part B: Displacement Map = Mostly black jpg with smoothly graded white veins in places where no skin parts should meet, Strength = 1, Minimum = 0, Maximum = 1 or 3 or whatever.

    I drew in black and white, but didn't do anything to ask GIMP to convert my map to grayscale, so maybe that's my problem...

    Those values should work, yes - though I think Iray does expect greyscale maps, not colour maps with equal values in each channel.

Sign In or Register to comment.