I’m having no problems creating a lightmap using C4D 9.6, and it works especially well with a single texture on a complex object like a maze of rooms.
The problem I’m having is with multiple textures (or a single texture made up of several texture tiles). When I import the “unbaked” model into Unity (no lightmap), the multiple textures show up perfectly. When I bake and apply a lightmap, however, the textures change completely and seem to become a single texture. I tried using the color, illumination and shadow channels, but that didn’t work. Finally I tried using the surface color channel, which worked somewhat, except that no matter how high I tweaked the resolution in the texture baker or in Photoshop, it still pixellated on the model in Unity.
I’ve tried UV mapping and cubic mapping, locking UV’s in the UVW tag, “continue UV’s” and just about every other configuration in the texture baking tool, but nothing’s working. Now I am filled with a great sadness.
Am I approaching lightmaps from the wrong direction? Do I need Bodypaint? (I just bought Cinema4D 10, which includes Bodypaint, but I don’t have it yet.) Is this problem related to Marble’s post about multiple UV mapped materials not importing from C4D to Unity?
I’ve done a lot of searching for answers, but haven’t found any step-by-step instructions on how to do this correctly. Any help would be greatly appreciated! 
If the baked lightmap is a single texture and the color of your object consists of several maps, the one lightmap will be applied fully to each of the materials in Unity where only parts of the lightmap would be needed. I guess, that is your problem.
Baking the lightmap for each texture/object in a different render-pass could solve that (so you get lots of different small lightmaps). Disabeling the objects for the rendering would be enough - unless you use GI or AO… then a single texture for your color would be necessary…
Yeah, this is similar to Marble’s problem of needing multiple UV sets (although this is an entirely different application of UV spaces since you need them to overlap and blend).
The Lightmapped Shader in Unity uses one UV set for your RGB texture, and another set for the baked lighting. As far as I know the only two 3D apps that support multiple UV sets in Unity right now are Maya and Modo. I think C4D is close and should work in the next update of their FBX exporter.
But you don’t entirely need multiple UV sets if you UV map your geometry differently. For example say you had a floor that is textured with a tiling pattern. If you repeat that tiled texture in Unity then baking the lights aren’t going to work because the lightmap will also tile to your tiled floor pattern. But if you planar map the entire floor and used one larger texture that you tiled in PhotoShop and then applied to the floor then you could bake your lights ontop of that texture and the whole thing would look right in Unity. The only problem with this technique of course is that it eats up a lot more texture memory since you can no longer use smaller repeating textures.
HTH
Thanks for your replies, Alpha-Loup and Antenna Tree. Yeah, I suspected this might not be possible with C4D, since I tried just about everything I could. The closest I came was with the surface color channel, which bakes the surface colors with illumination and shadows exactly as they appear on the model. I got excited, until I saw how bad the resolution was. I tried tweaking it up in the baker, but even at 1024 x 1024, it still looked bad. In Photoshop, I tried upping the resolution, too, but it still looked blurry.
Now I’m thinking I’ll just simplify my building interiors, doing the walls, floors, ceilings, etc., as separate objects, each using one “tile” of the same single texture, each using a separate light map, and then grouping them all together.
Is this how other C4D users do it? I’m not sure how expensive this will be for the engine, but I think it’ll be better than doing them as completely separate objects each using a different material. Time for more experimentation…
I don’t suppose the Bodypaint plug-in will help? I’ve heard Modo was good, so maybe I’ll look into it. So far this has been my biggest stumbling block 
Yikes, I just saw the Modo price tag–about the same as C4D. I’ll just wait for C4D’s next update (hopefully…).
Bodypaint is a very cool and helpful plugin but it still paints into the assigned textures and uses the same object uv´s. It wont help you. But maybe the problem is already fixed in R10?!
I already have R10. I could test the export for you if you want.
If you could, Alpha-Loup, that’d be great! So far I haven’t tried it on a real model for a game, just test models using a plane mesh with extruded walls and haphazard texturing. I didn’t want to spend a lot of time on a real building model, only to find that I couldn’t texture it correctly. I’ve done that kind of thing too often, thinking that I already knew enough about modeling and texturing (wrong!). 
Just send in your file. I ll give it a try.
Sorry, Alpha-Loup, Thanksgiving travel got in the way. Here’s a file of a test model with three textures used repeatedly, some as UV projections, others as cubic. I also baked three maps: shadow, illumination, and surface color, which you’ll find in the material manager, but not in the object manager. The surface color one didn’t work at all this time, maybe because I used several different kinds of projections (?). Forgive the seams in the walls; I was in a hurry.
I imported the model, without the shadow/illumination/surface color maps, into Unity with no problem at all. All three textures and all UV and cubic projections turned out correct, so maybe the multiple UV map problem was already corrected in C4D 9.6? I didn’t try applying the shadow map in Unity, because I already know what will happen: complete texture chaos. Thanks a lot for testing this for me! Maybe you’ll see something I’m doing wrong, since I’m used to texturing the Blender way.
24397–880–$interioruvtest.c4d_180.zip (122 KB)
I tested the workaround I mentioned before: building the model object by object, each with its own separate, single texture (mostly sharing tiles of the same texture), baking a shadow map for each individual object, then grouping the objects together and re-scaling the textures in Unity. (For the some reason the textures scale out-of-whack when you import them into Unity…) And it worked! So far I’ve only been successful doing this with UV map projections, not cubic, though I have to first set my wall texture as a cubic projection, bake the shadows, place the shadow map on the object, and then convert the original texture to UV mapping.
This is a shot of a simple test model, using a single texture for the walls, which, in this case, are a single object. The only problem is that there are seams, but there are many ways to overcome that. The floor is a separate object using a different single texture. I forgot to set the shadows at 75% instead of 100% full color, so they’re a bit dark.

The problem of cubic projection is, that every side of the cube uses an exact copy of the texture. You cannot get rid of that problem, because its in the nature of box-projection. You MUST use UV-projection to create proper lightmapping because after lighting it each face is uniqe. No other choice…
So, just been through the whole thread and just found your file 
I will test it this evening. But the box-mapping problem cannot be solved… i see what i can find to help you.
I’m glad you told me about the cubic projections, Alpha-Loup. That will save me a lot of wasted time experimenting in the wrong direction!