Juha wanted animated burning VOUDS logo for the teaser video. He asked if we could pre-render it on top of static background, which would have worked, but was way too limiting for my taste. So, I started to play around with Cocos2D-x RenderTexture. It works fine for rendering, but is way too slow for recording images at 60 fps. By using RenderTexture and saving each frame immediately to PNG file my MacBook Pro (2013) achieved 10 – 15 fps speed. Needless to say it did not look good enough for 60 fps video.
Next I created simple threaded consumer – producer system and added my own CustomCommand to the rendering queue. Threading allowed me to save frames into list and process them out of the Cocos main thread, keeping rendering at steady 60 fps. I also integrated lodepng – open source PNG encoder/decoder – with which I encoded and saved the frames as fast as possible in the consumer thread.
With these simple arrangements I managed to capture PNG images with alpha channel (for transparency) in good resolution and at constant 60 frames per second speed. The end result was 600 PNG images consuming almost 400 Mega bytes of space for ten seconds video. Below, one frame from the final image set. Looks great, doesn’t it? (Click the image to see it in full resolution).
Please, watch teaser video and see how good it looks in live action.

