Ok, here we go. (In fact, I think it deserves a short tutorial in the wiki. Maybe heretic would find some time to fill that white spot.
) Lets pretend we want our sunrise to begin at frame 1 and the sunset to be at frame 150.
- Add an Empty to your scene, place it anywhere you like.
- Select an Empty and open the Ipo Curve Editor window in Blender.
- In the right pane of the window click on the property you'll use to animate an Empty. Well, Empty is of no interest to us, we just need a curve to attach it to the Lux property. Lets select a LocZ property as this is the most straightforward and guaranteed to work (not all object properties can be attached to Lux properties: if LuxBlend crashes on you, you'll know to create a curve for another object property ).
- Hold down Ctrl and left-click near the origin of coordinates.
- Press N, in Transform Properties enter 1 for Xmin, and 0 for Ymin.
- Press Tab to enter Edit Mode for the curve (which doesn't looks like a curve yet ).
- Again, hold down Ctrl and left-click somewhere to the right and above of the first point.
- Make sure the newly added point is selected, then in Transform Properties for Vertex X enter frame number 150 (for the sunset), and in Vertex Y enter the number of minutes (starting from 00:00) when the sunset happens at the selected day at selected location. If it is 20:45, enter 1245 in the field (i.e. 20*60+45). The curve will fly up like crazy, but this shouldn't bother us.
- Press Tab again to leave Edit Mode.
- Press T, and select Linear interpolation for the sun to have a uniform motion speed over the skydome.
Now pay attention to the name of Ipo curve object which is shown in the window's header. By default, it's something like ObIpo. You can click and rename it (to SunIpo, for example) or leave as is, but please remember it, or select the name and press Ctrl+C to copy it.
- Open LuxBlend and go to the System tab. Once there, press "Enable Parameter IPO Keyframing" button to, well, to enable IPO Keyframing.
- Now go to the Cam/Env tab. Activate "Geographic Sun" if you didn't done this already, then press "Sun IPO Keyframing" button, and a little "I" button to the right of "IPO day minutes" field.
- In the "Ipo" field which appeared below enter the name of Ipo curve (ObIpo, if you leaved the default one).
- The direction of the sun lamp will change according to new data. Most likely it will point in the above direction, because, as you remember, we've set the first point of curve at 0, meaning 00:00. Now you can return back to the Ipo Curve Editor and update the first point of curve. I leave this to you as your homework.
After everything is done, you'll see how sun automatically updates direction as you're going through frames. Please note, however, that pressing Alt+A to preview animation won't update sun lamp dynamically -- LuxBlend updates it only on manual frames shift and during export.