Jump to content

  • “Great art picks up where nature ends.”  Marc Chagall 

Sign in to follow this  
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

Found this ancient file made by BASE80  & Rui Mac, hope this will help you. kind regards

PS using R14 here.. so don't know if this will work on newer versions..

Time_Date_Text_Xpresso.c4d

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

    I think it was written with python. Here's a python script that does the same  trick..  unlocked, so you can see, addon or change the script.

     

     

    Get_System_time_day.c4d

    Share this post


    Link to post
    Share on other sites

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

    Share this post


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

     

    Cheers,

     

    Nick

    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

     

    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.

    Sign in to follow this  

    About Us

    C4D Cafe is the largest Cinema 4D community. We provide facilities for discussion, showcasing and learning our favourite software.
    Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, watch tutorials directly from our video gallery,  get your own private messenger, post and upload images, manage your profile and much more. If you need to find solution to your problem or otherwise ask for help, C4D Cafe is the right place to be for learning 3D.  :cowboypistol:

    ×
    ×
    • Create New...