We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Puzzle to correlate time from browser to set watch face to same time.

Home Forums Puzzles Puzzle to correlate time from browser to set watch face to same time.

Tagged: , ,

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #38493
    mcolinp
    Customer

    I created a watch which has a functioning animation setup in blender to animate a second hand, with the minute and hour hand being driven by drivers that make everything work like a real timepiece.

    I was wondering if there could be a way to insert via puzzles, the current time based on the viewer’s computer/browser, in a way that would make the animation advance to that same time as it is being loaded.

    #38511
    mcolinp
    Customer

    Here is what I have so far. I have managed to create the proper relationships using Verge3D puzzles to get the proper relationships between the hour hand, and the minute hand; in regards to the second hand animation. Still struggling to see how I could get the hands to position themselves on load using the time puzzles.

    Shinola Watch Concept

    #38594

    Hi,

    you can possibly get the current time using the exec script puzzle

    https://stackoverflow.com/questions/10599148/how-do-i-get-the-current-time-only-in-javascript/25164024

    then you can translate the obtained values to rotation angles

    BTW here is another Verge3D-based clock app https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:c8c1476f0e/applications/budilnik/budilnik.html

    Chief 3D Verger | LinkedIn | Twitter

    #38633
    mcolinp
    Customer

    That example looks great. Would there be a way I could see an example of how this javascript would be applied into the puzzles, with the rotation angles as you mentioned?

    I’m pretty code illiterate, so any slight modifications that would be needed, are not things I would instinctively know to do. I can usually work it out if I see an example.

    #38641

    actually I was wrong: Verge3D got this puzzle recently
    https://www.soft8soft.com/docs/manual/en/puzzles/Time.html#system_date_time

    You can use its output (seconds, minutes and hours) to rotate the clock hands

    https://www.soft8soft.com/docs/manual/en/puzzles/Objects.html#set_transform

    Chief 3D Verger | LinkedIn | Twitter

    #38663
    mcolinp
    Customer

    So I have tried various setups with the puzzles you specified, but I am still coming up short. An additional issue, is that the rotation by default, goes counter-clockwise. I tried reversing the local axis for each ‘hand’ in Blender, but it still rotates the opposite direction from what I need. Also, while the hands do move based on the puzzles, they do not reflect the actual rotation based on the Time puzzle. (At the time I made these screenshots, it was after 8:00 am here.) Of course I am likely missing something here. Here is a picture of the latest configuration:

    Attachments:
    You must be logged in to view attached files.
    #38665

    rotation by default, goes counter-clockwise

    yes, you can use negative rotation

    For hours – 12 hours make 360 degrees, so 1 hour is 30 degrees, thus you need to multiply your amount of hours by 30.

    For minutes and seconds – same, but multiplier should be 360/60 = 6

    Chief 3D Verger | LinkedIn | Twitter

    #38666
    mcolinp
    Customer

    I get what you are saying, I’m just not understanding what puzzle configuration I can use to make the time generate, translate into those values.

    #38692

    Here’s an example for you.

    Attachments:
    You must be logged in to view attached files.

    Co-founder and lead graphics specialist at Soft8Soft.

    #38763
    mcolinp
    Customer

    Thank you so much for the example. I was able to replicate the puzzle setup in my file, but there is an issue with the ‘hour’ hand. In between each update, it flips 180 degrees until the next update, (every second). So when it is 11:00, it will go to 11:00, then flip around to 5:00, repeatedly. I deleted all drivers from the hands, and turned off exporting the animation from blender when exporting/updating the gltf file. I cannot pinpoint what is causing this, otherwise the puzzles did work.

    Attachments:
    You must be logged in to view attached files.
    #38791
    mcolinp
    Customer

    If you want to see the file, I can send it via email, through a private file-sharing link. Please provide an email address for this purpose, unless there is a simple solution you can otherwise point me to.

    Thanks again for the help.

    #38838

    It happens in my example too or only with your app. If it’s only in your app then you can delete all what you don’t want to share and leave only not properly working mesh or replace it with something simple like cubes and share it here in archive.

    Co-founder and lead graphics specialist at Soft8Soft.

    #38867
    mcolinp
    Customer

    Here is a stripped down version. It exhibits the same behavior; with the hour hand flipping 180 degrees, back and forth every second. (It does not happen in your example, only mine.) Perhaps its the way my objects are parented?

    #38871

    Thanks for the example, will try to find the reason of such behavior.

    Co-founder and lead graphics specialist at Soft8Soft.

    #38875
    alexlopatin
    Customer

    You can use my example or and improve it :yes:

    Attachments:
    You must be logged in to view attached files.
Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.