Day and night buildings in Google Earth with Blender
Blender2.46 is out and now it comes with the QMC algorithm for calculating shadows. This and the great feature to bake textures and the multiUV maps (not new features) give us the tools needed to do night and daytime textures.
More great news, in new Google Earth v4.3 we can activate the day/night lighting. This shows a nice time slider that allows us to move the shadows and to view any location with day or night lighting.

I really like this new feature, now with the day and night textures from Blender and by editing the KML you can show your model with both textures. Your own day/night version with the correct lighting. To do this you can use the tag TimeSpan, you can use your own slider that will show the model in the desired time.
A simple example, in the Placemark of the 3D model I use the TimeSpan tags to call the different models changing over time:
<Placemark>
<name>Model en 3 dimensions del castell de Miravet</name>
<TimeSpan>
<begin>2008-01-01T08:00:00Z</begin>
<end>2008-01-01T16:45:00Z</end>
</TimeSpan>
With this, the first model is rendered between 8 and 16:45 in the day 1-1-2008. Now I must add the second model, with same mesh but different textures, with the next tags:
<Placemark>
<name>Model en 3 dimensions del castell de Miravet de nit</name>
<TimeSpan>
<begin>2008-01-01T16:40:00Z</begin>
<end>2008-01-02T00:40:00Z</end>
</TimeSpan>
And the result:
We must load two times the same mesh, but not the same model. We need two collada files with the same mesh but with different material ids. If we use the same model (an unique collada file) and we want to change the textures with the Resource Map tag we won’t view the texture changing because the material id is the same and the Google Earth Cache doesn’t refresh always.
A nice way to save bytes will be to use the internal references in Collada. But we see in the Google Earth documentation that this is not supported. If we look at the Collada documentation, this is supported by the collada format, and we could split the .dae files in meshes and materials using URIs to save bandwith. Maybe in the future

Finally, you can download a sample KMZ made for the Patrimoni Cultural de la Generalitat de Catalunya department. Inside you can view “El Castell de Miravet” (Miravet castle) a nice place in Catalonia.
WARNING: It don’t works fine with some graphic cards, still I don’t know why ![]()




