Maya: Baking just texture color to vertex color

I need to bake the texture unfiltered by lighting to vertices and can’t find a way to do it. I am currently using the Color > Batch Bake (Mental Ray) but it only has the option for Light and color. I just want color. Does anyone know a way to do that?

Off the top of my head:

You could use Transfer Maps under Rendering or the Paint Vertex Color Tool to export out an Attribute Map, then import it to the verts of your target mesh. A little long winded but does the job pretty well.

/W

Using the mental ray bake ‘light and colour’ works fine. Just hide all your lights first and it will only bake the colour.

Okay, seems I had it completely wrong. Lard was on the correct path:

  1. Create a shader, assign diffuse texture
  2. Set the Amibent Color to max
  3. Render Settings -> Common -> Turn off the Default Maya Light
  4. Mental Ray Baking Options -> Light and Color
  5. Bake

XSI (Now Autodesk Softimage =;->) has a one step utility for doing this. It’s been in there for a couple of versions. You can also paint vertex colors with their painting tools.

-PCD

Q: What if you just used a Constant shader. Constant isn’t affected by light.
Would that work?

[QUOTE=whw;2609]Okay, seems I had it completely wrong. Lard was on the correct path:

  1. Create a shader, assign diffuse texture
  2. Set the Amibent Color to max
  3. Render Settings -> Common -> Turn off the Default Maya Light
  4. Mental Ray Baking Options -> Light and Color
  5. Bake[/QUOTE]

For stuff like this, I almost always wire exactly what I want baked into a Surface Shader, then use batch bake with light and color. By using a Surface Shader, you control whether or not you actually want lighting values.

Here’s an example for occlusion, but if you just wire in your texture instead of an AO texture, that should work fine.
http://www.game-artist.net/forums/vbarticles.php?do=article&articleid=17

Thanks all for the info. The Surface shader technique works great as well as the Ambient color trick on other materials.

Since initially posting, I have discovered that Area Lights are simpler to use than hooking up color ramps to the surface shader ‘out color’ or the lambert ‘ambient color’. They are also easier to adjust, very easy to script into place, don’t require MR and because they are a light, behave like a 3d volume vs just a projected plane as is the case with texture color ramps.