PDA

View Full Version : Color gradient based on the objects displacement



gamedesign1
12-24-2017, 08:37 AM
Hi All

Does anyone know how to apply a color gradient based on the objects displacement without copying all the nodes from the displacement editor into the surface node editor? I am not really that sure whether the suface editor can access the displacment amount or suface height.

jeric_synergy
12-24-2017, 10:13 AM
#aflw, but: what's the objection to copying the network? IIRC, displacement is a scalar value applied along the point normal, so it's just one number (unlike normal mapping, which is a vector, ie 3 numbers), so plugging it into a gradient should be easy peasy (said the guy not doing it).

gamedesign1
12-24-2017, 10:38 AM
#aflw, but: what's the objection to copying the network? IIRC, displacement is a scalar value applied along the point normal, so it's just one number (unlike normal mapping, which is a vector, ie 3 numbers), so plugging it into a gradient should be easy peasy (said the guy not doing it).

Well if I am tweaking the displacement I have to then make the changes in two places. Yeah it sounds easy, but I don't know how to do it :)

gamedesign1
12-24-2017, 10:51 AM
Don't worry, I've worked it out :)

jeric_synergy
12-24-2017, 10:52 AM
Not if the displacement is governed by an item available to both networks, i.e a null's position/rot/scl.

Order of operations: get the displacement nailed down, then do the gradient. One copy/paste.

Or do the extra work required to create simultaneous controls.

Ztreem
12-24-2017, 12:53 PM
Depending on what type of displacement you do, but if you do ordinary normal displacement you can do the displacement ftom the surface editor. Then you don’t need to copy paste any nodes.

jeric_synergy
12-24-2017, 01:24 PM
Depending on what type of displacement you do, but if you do ordinary normal displacement you can do the displacement ftom the surface editor. Then you don’t need to copy paste any nodes.

Really? Where? I seem to recall this dimly but having a look didn't see it. --Is it ENABLE BUMP in the Object Properties panel?

Sensei
12-24-2017, 01:42 PM
Really? Where? I seem to recall this dimly but having a look didn't see it. --Is it ENABLE BUMP in the Object Properties panel?

Yes, press Enable Bump, and then plug scalar to Surface in Node Editor. But it's scalar. In Displacement Node Editor you can plug vector.

jeric_synergy
12-24-2017, 02:50 PM
Yes, press Enable Bump, and then plug scalar to Surface in Node Editor. But it's scalar. In Displacement Node Editor you can plug vector.

"Surface"? I'm not seeing a "Surface" input in the Surface Editor destination/final node.

gamedesign1
12-24-2017, 03:00 PM
Yes, press Enable Bump, and then plug scalar to Surface in Node Editor. But it's scalar. In Displacement Node Editor you can plug vector.

I wasnt aware of this, thankyou :)

Sensei
12-24-2017, 03:22 PM
"Surface"? I'm not seeing a "Surface" input in the Surface Editor destination/final node.

C'mon. Read between lines... There is Surface (Editor)'s Node Editor, and Object Properties, Deformation Node Editor (and couple others). I am just specifying in which you have to plug it..

Surface Editor's Node Editor has Displacement input scalar.

Ztreem
12-24-2017, 03:23 PM
Really? Where? I seem to recall this dimly but having a look didn't see it. --Is it ENABLE BUMP in the Object Properties panel?

Yes, plug the scalar into displacement in the surface editor and enable bump in object properties. As I said it only works for normal displacement, if you need any other type of displacement you need to do it in the displacement panel in object properties.

prometheus
12-24-2017, 04:00 PM
Why so much talk and why not more proper descriptions?...images helps :)

Enable bump is done in the objects property (deform tab) and it also needs to have a distance value to have effect..my sample image has none, since I actually have some other stuff going on, so disregard that.
alpha output of any procedural texture ..feeds in to the displacement Input ...of the surface node ..tada :)



http://forums.newtek.com/attachment.php?attachmentid=138963&d=1514156376


138963

jeric_synergy
12-24-2017, 04:09 PM
There it is: the last green one.

prometheus
12-25-2017, 08:00 AM
There it is: the last green one.

It may seem fairly simply and obvious to simply "read between the lines" as sensei stated.. and sort of think a bit about it and figure some things out, but I honestly think when it comes to things like nodes etc, You should do your outmost and try and describe the steps exactly, not skipping Anything..nor hinting to a tool that isnīt fully described in itīs full name etc, itīs a bit pedantic and may sound silly..but there you go, if not ..it is otherwise unavoidable that people simply do not get it properly.

That said..I am not perfect either and my from time to time I am sure I probably give wrong or not well explained descriptions myself, but I am trying to have all that in mind.
I think these kind of situations rises when someone is giving descriptions based on what they know, or think they know..and what they have in front of their mind just as they read and reply, and they simply do not have the time to enter lightwave..open the nodes and simply describe the node output and input Exactly as they are shown in the node editor, itīs understandable..but also opens up for confusion, as already seen here.