[Bug]Animated sun flickers

In this video you can see my problem. During morning(beggining of video) it is not very noticeable, but as it goes forward and daylight comes in, sometimes it flickers. During flickering the sun color becomes more yellowish. This got even more annyoing in my tests during night when it got yellowishly lit from ground during 2:00. This is annyoing bug. What does cause it? Is it Blender bug?

You’ve got quite a low res shadow at that part. Either the shadow settings are low (256 or 512 resolution) or you’ve got a high resolution covering a large area. There’s not a lot you can do about that really. Some people use two shadow lamps, one high res just around the area of the main view and a low res one which covers a much lager area. Still going to get funky shadows sometimes though.

Vertex-parent the sun to the car, use a smaller shadow box and a 512x512 or 1024x1024 shadow.

Brilliant suggestion.

No! The shadows ARE NOT problem! I mean the filckering color. For shadows I will work on a script for cascade shadows when needed. But you should pay attention at the color of sun. It flickers oftenly.

For sunlamp - it is parented to a circle that is vertex parented to car. So the shadows folow all around.

Where is the script/logic that handles the sun’s color?
Without that, all anyone could do is throw out wild guesses.

No script - just an animation that is executed on sun. That’s the problem - it is just animations.

Either

  1. You are trying to animate the entire ‘day’ in one animation action. My guess would be that the tweening going on in this animation is not granular enough to give accurate results, or something along those lines.
    If that’s the case, maybe try making an animation for each major transition in color (Night to Sunrise, Sunrise to Mid-Day, Mid-Day to Sunset, Sunset to Night). Have a script tied to your game’s in-game clock to trigger these actions at the appropriate times of day.

Even then, though, the glitchiness may still be there. In that case, you may need a script which can slide the lamp from color A to color B over Time.

Hm… Why? It’d only be explained in that the Blender has bug in lihght animations. A serious bug.