Go Down

Topic: SSD1306 I2C OLED - Muybridge Animation (Read 5212 times) previous topic - next topic

stievenart

#15
May 08, 2016, 09:05 pm Last Edit: May 09, 2016, 02:39 am by stievenart Reason: added another animation
The old TVout library has a demo of a spinning 3D wireframe cube
https://github.com/cbmeeks/arduino-tvout/blob/master/examples/DemoPAL/DemoPAL.pde

I'll bet your library doesn't have a wireframe of a spinning dodecahedron...

See spinning dodecahedron animation at: http://youtu.be/y-KIPsp4hps

I made a second dodecahedron animation with perspective by rotating the bottom elliptical path opposite to the top three paths.

Dodecahedron animation with perspective at: https://youtu.be/VPEzzP9_Wyc

zoomx

#16
May 09, 2016, 09:51 am Last Edit: May 09, 2016, 09:52 am by zoomx
Well done!


It's not my library. I have a copy of it in github (but the link is not my copy) because the original repository is on Google Code that has closed.



Anyway Claus Ilginnis made a better work fixing more bugs here
http://sourceforge.net/projects/arduino-tvout/
But there is not any spinning dodecahedron!
See the spinning cube here
https://www.youtube.com/watch?v=E0E85EEyxMc
from 0:55. The rotation is not limited on one axis.

bitbank

#17
May 22, 2018, 02:33 pm Last Edit: May 23, 2018, 06:35 pm by bitbank
I just started exploring this subject and decided to go in a different direction. I created a Mac/Linux program to take animated GIFs and turn them into a compact form that's easy to play back (my own byte oriented compression). The player code doesn't need any RAM and runs well on an ATtiny85. I'm currently documenting everything and will release it as open source soon. Anyone interested can contact me with suggestions/requests before I publish it.

Here's a video of it running a short animation on an ATtiny85:

Youtube Video

I just added a blog post about it:

Practical animation on I2C SSD1306 displays
Library? We don't need no stinkin' library...we write our own

zoomx

Interesting!

Maybe you can consider cheap MCU like the STM32F103 (bluepill but STM32F4 series also!) or the ESP8266 for bigger animations!

david_prentice

I am very impressed with decoding a GIF with a tiny85.

We look forward to your posts.

David.

zoomx

It does not decode a GIF but a format developed by him.
I created a Mac/Linux program to take animated GIFs and turn them into a compact form that's easy to play back (my own byte oriented compression). The player code doesn't need any RAM and runs well on an ATtiny85.

david_prentice

Yes,   I am aware of that.    But I suspect that he has a pretty good knowledge of how to decode a regular GIF.

It would be interesting to know if it can be done with Uno-size SRAM.

Yes,   I am sure that you can invent a special format.    But you would need to process every standard GIF into this special format before you use it.    Not as convenient as using standard PC tools like IrfanView.

David.

bitbank

Yes,   I am aware of that.    But I suspect that he has a pretty good knowledge of how to decode a regular GIF.

It would be interesting to know if it can be done with Uno-size SRAM.

Yes,   I am sure that you can invent a special format.    But you would need to process every standard GIF into this special format before you use it.    Not as convenient as using standard PC tools like IrfanView.

David.
As I state in my blog post. No AVR MCU has enough RAM to decode a GIF. LZW compression needs a dynamic dictionary with 4096 entries and multiple pointers/flags for each entry. Animated GIF requires additional RAM to hold the previous frame. Neither of which is possible with less than 32-64k of RAM. My solution is a practical way to leverage the numerous animated GIF tools to easily create complex animations to run on AVRs. The other side of my project is that my code allows the "slow+cheap" I2C version of the SSD1306 to become practical for doing fast animations. 
Library? We don't need no stinkin' library...we write our own

zoomx

It is the same also for small GIF?
Because Bodmer was able to decode JPEG on a Mega (SRAM 8Kb)
https://github.com/Bodmer/JPEGDecoder
and I used his library on a STM32F103 with 20Kb SRAM.

Anyway maybe an ESP8266 or an ESP32 can do that?

bitbank

It is the same also for small GIF?
Because Bodmer was able to decode JPEG on a Mega (SRAM 8Kb)
https://github.com/Bodmer/JPEGDecoder
and I used his library on a STM32F103 with 20Kb SRAM.

Anyway maybe an ESP8266 or an ESP32 can do that?
JPEG and GIF compression have nothing to do with each other. Yes, it's possible to decode a JPEG with less RAM than a GIF. The problem with GIF decoding is that the dictionary grows as you decode the image. You may be able to decode a tiny image, but then a slightly larger one will need more room to decode. It would be a "half-baked" solution that would fail frequently. An ESP32 could certainly handle GIF decoding. This topic is about animating images on much more constrained MCUs like the AVR series.
Library? We don't need no stinkin' library...we write our own

Go Up