Building shaders with bricks -- Displacement skews toward 1,1,1

I really want to expand my procedural shaders into displacement, but I run into one significant problem -- procedural maps sent into displacement orients toward what I think is the 1,1,1 normal. I have... no clue how to correct for that, I want displacement to either expand uniformly frmo the object, or at the very least be able to control which way it's going.

I tried coming up with a noise map and feeding it into the displacement image channel... but I can't figure out how to get it in a form that the displacement brick input will accept.

 

Any help?

Comments

  • Do you mean you want vector displacement? We used to be able to do that by explictly calculating a new point from the old, rather than feeding a map to displacement - normal (which as you say moves along the normal direction when displacing, as the regular shaders do).

  • Oso3DOso3D Posts: 15,042

    I think so? Any, er, pointers as to what I should be looking at to make that happen? :)

     

  • Oso3DOso3D Posts: 15,042

    I mean, the displacement seems to sheer toward the 1,1,1 normal of the overall object orientation, rather than in relation to the normal of the surface.

    (Will try to whip up example)

     

     

  • Oso3DOso3D Posts: 15,042

    Here's an example. Now, at least the displacement follows the object's coordinates, so I can move it around. And at low values it's not super noticeable.

    But I'd REALLY like some control over the effect. I'm envisioning a nice rock/asteroid/etc. style shader.

    (Admittedly, this would be cool for frozen effects...)

     

    Displace example.png
    1334 x 1334 - 2M
  • Oso3DOso3D Posts: 15,042

    Hmmmm. I think I may have figured things out. Will update if so. ;)

     

  • Oso3DOso3D Posts: 15,042

    WOOT WOOT WOOT. Got it.

    Might not look like much, but that right there is the doorway to a lot of nifty.

     

    Test2 huzzah.png
    1334 x 1334 - 2M
  • Good, otherwise I was going to have to dredge in my memory as I'm pretty sure the original discussion was in the oldest, no longer available at all, forums. My vague recollection would have been taking the geoemtry or surface normal as a starting point and adjusting that by the strength and the colour values read as coordinates.

  • Oso3DOso3D Posts: 15,042

    What I ended up doing was taking the Normal and multiplying it by the noise. Bam.

    Now, I may go back and try figuring out how to give the displacement a user-indicated skew, because that's sometimes very useful (like Stalagmites/stalagtites)

     

Sign In or Register to comment.