5 Replies Latest reply on Jan 8, 2009 6:50 AM by SeaBream

    Pixel Bender fluid demo

      We've used Pixel Bender in Flash 10 to create a fluid dynamics demo of a wind tunnel.


      Pixels Bender makes it about twice the speed as standard flash on a dual processor machine. We reckon than if Flash PB included support for regions and arrays you'd get another 40-50%.


        • 1. Re: Pixel Bender fluid demo
          T Beddard Level 1
          Very nice. I've always wanted to do some fluid dynamics experiments. Are there any particular resources you used for this or could recommend for creating these types of simulations?
          • 2. Re: Pixel Bender fluid demo
            Lars.pehrsson Level 1
            Very nice indeed. I noticed that there kind of 6 channels (cars, trains etc.etc.) so I was wondering whether you are using some kind of parallelism in the code for each channel, or you are doing each sequentially?

            We, during christmas tried the PB Api on on some timeseries for stocks, having the PB-api calculate volatility of a stock.
            Worked fine, but the speed increase we were looking for were only gained in form that the main Flex-thread was offloaded during the calculation. Which basically means that the incentive of using this are gone.. Unless we can parallelize the algorithms.

            This was the background for my question, hope for a positive response.

            FYI. this is the Flex app. in question.

            • 3. Re: Pixel Bender fluid demo
              Great! Due to the restrictions of Pixel Bender (no arrays) I guess this
              only possible in Flash, not After Effects ... Thanks for sharing!
              • 4. Re: Pixel Bender fluid demo
                Lars.pehrsson Level 1
                To clarify.. With Channels I ment the 6 levels you have vertically.

                • 5. Re: Pixel Bender fluid demo
                  SeaBream Level 1
                  Thanks for your comment Lars.
                  The Fluid Dynamics algorithm works by dividing the area into thousands of tiny cells and then calculating the density and velocity of the smoke in each one. This is means that the algorithm is inherently parallel and the more processors you have on your computer the faster the simulation will run.

                  You’re correct in saying that you’ll need to parallelize your volatility algorithm for PB to give much of a speed increase.
                  How you do this will depend on the algorithm you’re using.
                  All the best