Terrain Lightmap problems

First of all, when i create a terrain and immediately calculate a lightmap for it(from a directional light casting shadows on…etc) lightmap gets created in a few seconds.

When i make a real small hill and calculate lightmap again, it takes 15 minutes.

If i flatten the hill and calculate lightmap again it takes 15 minutes again.

If i add a cube on the surface and make sure it casts and recieves shadows, and do the 15 minute lightmap calculation, i dont see the cube shadow on the terrain.

How do i cast shadows from any game object including trees on the terrain with lightmap calculating thingy?

If its not possible at all, then how do i add my own homemade lightmaps and splatmaps to the terrain individually?

I am on Unity Pro Trial.

Thanks in advance,

Soo, i found this undocumented command:

UnityEditor.TerrainLightmapper.UpdateTreeLightmapColor(tex, Terrain.activeTerrain.terrainData);

Are there anymore like this command for splatmaps and other stuff? Alphamaps (Splatmaps i suppose) forexample?

There are a number of undocumented functions in the Terrain API, but they are undocumented for a reason. They aren’t officially supported by Unity. There are a few threads about these features on the forum, however.

When i create a terrain and paint some hills with couple textures, i am supposed to see the added splat maps on the terrain object in the hierarchy or the project folder right?

I cant see any splatmaps before i apply lightmap.

Another question, is there any performance difference using 4 texture tiles and 1 massive texture for the whole terrain? If not, is there a specific way of doing 1 massive texture or i just use it like a regular texture and scale it to 1/1 ?

The shadow casting and receiving settings of renderers apply to the realtime shadow system and are not related to terrain lightmaps.

To get an object to show up in the lightmap, it needs a collider.

Each of your terrains appears in your Project folder. If you locate your terrain there and select it, you will see a lightmap property in the inspector where you can drag your own texture.

The box has a collider attached, but the shadow is still not calculated during lightmap creation? What might i be doing wrong?

Thanks, is there a smiliar way to add splatmaps(alpha maps) for each texture as well?