Home Technical Talk

rendering a gradient map (top down) for my model

polycounter lvl 8
Offline / Send Message
Olli. polycounter lvl 8
what i want to do is render out a map for my object which is lightest at the bottom and darkest at the top.. sort of like the "Value Gradient - Beginning the Hirearchy" slide in the Dota2 workshop art guide:
http://media.steampowered.com/apps/dota2/workshop/Dota2CharacterArtGuide.pdf

ive already tried using a dome and skylight but that only provides directional shadows for the top surfaces.

Replies

  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Are you using max?
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    if yes, then add UVWmap modifier, set the uvmapping method to planar and set the sizes, and rotate the gizmo to vertical.create a new material, and on the maps section, click to the "none" button next to the self illumination slot.doubleclick to gradient, and apply this mat to your model.then go to rendering/environment, and change the global lighting level to 0.then you can bake the map.when you choose the output, choose "completemap".

    edit - because you need to bake this with the proper uv's instead of the planar one, you need to copy your model first and using the uvwmap modifier on this.later when you bake,select your original model, and on the bake dialogue, pick the uvwmapped for projection.
  • Olli.
    Offline / Send Message
    Olli. polycounter lvl 8
    ah yes, that worked. thanks!
  • Mark Dygert
    For future prosperity... There is a slightly simpler way to handle it.

    RTT%20UV2%20Gradient.jpg

    A) In the material editor, assign a gradient/gradient ramp to the diffuse slot of a material, go into that map slot.
    B) Set the map channel to 2, this will cause only this map slot to use UV2.
    C) Apply another UVW Unwrap modifier (you can delete this when your done so you don't have extra UVs cluttering up your model).
    D) Set the new UVW Unwrap modifer to use Map Channel 2 and apply your planar unwrap. Assign your gradient material to your model.
    E) In RTT leave the OUTPUT channel at the default 1.
    This will take whatever is on the surface of the model and bake it to the UV layout of 1.
    F) Then bake a diffuse map.
    That way it will only pull the color info off of the surface and none of the lighting like a complete map will.

    Note: A complete map is a full render; diffuse, spec, bump plus all of the scene lights, everything! Even you don't have lights in the scene it will still capture the default lighting which is an omni light behind the viewport camera. Rendering a diffuse map allows you to skip all of the lighting adjustment steps.

    GradientExample.jpg
    Then overlay or multiply your gradient over your diffuse map and away you go.

    If you accidentally collapse the stack with the 2nd UV still applied it will get baked into the model, which isn't a problem because you can delete it by going to Main Menu > Tools > Chanel Info and delete 2:map from the list. Or use a UVW Mapping Clear modifier.
  • cryrid
    Offline / Send Message
    cryrid interpolator
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    I bake out a bent normal map from xNormal. Gives me top/down, front/back and left/right gradients in the respective channels :)
Sign In or Register to comment.