PDA

View Full Version : A question about gradient texture


yakul
08-23-2005, 10:47 AM
I am trying to use gradient as an alpha for a layer for displacement map.
The problem is that when I choose the gradient to be Y distance to pivot point, it can only start from 0 to something above it, but not from -1m for instance.
Is there a way to overcome this problem?
In other words how do I make my layer affect from -2m to 2m and not outside it?
Another problem is that I want the deform texture layer coordinates to change accoridng to a parent object.
So I have the option of making the layer change by world coordination and having a reference object.
If I check world coordination, when I rotate the deformed object the textures state at the same orientation relative to the world.
However, I want them to state with the same orientation relative to an other object, but I dont know how to do it. Because when rotating the reference object it doesnt affect the coordinations of the texture.
What I am actually trying to do is deform the hair of a charcter.
I have a character with long hair, and I want it to rest on its body/torso, but also when I rotate the head relative to the toroso.
Do you have an idea how would I achieve that?

I would appreaciate help on this matter.
Thanks in advance.

telamon
08-23-2005, 11:03 AM
distance is always a positive value, that is the reason why it starts @ 0.
An option is to create two two nulls: one at the top and one at the bottom of the object. Link those nulls to the object and create two gradients with input parameters "distance to object". The keys in the ramp must be such that the texture is opaque at the pivot point.
Play with the alpha value @ each key in the upper gradient or change the values with alpha = 100 % and set the gradient blending mode to multiply.

gerardo
08-24-2005, 03:13 AM
I am trying to use gradient as an alpha for a layer for displacement map.
The problem is that when I choose the gradient to be Y distance to pivot point, it can only start from 0 to something above it, but not from -1m for instance.
Is there a way to overcome this problem?
In other words how do I make my layer affect from -2m to 2m and not outside it?


basically those gradients works this way:


object......................................gradient.......................................gradient
2m...............................(Y distant to pivot point) ..................(Y distant to object)

_.................................o second parameter 1m.....................o second parameter 2m
-.................................-...................................................-
-.................................-...................................................-
-.................................-...................................................-
-.................................-...................................................-
_ pivot point..................o first parameter 0m (pivot)................-
-.................................-...................................................-
-.................................-...................................................-
-.................................-...................................................-
-.................................-...................................................-
_.................................o second_parameter repeated............o first parameter 0m (origin)
.......................................................................................-
.......................................................................................-
.......................................................................................-
.......................................................................................-
.......................................................................................-
.......................................................................................-
.......................................................................................-
.......................................................................................-
.......................................................................................-
.......................................................................................o second parameter repeated


the first column is the 2m object (supposing the pivot_point is in the object's center)
The second column shows how the gradient based on the pivot_point behaves (supposing the pivot_point is at 1m of the origin) notice the first parameter starts in the pivot_point's position and the second parameter (in this case at 1m) repeats in both directions, for this reason you can't make that it starts from -1m, since the beginning of the gradient is from the pivot_point's position and for this, you would have to reposition the pivotpoint, what you don't probably want.
In the third column we see the behavior of a gradient based on the object distance (let's say a null), is basically the same one that the pivot point (the first parameter of the gradient in this case starts in the null's position) but the advantage is you can re-position the reference object where you want, however keep in mind that the parameters repeat in both directions too.
A simple way to visualize the behavior of the gradients based on other reference objects is as if they were pointlight's falloff, the position of the object is the beginning of the gradient and expands to all directions (or xyz) as if it was the epicentre of an explosion.



Another problem is that I want the deform texture layer coordinates to change accoridng to a parent object.
So I have the option of making the layer change by world coordination and having a reference object.
If I check world coordination, when I rotate the deformed object the textures state at the same orientation relative to the world.
However, I want them to state with the same orientation relative to an other object, but I dont know how to do it. Because when rotating the reference object it doesnt affect the coordinations of the texture.
What I am actually trying to do is deform the hair of a charcter.
I have a character with long hair, and I want it to rest on its body/torso, but also when I rotate the head relative to the toroso.
Do you have an idea how would I achieve that?

I would appreaciate help on this matter.
Thanks in advance.


if I understand well, a reference object should work; another way is using a channel follower or setdriven_key modifiers (GE) tied to the same rotation channels of the reference object.



Gerardo

CGTalk Moderation
08-24-2005, 03:13 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.