JavaFx vs Flash vs Silverlight!!! Flash vs Silverlight: Image Slide Show using Perspective 3D
Mar 25

Silverlight 3 Beta was officially launched in MIX09 last week. It has a lot of amazing features such as Perspective 3D, Deep Linking, Out of Browser, etc.. I am amazed how fast Silverlight can evolve within half year. Therefore, I will try to focus on discussing the Silverlight 3 features in the coming days.

Besides, I have installed Flash 10 in my computer. I believe I can continue to create a lot of good samples by using these latest RIA technology.

Nevertheless, the first comparison on Flash 10 and Silverlight 3 Beta is on the capabilities of 3D rendering. There are all together 4 comparisons:

  1. Perspective 3D on an image with drop shadow effect.
  2. Perspective 3D on various kind of controls.
  3. Perspective 3D on video.
  4. Perspective 3D stress test by rendering 100 images at the same time.
    (Beware, may be it will crash your browser.)

Please remind to upgrade your Silverlight plugin in order to view the sample below. Read this article Silverlight 3 Beta install experience for users if you have any difficulties.

Comparison

Source codes

 

Flash

Silverlight

Shares and Enjoy~

Did you like this post?

Subscribe here:  

38 Responses to “Flash 10 vs Silverlight 3: Perspective 3D”

  1. Przemek Says:

    Great job Terence. Is it just my browser or is the Perspective 3D with Image moving considerably faster in Flash? Might that be because the Silverlight 3 has less juice in it?
    Przemek

  2. Herthoren Says:

    It would be nice to put an FPS meter in the corner of both applications, otherwise nice test.

  3. Dowell Says:

    I am having the same experience as Przemek: Silverlight is running much slower than Flash in the first test. The other tests seem to be roughly the same in performance.

  4. admin Says:

    I think the slow down may possibly caused by the drop shadow effect.

  5. Bigsby Says:

    Wonderful job.

    Same as Dowell. The only real difference I found is that, when scrolling up or down Flash animation pauses whereas SL3 keeps on going.

  6. Herthoren Says:

    Just checked the page source and I don’t see the EnableGPUAcceleration parameter set to true for the SL app. Without that (and bitmap caching the images) it’s pretty senseless to make any consequences about the performance.

  7. Ciaran Murphy Says:

    Flash Payer 10,0,1,218 installed - none of the 3d works all just 2d.

  8. Michael Says:

    lol, using the slider in 3d will be a real challenge for our customers :->

  9. marco Says:

    Hi man, thanks x your tests; they’re very interesting!

    What do you use to realize Silverlight applications? Visual Studio + Exp. BlenD?

    tnx, bye

  10. admin Says:

    Herthoren, thanks for the suggestoin. I have attempted to add what you have suggested. However, seems that it doesn’t help too much on the first test.

    May be I have set something wrong. But I also doubt how much it can help since the Image is not vector and the effect of GPU on perspective 3D.

    Anyway, I will try to make some samples to test over the GPU and bitmap cache feature.

  11. Herthoren Says:

    You’re right I checked it too, looks like GPU acceleration doesn’t help perspective 3d stuff.
    Apologies

  12. memals Says:

    Flash fail
    ReferenceError: Error #1069: Property rotationX not found on flash.display.Bitmap and there is no default value.
    at com.shinedraw.animations::Test4/on_enter_frame()

  13. Tom Says:

    Does anyone see this “perspective 3D” feature as being that useful? I was really hoping for GPU-based rendering of texture mapped triangles. Between this limited 3D support, GPU acceleration, pixel shader support (software only??), one-pixel-at-a-time bitmap API, SL3 looks very promising at first glance but then you find out it’s mostly made out of cardboard. *sigh* Hopefully they implement this stuff for real in SL4.

  14. Mikey Says:

    If the flash app is running the 100 images example at the same time as the SL app then the SL app slows down perhaps Flash is being too much of a resource hog.

  15. Jurrian Says:

    The GPU acceleration will not work unless you add the flag EnableGPUAcceleration as was mentioned.

    Correct me if I’m wrong but I believe that one needs to also set the CacheMode property on the control that needs to be accelerated to “BitmapCache”

  16. obsid Says:

    10 to 1 the reason the first test is slow is that your using the drop shadow in silverlight. Because the drop shadow is software rendered and it recalculates on every frame, it slows things down ALOT.

  17. Jurrian Says:

    Got it to 60 FPS by using this code. And its legit too, just using another wonderful feature of SL3

    WriteableBitmap wb = new WriteableBitmap(550, 420, PixelFormats.Pbgra32);
    wb.Render(MyPlane, new ScaleTransform());

    Image img = new Image();
    img.Source = wb;

    img.SetValue(Grid.RowProperty, 1);
    LayoutRoot.Children.Remove(MyPlane);
    LayoutRoot.Children.Add(img);

    _planeProjection = new PlaneProjection();
    img.Projection = _planeProjection;

  18. Simon Says:

    Have you tried enabling gpu acceleration in the silverlight example?:

    would be interesting to know if there´s a performance increase

  19. TheCyberKnight Says:

    On my machine, the is no obvious difference except for the video test.
    The SL3 version is much smoother, with no apparent frames drop where the Flash version seems to skip frames at a constant rate (choppy but constant).

    One other observation, every test has a constant speed in SL3 where the Flash version varies.

  20. mikekidder Says:

    @Jurrian - I tested your code and makes a huge difference (with dropshoweffect still applied), and works well under VMWare Fusion. Excellent stuff

    I was directed over here from Jaime Rodriquez site, check out the WPF effects ported to Silverlight:
    http://blogs.msdn.com/jaimer/archive/2009/03/25/wpf-effects-library-running-in-silverlight-3.aspx

    What really amazes me is that the WPF pixel shaders performed really poorly (under VMWare Fusion running an XP instance), but are working great in Silverlight in same environment. And the pixel shaders are working great under OSX. I’m floored, REALLY COOL!

  21. Nick Says:

    I’m with Tom on this one. We were expecting 3D rendering with hardware acceleration as pre-announced by Scott Guthrie on his blog last year. I hope that the so called simple perspective was just a last minute stop gap because they missed the deadline for 3D rendering - I hope Microsoft will be big enough to come clean on their plans for 3D in Silverlight.

  22. dongkang's me2DAY Says:

    동강의 알림…

    Flash 10 vs Silverlight 3: Perspective 3D…

  23. » some sources about silverlight 3D progra … Doing & Done Says:

    [...] Flash 10 vs Silverlight 3: Perspective 3D [...]

  24. yhua045 Says:

    If I do the following code:

    TextBlock txtBlock = new TextBlock();
    txtBlock.Text = content;
    txtBlock.Foreground = new SolidColorBrush(Colors.Red);

    txtBlock.TextAlignment = TextAlignment.Center;
    WriteableBitmap wb = new WriteableBitmap(61, 13, PixelFormats.Bgr32);
    wb.Render(txtBlock, new TranslateTransform());

    ImageBrush imgBrush = new ImageBrush();
    imgBrush.ImageSource = wb;

    It doesn’t always generate the correct ’snapshot’ of the textblock. I have done quite a lot of research, but there are very limit resources out there at present. Could any one be kindly help me to see is something wrong with my code. The problem that I had is I try to output 18 textblocks and very often, it only generates a small portion of those textblocks correctly. Others are just missing. Please help, thanks.

  25. 陈晓辉 Says:

    很好,很不错

  26. wonderfulpackage Says:

    อยากทำได้มั่งจัง

  27. Saffron Interactive » Blog Archive » First impressions of Microsoft Expression Blend 3 Says:

    [...] smoother animation due to GPU acceleration capabilities and perspective 3D support. This website (http://www.shinedraw.com/3d-illusion/flash-10-vs-silverlight-3-perspective-3d/) provides a number of examples of Flash verses Silverlight performance comparisons. There are [...]

  28. TimothyP Says:

    Seems to me the Silverlight version is a lot faster and runs more smoothly than the Flash version. I’m running on Mac OS 10.6

  29. Tim Acheson Says:

    The Flash app doesn’t work for me. All I see is a number of boxes flickering at high speed. Presumably that’s meant to be the button that starts the demo — but it’s broken. Clicking doesn’t do anything.

    The Silverlight app is a beautiful example. SO smooth, so crisp — perfect. I like the 3D video overlay especially. I’d like to see this demo with SIlverlight 3 though please, as it’s even better.

    I can understand why the editor of Macworld magazine acknowledges that SIlverlight is “much better” than Flash:-

    http://www.timacheson.com/Blog/2009/sep/macworld_editor_says_silverlight_is_better_than_flash_for_video

  30. TimothyP Says:

    Not to mention that Silverlight doesn’t limit you to **** ActionScript.
    At least Silverlight cares about developers as well :)

  31. Suzi Carrothers Says:

    Just imagine I read it twice. While I am not as accomplished on this issue, I match with your determinations because they create sense. Thanks and goodluck to you.

  32. кpoшкapoкcиc Says:

    Да уж, судя по комментариям тут на сайте, никому не повредит умение ярче высказвать свои мысли, поддерживать интересную беседу, быть остроумным в конце концов… :)

  33. wonderfulticket Says:

    Да уж, судя по комментариям тут на сайте, никому не повредит умение ярче высказвать свои мысли, поддерживать интересную беседу, быть остроумным в конце концов… :)

  34. Marlene Rush Says:

    I saw your blog when I was browsing for something else, but this post was on the first page of Yahoo your web site must be pretty popular! Keep up the good work!

  35. facebook zynga Says:

    i’m generally bumping about the internet almost all of the night which means I have a propensity to browse a good deal, which unfortunately is not commonly a beneficial option as the majority of the web sites I visit are composed of unproductive nonsense copied from various other web sites a thousand times, nevertheless I have to give you credit this website is definitely readable and even features some genuine material, therefore kudos for removing the pattern of simply copying other individual’s websites, if you ever wanna try a few hands of zynga poker together just gimme a shout - you have my email address :)

  36. Uko Says:

    Wow, awesome!

    Flash sucks

  37. Comparaison de Flash et Silverlight pour le 3D - b2bweb.fr – Work Wild Web @ BornToBeWeb Says:

    [...] ce matin de découvrir cette très bonne comparaison des capacités 3D de Flash et Silverlight : Flash 10 vs Silverlight 3: Perspective 3D. (Si ce type de comparaison vous intéresse, il y a en a des tonnes ici : Flash vs Silverlight [...]

  38. syabac Says:

    waw,
    very good comparasion..
    thanks for sharing..

Leave a Reply