Home Technical Talk

Gradient ramp : gradient type issue

polycounter lvl 12
Offline / Send Message
Kyalie polycounter lvl 12
Hey guys,

I modelled a 3D character to be rendered as a basis for 2d sprites.
So i'm using a gradient ramp shader with the gradient type being lighting, so that i can have a basis for the shading as well.
But it doesn't seem to react to light as it should (see attached file).
On the left is the character at the first frame, the light comes from the front, and it reacts rather well.
In the middle, the character starts animating, but it looks like the shader reacts as if it had baked the lighting of the first frame into a texture, rather than reacting to light.
The way i see it, it should be looking something like the character on the far right.
I've been trying each and every gradient type, but i can't find anything reacting like it should. Is there something to tweak so that it works like i want?

Replies

  • Eric Chadwick
    You might try a Falloff map instead. Use the Mix Curve to make a sharp edge. Might work more reliably than Gradient Ramp.
  • Justin Meisse
    Offline / Send Message
    Justin Meisse polycounter lvl 19
    That's looking pretty good, can we see some more?
  • Kyalie
    Offline / Send Message
    Kyalie polycounter lvl 12
    Hi guys, i'm back on this issue again, since i have a new lead: it only happens to a skin object.
    It works correctly with the shader applied directly on any other object animated without a skin modifier applied, like the biped itself or if i collapse the skin on my character and rotate it like some kind of statue. As soon as i collapse the skin, it looks ok.
    It seems related to the initial orientation of the character before it's skinned (it won't change if i tweak the posture in figure mode for example).

    I was finally able to resolve the problem by adding an Edit Poly modifier on top of the skin modifier.
    It's such a simple trick that i feel more frustrated for not finding it out before than satisfied because it's now resolved X) (but of course, i needed to understand the problem was coming from the modifier stack).
    Anyway, after months of scratching my head, i'm finally through with this issue, pfew!

    Justin> we're finishing a demo soon and then we'll translate it to english :)
Sign In or Register to comment.