World360: Unbugged and kicking!

A few days back, I posted the latest update on my World360 project (aka ‘stereographic projection‘… That’s what it is actually called). What this thing actually does is it turns a 360° panorama image into a stereographic projection. The idea is to render this real time (just for the fun of doing it) (I am thinking about doing more with this though…)

stereographicprojection

A few days back I ran into a (at that time) weird problem where transparency was rendered black after a few frames. I had a hard time figuring out what was going on, and I just didn’t have a clue where to start looking. Google wasn’t really helping me out either. So I posted my problem on FlashFocus but nobody came up with the answer to my problem. Peter Elst asked Ralph Hauwert if he already had run into this problem. Mario Klingemann suggested that there might be a problem with the premultiplied alpha. At that time I didn’t know what premultiplied alpha was and seen as the problem resembled the example Mario gave, it seemed quite obvious he was right.

So I took peace with this, and decided to fall back to a non-transparent image format like JPEG. 2 days later Erwin Verdonk came up with the answer to the whole problem… I just had a hard time understanding it…

The root of the problem was me: I had totally forgotten that the draw() method of the BitmapData class didn’t clear the pixels before drawing… Yea, that’s emberassing, right?

But okay… That took care of some problems. I rewrote some of the code, and adjusted some settings.
The speed and the result are quite okay right now. However using 450MB and up of RAM usage might be a bit of a killer.
I’m wondering if I could take care of this using PNGencoder or perhaps JPGencoder.

But for now I’m happy… The final result (for now) can be seen here.

Thanks everybody for helping me out. You guys rock!

PS: The picture used in this experiment was taken by Thomas Heylen. Thanks Thomas!

Ronny

view all posts

Ronny is a freelance frontend developer with a wild passion for creativity and a relentless hate against flat design. Ronny spent years as a Flash developer before moving to HTML5 and rediscovering fun and happiness.

3 Comments Join the Conversation →


  1. Nick Van der Vreken

    Nice work ( I believe I already said that 🙂 )

    If it makes you feel better, I wouldn’t think of any draw() method either. Then again, I couldn’t pull this off 😀

    Reply
  2. Erwin Verdonk

    Looking good! Well done :).

    Reply
  3. Recording 360 video with Ricoh Theta S – noCreativity

    […] have been into 360 imagery, 360 interactive videos and little planets for close to a decade. I’m not sure what it is about it, but it has always fascinated […]

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *