baked vertex lighting from maya

I have seen lots of guides on using baked texture lighting in Unity, but I have been unable to locate how to used baked per vertex lighting in Unity, is this possible? The Maya FBX exporter doesn’t seem to have any parameters for including vertex colors.

Only a few of Unity’s shaders actually respect vertex colors. Like most things in realtime 3D, using vertex colors has a cost, so unless there actually are some, you don’t want to spend those extra resources.

There are a few of these shaders here:

http://unifycommunity.com/wiki/index.php?title=Shader_Archive

… oh, and welcome to the forums :slight_smile:

d.

I’m pretty sure that baked vertex lighting is the cheapest form of static lighting there is? I’m talking about baking lighting information per vertex into the model in maya and then using no runtime lighting from Unity.

Yes, baked vertex lighting is very cheap. It’s just that almost none of built-in shaders do vertex colors (because 95% of people don’t use them at all).

ah, I see. So that vertex color information is exported in the fbx? Just find the correct shader and it should work?

Any hints which shaders use vertex colors? I thought I tried them all but didn’t find any that worked.

Same question here. I was hoping to use vertex colors for transparency.

Any Maya users out there that can tell us how to paint these colours on?

@Podperson, does cheetah support this at all?
AC

No C3D doesn’t. I was building the meshes with code (terrain).

One multitexturing technique (e.g. the way World of Warcraft blends textures – I think) is done by using a bunch of geometrically identical meshes with different single textures + vertex transparency. For refinement, you toss out all the polygons with only transparent vertices (make sense?)

So a road can be implemented by taking only those polys from the base mesh with some level of road on it, painting their vertex “weights” and setting their texture to the road texture.

I would suppose that pixel shaders can achieve the same thing with only one geometry mesh and one set of vertex weights (e.g. by treating different subranges as different textures).

A mini tutorial here http://www.etc.cmu.edu/bvw/painting/vertexcolor/vertex_painting.htm

My workflow is usually to batch bake a set of basic highlights and shadows with mental ray, and then go in my hand and touch everything up as described in the above tutorial. Here are a few vertex-lit-baked levels that I am trying to get running in unity:

http://marshmonkey.com/westdemo.mov
http://marshmonkey.com/chilldemo.mov

From built-in shaders, only Particle shaders take vertex colors into account.

Some of the shaders on the wiki (see David’s post above) support vertex colors. E.g. AlphaVertexColor, BakedVertexColorLighting, VertexColor.

So those movies are in Unity? Or are they pre-rendered?

Cheers.

also here is a thread from last year. last page has a link to a tutorial i found on the subject.

http://forum.unity3d.com/viewtopic.php?t=1682&highlight=baked+vertex

Cheers.

they are captured directly from the maya viewport

Cool. They look very sweet BTW. Have a very nice feel to them. Well done.

Cheers.

These links are awsome guys, Thanks very much
:!: :!: :!:
AC

Thanks Jon! Stuntmania was one of the things that drew me to Unity as a possible solution for my racing game, good work!