Vertex Baking... from renderer?

I’m freelancing for a title to be delivered on the Wii and have been doing a lot of vertex colour stuff… it’s not an area I’d looked at in blender before and i must admit I was quite shocked at how old school blender seems to be in this area… the client tool chain is maya based (as ever) and i’ve been delving in to Turtle for lighting too…

In blender The only “bake lighting” thing i could find was the “set shaded” command… but this just bakes the GL view… and even then not the GLSL version!

is there any access in the API to get the rendered colour at a point ? like pass the vertex coordinate and normal and get the illumination at that point? I’ve looked and looked but can’t find any such function…

or would i be best writing a script to addia new image, setting UVs and baking a texture and then doing a lookup in that texture to get the colour at the vertex to apply to the vcol channel?

it sounds hacky, but is the only apprach i can think of…

has anyone else done anything along these lines?

On another tack… the game engine i’m using supports unique vertex colours per instance… great for stuff like billboard stuff or adding “cards” for foliage… Blender allows materials per objectm but t seems overkill for just some additional vertex colours… any ideas on how to approach this in blender?

Finally I’m amazed that whilst all my clients in video games use maya , almost none of them use the hypershade or built in material functionlity… they all write there own custom interfaces to construct the materials… with this in mind I’d really liek to create “node” based materials and set their connections in a script, but it looks like the api doesn’t have any functions for nodes… any ideas?

You can bake the texture to vcol: Set Shaded Vertex Colors.
So bake the GLSL to a simple texture and use this function.

Unfortunately, there is no way to use VCol as a texture channel. I always want to use vcol for many things, like mixmap (stencil), or using it as Additive or Multiplied mode but I cant.
So I think we need VCol as texture channel.
Maybe it can use this with nodes, but I never try.

You can use vcol with nodes… It’s good!

the “set shaded” function only seems to capture the “shaded” mode rather than the GLSL mode… if I’m using spots with shadow casting (for example) the shadows are ignored and the bake looks like the “shaded” draw mode…

But I guess you’re saying that if the mesh is textured that it’ll sample colours using that? that if i textured with a lightmap and set the mat to “shadeless” that it’ll capture the colour?

i’d really like to capture whatever render options I’m using… image based lighting, ambient occlusion etc… i guess baking to a texture first then trabsfreeing the colour is the only route forward…

  1. make anything
  2. bake it to a simple texture (you can bake everything, shadows too)
  3. use “Set Shaded Vertex Colors”