Jump to content

nicks

Xpresso powered analogue clock...

Recommended Posts

Hi there,

 

I've been asked to look at creating an analogue clock that displays the true time... the maths involved is fairly straightforward, but I can't work out how to get Xpresso to get the real world time?

 

I've done a similar thing in Unreal Engine, where you can extract values for the hour, minutes and seconds, then feed this information into the rotation of the clock hands. Is this possible using Xpresso?

 

Any tips or pointers appreciated.

 

Cheers,

 

Nick

Share this post


Link to post
Share on other sites

  • Topic Author
  • Hey @borg - thanks for that - it shows that it can be done, but I'm wondering how the script was written though - it is password protected unfortunately.

     

    Thanks again!

     

    Cheers,

     

    Nick

     

     

    Share this post


    Link to post
    Share on other sites

    You might want to do modulo 12 on the hour value :)

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Thanks so much for that! This is a huge help.

     

    Cheers,

     

    Nick

    • Like 1

    Share this post


    Link to post
    Share on other sites

    Is it me, or does that date-time method not update in real time ?

     

    Here's my version using ctime - timeline needs to be running

     

    hourminsec.c4d

    Share this post


    Link to post
    Share on other sites

    Ok this one's not working for me. That could be ofcourse my R14 version  .

    My script resets on frame 0..   working here on R14. 

     

     

    Share this post


    Link to post
    Share on other sites

    On R19 your script's indents were a bit out, and it worked ok after I lined everything up. I thought the only difference to XPresso with newer C4D versions was curved vs straight wires. Your Python looks like this on my system

     

    script.thumb.png.1efc5b1e0373dce9cc8444f9d3640d0c.png

     

    what does my straightened out version look like on your R14

     

    indents.c4d

     

    • Like 1

    Share this post


    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


    • Recently Browsing   0 members

      No registered users viewing this page.

    YOUTUBE CHANNEL:

    ABOUT US:

    C4D Cafe is the largest CINEMA 4D community. We provide facilities for discussion, showcasing and learning our favorite software :)
    ×
    ×
    • Create New...