Circular timer/progress bar?

Anyone got any ideas how to animate/create a moving circular timer?


Thanks :smiley:

I think I found a solution, hopefully this will be useful for someone else!

you can use this.

ring.blend (425 KB) new version

i have added a ring, extruded it to get faces, made one edge at the top sharp and applied an edge split modifier angle split disabled to split the edges. than i selected one edge in edit mode, activated propotional editing and lifted the edge along the z-axis and extended the influence area so all vertices are moved. doing this you get some sort of a light screw ring. than i douplicated the open ring, gave both rings different materials with different colors, changed the height of the green ring so it gets underneath the white ring. i made a keyframe for loc and rot. at frame 100 i turned the ring 360 degrees and lowered its height so it gets under the green ring. you have to do some tweaking to make it work, because, when you dont have the right height, the srewstructure wouldnt work. you need another set of keyrings at this frame.

the animation isnt all linear and i didnt work with animations so far, so i dont know how to manipulate the graph editor to make it linear.

ok now all you have to do is using an animation within bge.

i think the pro of my solution is that you can easyly change the structure of the rings. you can make it 3d and you can change the size with animation too.

That would work, but you’d need quite a high poly ring shape to get the smooth circle

or you put a texture on it with an alphachannel so you got no edges. or you make a passe partout with high res textures and an alphachannel and put it above it. its that easy and you still can make it 3d.

Attachments

ring.blend (478 KB)

Hey! An attempt to adapt this GLSL shader: https://www.panda3d.org/forums/viewtopic.php?f=4&t=17174

Perhaps something is possible with smoothstep to avoid pixels…

very slick! works great. :smiley:

It could work better as a material shader instead of a 2D filter… Your technique looks nice :slight_smile: