Anyone figure out how to make Displacement Maps work from all camera angles?

FlortaleFlortale Posts: 611
edited February 2020 in The Commons

Anyone figure out how to make Displacement Maps work from all camera angles? I made a displacement map. When the light is facing the displacement effect at an angle, the displacement detail looks fantastic with the shadowing, but when the light is shining directly at the displacement effect, the displacement effect ceases to exist. Anyone know how to fix this?

Post edited by Flortale on

Comments

  • MelissaGTMelissaGT Posts: 2,611
    edited February 2020

    I've never had any issues with displacement not working the way it should. Displacement maps change the actual mesh surface, so light reacts off that modified topology. The map itself isn't what tells the light to react and how...like a normal map would. All a displacement map does is translate how much of the mesh needs to be displaced, up or down, and then light reacts accordingly. If you think about it, when light shines down on an object, say a can of soup, such as when the sun is directly overhead, it won't cast shadows...and that would make sense for displacement as well. 

    Post edited by MelissaGT on
  • That's just normal lighting. When the sun is directly overhead in real life, there are no shadows.

  • FlortaleFlortale Posts: 611
    edited February 2020

    That's just normal lighting. When the sun is directly overhead in real life, there are no shadows.

    What? There are.  In my case, you should still be able to see some minor shadows on the sides of the displacement, so you can tell the displacement is actually there.

    I've never had any issues with displacement not working the way it should. Displacement maps change the actual mesh surface, so light reacts off that modified topology. The map itself isn't what tells the light to react and how...like a normal map would. All a displacement map does is translate how much of the mesh needs to be displaced, up or down, and then light reacts accordingly. If you think about it, when light shines down on an object, say a can of soup, such as when the sun is directly overhead, it won't cast shadows...and that would make sense for displacement as well. 

    Shine the light directly at your displacement effect.  Now, have the light aimed at the sides of your displacement effect. When the light faces directly at the displacement, you'll notice a vastly diminished effect, but when light hits the displacement at an angle, the displacement effect looks fantastic and proper. Test it yourself.

    I was thinking of doing a very thorough test to debug the issue.  

    Basiaclly someone needs to create a rounded sphere with a proper UV mapping.  Then you apply displacement to it.  Then do two renders. One where the light faces directly at the displacement, and another render where light hits the displacemet from the side. That should reveal the problem.

    EDIT: When I tested things on a properly UV mapped sphere, I didn't encounter any problems. I'm going to test a grayscale map instead of one using a black background.

    Post edited by Flortale on
  • lilweeplilweep Posts: 2,746
    Flortale said:

    Basiaclly someone needs to create a rounded sphere with a proper UV mapping.  Then you apply displacement to it.  Then do two renders. One where the light faces directly at the displacement, and another render where light hits the displacemet from the side. That should reveal the problem.

    Is that someone you?

  • Matt_CastleMatt_Castle Posts: 3,010
    edited February 2020
    Flortale said:

    What? There are.  In my case, you should still be able to see some minor shadows on the sides of the displacement, so you can tell the displacement is actually there.

    Displacements always work along surface normals. They cannot have undercuts, so the areas around the sides of the displacement should NOT be shadowed if a light source is aimed straight at them. They will be lit obliquely, but there shouldn't be anything that can be considered an umbra, penumbra or antumbra, so there's no true shadow.

    (In technical terms, shadows are specifically areas where light is blocked, not areas that are simply less well lit).

    Post edited by Matt_Castle on
  • MelissaGTMelissaGT Posts: 2,611
    edited February 2020

    This all seems to be an artistic preference, rather than a case of something not working correctly. The displacement is simply doing what it's supposed to do...reacting to the light source. Personally, I wouldn't want to see a defined outline of something that is being lit straight on, as that isn't the way light and shdow work. You might want to fudge a normal map or add the texture to your color map so you can still see whatever it is you want to see when the light is hitting it directly. I use displacement most commonly for scars, and I do work them into the color map as scars usually come along with skin discoloration, etc...and you can still see them when the light hits them at all angles. I've attached a couple examples. 

    Torian - Small.jpg
    3250 x 3250 - 6M
    Lelu Theron - Small.jpg
    4063 x 3250 - 8M
    Lelu - Low Key - small.jpg
    3500 x 4550 - 7M
    Post edited by MelissaGT on
  • lilweeplilweep Posts: 2,746
    edited February 2020

    Off topic newbie question, but which map is best for making adjustments to "geometry".

    https://twitter.com/LazyEti/status/1225854882361618432

    E.g., in this example linked above, the artist is using Substance Painter height maps to sculpt the object.  Is it best to use Height or displacement parameter for this?  Im assuming that the effect of the heigh map is intimately dependent on base geometry level or SubD level of the object the map is applied to.

    Post edited by lilweep on
  • MelissaGTMelissaGT Posts: 2,611
    edited February 2020
    lilweep said:

    Off topic newbie question, but which map is best for making adjustments to "geometry".

    https://twitter.com/LazyEti/status/1225854882361618432

    E.g., in this example linked above, the artist is using Substance Painter height maps to sculpt the object.  Is it best to use Height or displacement parameter for this?  Im assuming that the effect of the heigh map is intimately dependent on base geometry level or SubD level of the object the map is applied to.

    I don't believe you could create that much topology modification with displacement alone, but I could be wrong. I would think that would require sculpting...and most likely HD sculpting. I think there is some overlap with the definitions of "height" and "displacement" because I've seen them used interchangebly, at least when it comes to Daz shaders. 

    Post edited by MelissaGT on
  • UtiltarianUtiltarian Posts: 55
    edited February 2020

    In real life, all light sources are area lights, and directional lights do not exist. A distant light (or directional light) simulates how a light source that's infinitely far away would behave (done for performance reasons), but even the sun isn't truly infinitely far away.

    As a result, if you have a perfectly flat surface with different elevations, a directional light shining directly on it wouldn't produce shadows, since all the normals would face the opposite direction of the light source, and nothing would be blocking anything.

    Though I haven't tried it, 2 ideas that come to mind which might fix your issue would be to change your light source to a distant point light or spot light (hence, introducing minor off angles), or to modify the normals slightly, particularly at the edges of the displacements.

    Post edited by Utiltarian on
  • FlortaleFlortale Posts: 611
    Magnum said:

    In real life, all light sources are area lights, and directional lights do not exist. A distant light (or directional light) simulates how a light source that's infinitely far away would behave (done for performance reasons), but even the sun isn't truly infinitely far away.

    As a result, if you have a perfectly flat surface with different elevations, a directional light shining directly on it wouldn't produce shadows, since all the normals would face the opposite direction of the light source, and nothing would be blocking anything.

    Though I haven't tried it, 2 ideas that come to mind which might fix your issue would be to change your light source to a distant point light or spot light (hence, introducing minor off angles), or to modify the normals slightly, particularly at the edges of the displacements.

    I'll keep this in mind, thanks.

Sign In or Register to comment.