1

I am using the lighting sun position add-on in Blender 2.82 to render an animation. I want the viewer of this animation to see on which time it is. I only want the hours to show.

So it should be a kind of "timer" which starts at 09.00 in the morning and ends on 20.00 in the evening. And just reads the time values in the lighting sun position add-on.enter image description here

I have no idea how to start with this. I have been searching for compositing settings, but i read there are no options for text in the compositing nodes.

I have also been searching for other methods and often see python codes. I have no idea how to use them, and they don't seem to do what i want.

It seems such a simple thing that i am thinking that i miss something very obvious.

Zanzi
  • 65
  • 5

3 Answers3

2

You can use the metadata to do that:

Go to the output properties and to the metadata section.

Then choose the date and activate 'burn into image':

enter image description here

You can obtain something like that:

enter image description here

That can also be customized using Python as described in this answer.

lemon
  • 60,295
  • 3
  • 66
  • 136
1

I ended up making an overlay image in photoshop. Saved it twentyfour times for each hour. And give them names from 1 to 240. This way i have one picture for every frame.

I used an image sequence in the compositing to put the images over my renders. enter image description here

Zanzi
  • 65
  • 5
1

Hade the same problem. I ended up using the animation nodes add-on with a custom expression:enter image description here

('%.2f' % (int(((math.floor(bpy.data.scenes["Scene"].sun_pos_properties.time))+(bpy.data.scenes["Scene"].sun_pos_properties.time-(math.floor(bpy.data.scenes["Scene"].sun_pos_properties.time)))*0.6)*100)/100)).zfill(5)

You can just rebuild the node tree and copy the expression.

3ifdj30
  • 65
  • 5
  • Works perfect in the GUI. But it gives me problems when i use command line rendering. If i parent the text to an object (camera or empty) and move the object, it will not render the text after the object stops moving. Ideal i would want to use text object output in the compositor, but i can't figure that out. – Zanzi Dec 14 '22 at 15:36