Home Technical Talk

maya 2008: bake gradient into vert colour

mod
Offline / Send Message
rooster mod
how do, I'm looking for some way to bake colour into verts along some geometry, with the colour gradiating as x increases. any ideas?
first try baking using lights didn't really do the trick, any sides of the geom were overblown because they could be hit by all nearby light. I need it to be pretty much projected from z..

any ideas?

Replies

  • Michael Knubben
    Options
    Offline / Send Message
    Do you have a gradient material-type in maya? If so, set up the uv's so that goes along the geometry that you need, and bake that down to verts?
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    MightyPea has it right, there is also that vertex chameleon tool which has a vertex gradient tool.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    If you want to transfer just color (from the diffuse image)

    1 - Render Settings > Common > Turn the Default Maya light off...
    2. Color> Batch Bake Mental Ray Options > Light and Color then make sure you have it set to "Bake to vertecies".
    3. Start baking

    If you're really going to get deep into this, a good thing is to have lights with proper falloff. Then if you want to bump color up or down, just bite the bullet and start grabbing faces and apply color.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    gradient colour baking is proving to be a pain, because the vert colour bake doesnt seem to work with secondary UV sets. I need the main UV set intact..

    Ideally what i want is verts hit by light to be lit regardless of normal, so faces sideways on, or backfacing are lit all the same.

    But, I can't fuck up the normals because I need to be able to bake ambient occlusion into the vert colour too..

    edit: lamont: if I do use lights, how do you reckon I could get around the problem of sides of geom being blown out? I really want the sides to be exactly the same colour as the front at the edge

    could I do something with image based lighting I wonder?

    edit: ,malcolm, checking out vert chameleon
  • rooster
    Options
    Offline / Send Message
    rooster mod
    hurrrr. ok vertex chameleon has a nice gradient tool: problem is it applies per object, and I need it over a bunch of objects (did I mention that :D)
    If I combine them all, works fine, but I need them seperate. seperate command clears vert colour. how handy! I can't believe it still fuckin does that

    also, trial is only 15 days.. I don't think I'll convince management to buy something just for this, so free would be an ideal solution
  • Sa74n
    Options
    Offline / Send Message
    Sa74n polycounter lvl 18
    did you try grouping the objects instead of combining them? not sure if that works though
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Ideally what i want is verts hit by light to be lit regardless of normal, so faces sideways on, or backfacing are lit all the same.
    Use Color > Prelight Maya.

    I like to use volume lights when I just need an area of color and no light direction. It has a fall off from the center by default, you can change this.

    prelight.jpg
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    I hope this is the effect you're trying to achieve. If you notice the bottom example, the power of the lights dropped as I added more. (I bumped the light scaling factor in this one). You're gonna have to adjust for that. Also, Maya only does 8 lights at a time.

    Better example of it ignoring face direction:

    prelight2.jpg

    And they come in different shapes.

    prelight3.jpg
  • rooster
    Options
    Offline / Send Message
    rooster mod
    thats perfect man! using the square area light I got exactly what I need, and it's nice and flexible. Mucho gracias senor :)

    edit: hey man, you don't know how to get the 'down axis' option working on the volume light do you? I'm trying to use it but it just works as a point light anyway
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    rooster wrote: »
    hey man, you don't know how to get the 'down axis' option working on the volume light do you? I'm trying to use it but it just works as a point light anyway
    That's pretty much what happens when you put that option. It acts more like a directional source.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    yeah I want it to behave directionally, so all light in the area comes from x to negative x, but the light just comes from the center of the gizmo with the option checked.. I can't notice any difference using that option to the normal mode

    there's an arrow that appears when you set it to that, but I can't see the bake picking up that direction.. makes me wonder if the bake isn't picking up the setting
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    I never use that because the results are wonky. I just use the light with the gradient falloff.

    Also, imagine that you're enclosing things in a light mass, so not much difference will be seen.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    ah well.. another maya feature that doesn't quite work with another maya feature

    in the setup I have there is quite a difference, I want a long strip of stuff to be gradient lit from back to front evenly, so the directional light parameter would have been perfect. with the point light behaviour I guess I'll have to put rows of area lights behind the geom, but where the falloff overlaps there's inconsistency with the gradient. I also seem to notice that the more area lights I add, the darker the overall bake gets

    best solution I've got tho :)


    just had a thought: is it possible to get that 'ignore normal direction' type of lighting outside of maya bake? like in a normal render?
  • rooster
    Options
    Offline / Send Message
    rooster mod
    Think I've cracked it.. I got the area light to behave that way by unchecking diffuse and checking ambient in the light, using cylinder and along axis light mode.

    using mental ray bake, I can get the right results..
    Cheers everyone who replied!
Sign In or Register to comment.