0

I am currently working on a prototype which aims to create a short interactive film made from a sequence of fast interchanging images. On each frame we plan to apply a fish-eye post-processing effect and leveraging WebGL to offload this computation to the GPU unit. An example of this effect applied in real time with WebGL can be found here.

The main challenge involved here is being able to download a large amount of 512x512px images (2000 images or more) into the user browser maintaining an acceptable framerate in the generated sequence (a framerate of 5-10 fps starts to be acceptable). This is an exploration experiment and therefore it can made so it is only compatible with Chrome and the image sequence varies depending on user input, so pre-rendering the sequence beforehand into a video is not possible. Each image used for the textures weights 25KB on average and it will be served from a robust CDN engineered to cope with the large amount of traffic involved.

A relatively short preloading time is acceptable (60 seconds or less) to allow some of the images to be cached while we entertain the user with the initial bit of the experience.

Is this possible? Anyone able to help on this?

Gixo
  • 389
  • 2
  • 4
  • Why not just play a video through WebGL? eg (http://sp0t.org/videoriot/) – gman Sep 15 '12 at 09:15
  • Because the sequence of images will completely change depending upon the initial user input, and we don't want to have the user to wait for the video to be encoded etc. Does this make more sense now? :) – Gixo Sep 15 '12 at 13:09
  • I think all you can do is try. a 512x512 image takes at least 1meg of ram uncompressed. 2000 of them therefore take 2gig of ram. You can try creating 2000 textures or you can try creating 1 texture and calling gl.texImage(....., imageToDisplay) for each one. Creating 2000 textures is more likely to fail from being out of memory than creating 1 texture and 2000 images so I'd suggest that path. – gman Sep 17 '12 at 03:01
  • To save video memory, can we not dispose the images once it has been displayed? – Gixo Sep 17 '12 at 08:52
  • Sure. JavaScript is garbage collected so any images you no longer reference will automatically be freed. – gman Sep 18 '12 at 10:33
  • Great, we are now building a first prototype for this with excellent results. Will let you know how it goes! – Gixo Sep 18 '12 at 14:08

0 Answers0