Building shaders with bricks -- Displacement skews toward 1,1,1
![Oso3D](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/userpics/964/nKUSSXH2JM34Y.jpg)
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).
I think so? Any, er, pointers as to what I should be looking at to make that happen? :)
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)
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...)
Hmmmm. I think I may have figured things out. Will update if so. ;)
WOOT WOOT WOOT. Got it.
Might not look like much, but that right there is the doorway to a lot of nifty.
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.
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)