PDA

View Full Version : Gradients and Scaling?



Malorie
01-06-2006, 12:49 PM
I was working on a quick project to help me visualize matrix programming a bit when I came across something I don't recall being a problem in LW7.5.

When I scale an object with a gradient applied, the gradeint doesn't scale with the object. Is there some setting I missed?

Malorie

SplineGod
01-06-2006, 11:24 PM
It depends upon what the input parameter for the gradient is. :)

Malorie
01-07-2006, 05:25 AM
Hi Larry,
Haven't spoken to you for a 'coon's age. Way back on the old LW forum I think. ;) Looks like you're still doing a great job with the LW tuts. Nice work.

I'm using the distance from an object parented to the the grid object in this case. A null at each positive axis. But it seems any time I use a "distance from" input it has problems. I just don't remember that being a problem before. If it always was, it sure would be nice of NT to work it out so that it could be scaled with the object. I'm sure it could be done as a bool in the gradient setup requestor. :)

BTW, the gradients in the new OpenGL display mode are all messed up. They don't even orient on the correct axis, if they display at all. Very inconsistant.

Anyway, thanks for the reply Larry.
Malorie

Captain Obvious
01-07-2006, 08:22 AM
Distance to object is in absolute numbers. If you scale it up, the distance in meters (or whatever unit you use) increases.

Malorie
01-07-2006, 01:37 PM
Thank you Captian Obvious!

Sorry, I always wanted to say that. ;)

Captain Obvious
01-07-2006, 09:37 PM
I get that a lot. ;)

Panikos
01-07-2006, 09:41 PM
Gradient Distant values are very restricting.
For instance, you want to use some very small values, 1cm .. 10cm
You cant zoom the gradient.
It begins with a very large scale, autosize doesnt help :(
Any clues ? or do I have to pass this to the feature requests ?

Merci
:hey:

SplineGod
01-07-2006, 09:51 PM
You can also try using the value procedural with a falloff. Try adding a gradient on top of that with the input parameter set to previous layer. :)

Panikos
01-07-2006, 09:53 PM
Thanks Larry, thats cool :)

Though I wish we had more freedom in gradients, as well as more channels.
Hopefully the nodal surfacing will provide more flexibility :)

Captain Obvious
01-07-2006, 10:27 PM
You cant zoom the gradient.
Sure you can scale it!

Panikos
01-07-2006, 10:35 PM
Yeah, ic :D

I prefer the envelope-kind of operation than just 4-5 buttons.

Malorie
01-08-2006, 06:24 AM
I was going to say the same thing. ;)

I guess this needs to be in the feature request page. :)

Malorie
01-08-2006, 07:13 AM
Unfortunately, falloff is based on a per standard unit length, which is of course an absolute value. It acts exactly the same as the gradient. Scale the object and your object is now a different amount of unit lengths.

I guess you'd have to bake the color if you were going to scale your object with a gradient attached.

Captain Obvious
01-08-2006, 08:34 AM
That's what the "scale keys" function is for, Malorie.

SplineGod
01-08-2006, 01:51 PM
You can also create a weight map and use that to create the gradient.

Malorie
01-08-2006, 06:24 PM
Capitain,
The scale keys adjusts the keys in the gradient all at once and only while you are adjusting it. It doesn't set them so that they will scale with the object, in fact, the scales keys has nothing to do with the size or scale of the object. What I am suggesting is that if the object were to be scaled during the animation with the bool checked in the gradient requester, the gradient would be scaled along with the object, hence making it retain it's proportion with the object.

I'm sure that a weight map would work just fine for these purposes. It would be nice however not to have to deal with weight maps. :)

The other option is to put the procedural value with falloff on with an envelope on the scale for the axis and use channel follower to follow the objects scale on that axis. :)

Malorie

SplineGod
01-08-2006, 06:33 PM
Actually a weight map for this purpose would probably be the simplest solution. The weight map could be created in probably less then a minute and then its just part of the mesh. :)

Malorie
01-08-2006, 07:14 PM
You are right of course.

I guess I just enjoy banging my head against the wall. ;) Kind of a "can it be done" part of the hobby.

BTW, my idea of using channel follower doesn't work either. I can't figure out why not though.

Here's what I get when I set it up at 0,0,0 and move it in the posative X direction. I have the value procedural used as an alph with the gradient set to previous channel. Then the value procedural's scale is enveloped with channel follower to the object's scale axes.

Malorie
01-08-2006, 07:36 PM
And just so you understand that I'm not just sitting here thinking that it can't be done. Here it is with weight maps. I just wanted to figure out a way that it could be done just with the gradients. :)

LW is great because there is always a way. I just like to figure out new and inovative ways if possible.

Malorie