Using all scene objects to generate lightmap, but only applying lightmap to certain objects

I have a forest scene where I want to compute a lightmap for the ground which catches all the shadows from the trees, but I don’t want to apply a lightmap to the trees themselves since I’ve used some texture from my trees with baked in shadow detail already. Is there a way to calculate a lightmap for the ground using the trees but have the trees not lightmapped?

I tried deleting all the lightmaps from the scene except the one for the ground to no avail. Is there a way to turn off lightmapping on a per object basis after the lightmap is baked?

Do this: renderer.lightmapIndex = 255; for the objects that you don’t want to be affected by lightmaps.

What if I turn off “receives shadows” in the mesh renderer. Does the lightmapper look at those settings when computing the lightmaps?

uncheck “static” from all the trees once baking is done. not sure whether it works. give a try.