Home Technical Talk

Baking a gradient map?

polycounter lvl 17
Offline / Send Message
Serp polycounter lvl 17
Hi, I'd like to bake a gradient map from a model. I'm texturing an oilpump and I want the lower part of the model to seem dirtier but the model is too complex to paint in.

Any ideas how to do this?

Replies

  • Bal
    Offline / Send Message
    Bal polycounter lvl 17
    You could simulate this by placing a plane like a ground under your model, and baking an ambient occlusion map (tweak the settings around to get the best effect).

    People will probably be able to suggest some other more interesting techniques if you show your model/textures I think.
  • r_fletch_r
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Put a gradient into the diffuse slot of your baker. put its mapping as a map channel your not using. Create a planar uv map in that map channel.

    Id go with the AO myself though. perhaps you could use the gradient to weight the AO's effect when you are texturing.
  • Bigjohn
    Offline / Send Message
    Bigjohn polycounter lvl 11
    What you could also try is having 2 lights in the scene, one above the object, and one below. Set the above one to a very high number, so that it blows the whole thing white. And set the low light to a negative number so that it sucks light away. Then just bake the lighting, and you should have what you're looking for (I think).

    Edit:
    Another thing you could do, is go in and vertex-paint the whole model in black&white. It'll probably take longer, but you'll get more control. Can also add a Turbosmooth to the stack so it's easier to paint. Then afterwards you can just bake that onto a texture.
  • EarthQuake
    Just create a new uv channel, planar map the mesh, and create a gradient that suits your purposes, this is really fast and works really well, I do this often on weapon models to highlight "interest areas" ie towards the barrel and toward the buttstock will be a bit darker, but the area you'll see up close is brighter and pops.

    Then you simply have to bake a diffuse texture in RTT, xnormal, etc. Back onto your original UVs of course.
  • Michael Knubben
    What eq says, but I use Textool's a>b tool to bake from channel 2 to 1, which is just a bit quicker than setting up rtt yourself.
    I do this a lot, especially on handpainted lowpoly characters. I use the gradient to mask layers, it works really nicely.
  • Serp
    Offline / Send Message
    Serp polycounter lvl 17
    Thanks I used Earthquakes method and it worked well. Funny because I thought about sending you a message because I remember you doing the gradient on your gun. But then you posted here anyway.
  • Goeddy
    Offline / Send Message
    Goeddy greentooth
    another slightly quicker way i just found is to just open up your mesh in mudbox and load a gradient map as stencil in and project that.
    saves you a couple of steps and maby a minute or two.
  • PyrZern
  • Bartalon
    Offline / Send Message
    Bartalon polycounter lvl 12
    Adding to what Bigjohn said, you can also let the shader blend the vertex colors for you so you don't have to bake any maps at all, assuming you have a shader system that makes it easy (UDK, Shader Forge, etc.).

    If you start at 50% grey and paint in whites at the top and dark greys at the bottom, then use an Overlay shader blend, the result will be similar to the baking methods above.
  • happyDanceGames
    Relying on VCs for all blending is very expensive for the engine. We use Vertex Alphas (VA) to blend additional dirt details into a model only when the asset is either a key 'landmark' or needs to be highly repeatable without holding up production for the same asset modified 50-odd times.
    We actually reversed the blend where dirt is black and the standard diffuse texture is white. This is so it remains intuitive to the artist (dirt is dark).

    PyrZern has a great method...

    if you want to be able to use the gradient directly in PS or another 2D program (and want it to match up) baking VCs OR VAs to a map - either through xNormal/Maya/Max onto a separate map & then combining within the texture is going to be your only real solution - getting something with a tone of UV islands to remain seamless when painting by hand is going to be extremely painful.
  • Bartalon
    Offline / Send Message
    Bartalon polycounter lvl 12
    Relying on VCs for all blending is very expensive for the engine. We use Vertex Alphas (VA) to blend additional dirt details into a model only when the asset is either a key 'landmark' or needs to be highly repeatable without holding up production for the same asset modified 50-odd times.
    We actually reversed the blend where dirt is black and the standard diffuse texture is white. This is so it remains intuitive to the artist (dirt is dark).

    Thanks for the tip, I wasn't aware it had adverse performance effects.
  • AlphaMix
    But what about baking a multi-axis gradient map

    I found this in the quixel helmet sample project. At first I thought some photoshop blur voodoo might be in order when I saw the similarity with the object space normal map, but the colors are not the same for all the shells.

    gradient.jpg

    So how exactly would you bake a map like this
  • Minos
    Offline / Send Message
    Minos polycounter lvl 16
    You can also do this pretty easily in 3d-coat too if you got access to that, just import your mesh and ctrl + alt + p to paint the projections in photoshop.
  • AlphaMix
    Minos wrote: »
    You can also do this pretty easily in 3d-coat too if you got access to that, just import your mesh and ctrl + alt + p to paint the projections in photoshop.

    Sadly no. I do have Substance designer though, and I knew it could bake a "Positoin map", and I just found a dropdown to change the gradient from a single to All axis.

    Was kinda hoping not to add more software to the workflow :(
Sign In or Register to comment.