What Time Is It? by tomaspietravallo

Hi everyone!

I am really excited, I had wanted to post my work here since I saw this was going to be a thing, and I just finished my current project.

The idea for this came after a long time of thinking about a space/solar system based effect.

My effect is called “What Time Is It?” because it’s basically a really fancy clock - which ironically doesn’t display the current time.

What it does: It shows what earth looks like from above at any given moment of the day; the three main parts to achieve this are:

  • Surface, this is just the colour texture that shows the land masses and oceans, it’s affected by a sun (directional light) and the shadow the sphere cast’s on itself.
  • Clouds, these add a little more realism; they are affected by the shadow but don’t go completely dark
  • Human Light Sources: This is basically all the light emission from earth one would see from above due to big cities with lots of people packed in a tiny area, the lights are only visible at night - relative to the lights themselves not the day/night of where the user is.

What in my opinion is the most exciting part of the filter is the slider, it allows a user to change the time of day by +/- 12 hours relative to the local time of where the user is. The filter does update in real time, but as you can image sitting for hours watching the effect would quickly turn really boring, thus I gave users the ability to play with the time. I love the way all the parts of the effect update as you move the slider and see time passing.

In my opinion the best way to make sense of what I just described is trying the effect, I find it truly mesmerising.

Please feel free to critique anything and everything, from the textures to the logo, I want to hear your comments and opinions on the project.

I am happy to talk about the technical side of things and how this works in the inside, spoiler alert: lots of date parsing.

+1 for whoever notices the hidden feature on the timestamp. Answer: it changes between black and white depending on whether the frame is too bright or dark


Honestly very very little to critique! It looks great! Love the transitions with the slider, the night lights disappearing in favor of sunlight looks really good. Generally the earth and textures look great honestly.
Only thing I’d say, depending on how important the text is in your opinion, I’d place it at another position maybe, top left for ex, it’s not super visible because it’s stuck between the filter wheel and the bottom UI (also is invisible until the slider is activated)

1 Like

very pretty!! I like it a lot! maybe in the future (+4MB for a file) it can go further and you can zoom in on earth, checking out all the places :slight_smile:

1 Like

Hi Boris, thank you very much! Yes I’ll consider it as I’d like people to see it. The fact it’s invisible when there’s no offset was intentional because of static text even though I’d argue its a timestamp and thus should be approved, I’ll try to find another work around. Thanks for the feedback

1 Like

Hi Sarah, I’d love to be able to do that, unfortunately even the original 6k textures don’t have enough detail. The only way I can imagine how to do that would be with networking and the google maps/ mapbox API, basically downloading the images as needed; it would be awesome but sadly the capabilities just aren’t there :cry:. For the moment there’s a “pinch” gesture that allows you to scale the earth but of course the textures remain the same. The whole filter is 1.8mb :smile:


This is super nice! If you do want to try pushing the texture quality further, there’s a 10mb cap on facebook effects. I know it’s not popular at all, but it could make a nice portfolio piece (it already does, but more quality can’t hurt).

There was one small thing that I noticed about the rotation gesture. It was snapping when I tried using it. Maybe a spark bug, but worth looking into if you are trying to polish this up.

1 Like

Hi Josh. Oh thanks for pointing that out, now I’m definitely doing an update! Touch Gestures behave differently in scripts and patches and thus I had to implement a work around but it seems like it’s broken - and that the simulator and instagram handle them differently :upside_down_face: cause it worked in Spark.

I went with scripts because it allowed me to trigger the Ring.fadeIn() but I think I’ll handle that separately from the rotation and leave the rotation part to the patch editor.

Even though this was a fun little experiment I intended it to become part of my non-existent portfolio at some point since AR is something that is - from what I’ve seen - directed to brands and marketing campaigns.

Now that Sarah made my imagination spark I’d love to have a mapbox API that allowed for incredibly high resolution but sadly it’s not possible.

As I pointed out the effect is really small so I could include more detail but the textures are already 1024x1024, do you know if the 1024px maximum is just the documentation being unhelpful or is it an actual limit? Does the limit change if I intend to publish to Facebook?
If I can’t add resolution I could still lower the compression and add more color detail but the increase in quality won’t be as pronounced

Okey I think I found a way to bypass the limit so I’ll be able to use the original 6k texture in it’s entirety.

I’ll be updating in the next few days. Thank you @josh_beckwith, @Sarah, @Boris for the feedback :heart:


I’ve heard of ways to bypass the texture size limit by swapping files around, but I’m not sure if that approach is wise. I don’t know what you were thinking, but you can split the main image out into 1024 tiles and then recombine them with some shader ops.


Yes, that is exactly what I was thinking!