1
$\begingroup$

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.

$\endgroup$

3 Answers 3

1
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – Zanzi
    Commented Dec 14, 2022 at 15:36
2
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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

$\endgroup$
6
  • $\begingroup$ Were you looking after rendering metadata? $\endgroup$
    – lemon
    Commented Mar 20, 2020 at 14:47
  • $\begingroup$ Thanks for posting your solution :). I've found Text Counter addon which could be useful here. And thanks for mentioning the Sun Position addon, i had no idea it works in 2.8! $\endgroup$ Commented Mar 20, 2020 at 14:48
  • $\begingroup$ @lemon Yes, something like that. $\endgroup$
    – Zanzi
    Commented Mar 20, 2020 at 14:50
  • $\begingroup$ @JachymMichal. It looks like that could have been an easier solution. $\endgroup$
    – Zanzi
    Commented Mar 20, 2020 at 14:50
  • $\begingroup$ @Zanzi, don't know if it is what you want, but look at the output property panel 'metadata' section and 'burn into image'. $\endgroup$
    – lemon
    Commented Mar 20, 2020 at 14:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .