PDA

View Full Version : Gradients: 'Slope' input: only 90 of input?



jeric_synergy
11-27-2012, 07:35 PM
I should know how to do this, but.... When using the Slope input in a Gradient layer, you really only get 90 of possibility, right? 'Cuz there's no output for overhangs or negative slope, right?

It only goes from horizontal to vertical, or 1 quarter of a full circle. (???)

:o :o :o


All I'm trying to do is make a gradient skyball....

Matt
11-27-2012, 10:08 PM
Correct, in the Gradient Editor 0 = top of object 1 = 90 deg sloping off.

Matt
11-27-2012, 10:09 PM
'Cuz there's no output for overhangs or negative slope, right?

That would be the regular diffuse surface.

Matt
11-27-2012, 10:15 PM
But if I were you, I would use Y Distance to Pivot instead:

109451

evenflcw
11-27-2012, 10:42 PM
Use the gradient node. It is able to reach the full 180 degrees.

jeric_synergy
11-27-2012, 10:49 PM
But if I were you, I would use Y Distance to Pivot instead:

109451
OK, thank you, that would work, but I was trying for a more universal, non-size related solution. Something based on angles.....

Sensei
11-28-2012, 12:41 AM
That seems to be faking slope quite good. Original Gradient node is only slightly darker.
Rotating object or camera doesn't change effect.

109452

109453

109454

109455

Max node is used to get rid of negative dot product results. Replace it with Abs, and see what happens.

I noticed now that this setup doesn't handle scaling item very well - you should take normal or up vector - then to transform from world to object, then to normalize, then to dot product. And scale of item should be now ignored.

Scale of item is in vector length.

RebelHill
11-28-2012, 04:09 AM
OK, thank you, that would work, but I was trying for a more universal, non-size related solution. Something based on angles.....

Just use the output coming from the mesh normals themselves, there's your angles. Wanna convert over to a -1,1 range go for dot product with a fixed world vector.

jeric_synergy
11-28-2012, 01:04 PM
thanks everybody: looks like it's time to review "dot product". Again. :cry:

:)

dwburman
11-29-2012, 10:25 AM
Would it be possible to add a Pitch input parameter to gradients? Pitch is an option in the Textured Environment gradients, but it isn't in the normal texture gradients.

jeric_synergy
11-29-2012, 11:46 AM
If we could, uhhhh, ENCAPSULATE, (oh "group" would have worked too), sub-networks we could just build a PitchFinder Node using RH's dot product method, no?

Of course we can SAVE subnetworks, but it's not so neat.

RebelHill
11-30-2012, 02:55 AM
we could just build a PitchFinder Node using RH's dot product method, no?

Or you could just take the pitch output from rotation and plug it straight into gradient input param.

Skonk
11-30-2012, 06:11 AM
On a side note...

if all you want is a gradient skydome that is not affected by scene scale... why not just use the gradient backdrop option?

jeric_synergy
11-30-2012, 08:27 AM
On a side note...

if all you want is a gradient skydome that is not affected by scene scale... why not just use the gradient backdrop option?
Depth Buffer considerations, ala LightWolf.

- - - Updated - - -


Or you could just take the pitch output from rotation and plug it straight into gradient input param.
??? ??? Isn't the pitch zero if the object hasn't been rotated?