Baking Node Material to Texture?

Hi all.

I’m fairly new to blender and just trying some simple projects at the moment. What I have right now is an island that I want to texture with a node material. I have created the material I want in the node editor (sandy at low z values, blending up into a more grassy texture.

I want to bake this into a texture which I can export and use in an external opengl renderer (with OBJ). If I try to bake full render it looks right, except that I do not want it lit with blender lighting, I only want the texture.

However if I change bake to “Textures” instead of “Full Render”, I get this image which just looks like some weird mashup of my textures, but not at all correct.

Its like the stencil is now in the x direction instead of the z, the sand is not even there, and instead of the stencil performing a masking effect it is just mixing it in as a color.

Does anyone have an idea of a step I might be missing? Is it possible to bake a node material as a texture? Typically when I create a material with just several textures (not in node mode), I can render to texture and it looks like I expect.

Thanks to anyone who can provide any ideas.