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:
- Perspective 3D on an image with drop shadow effect.
- Perspective 3D on various kind of controls.
- Perspective 3D on video.
- 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
Perspective 3D [Flash 10, AS3] (2.8 MiB, 2,518 hits)
Perspective 3D [Silverlight 3 Beta, C#] (2.7 MiB, 6,776 hits)

March 25th, 2009 at 4:07 pm
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
March 25th, 2009 at 4:36 pm
It would be nice to put an FPS meter in the corner of both applications, otherwise nice test.
March 25th, 2009 at 4:41 pm
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.
March 25th, 2009 at 5:42 pm
I think the slow down may possibly caused by the drop shadow effect.
March 25th, 2009 at 5:43 pm
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.
March 25th, 2009 at 5:44 pm
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.
March 25th, 2009 at 6:17 pm
Flash Payer 10,0,1,218 installed - none of the 3d works all just 2d.
March 25th, 2009 at 6:25 pm
lol, using the slider in 3d will be a real challenge for our customers :->
March 25th, 2009 at 6:54 pm
Hi man, thanks x your tests; they’re very interesting!
What do you use to realize Silverlight applications? Visual Studio + Exp. BlenD?
tnx, bye
March 25th, 2009 at 8:34 pm
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.
March 25th, 2009 at 9:08 pm
You’re right I checked it too, looks like GPU acceleration doesn’t help perspective 3d stuff.
Apologies
March 25th, 2009 at 9:57 pm
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()
March 25th, 2009 at 11:19 pm
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.
March 26th, 2009 at 2:38 am
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.
March 26th, 2009 at 3:08 am
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”
March 26th, 2009 at 6:07 am
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.
March 26th, 2009 at 10:29 am
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;
March 27th, 2009 at 3:05 pm
Have you tried enabling gpu acceleration in the silverlight example?:
would be interesting to know if there´s a performance increase
March 27th, 2009 at 10:50 pm
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.
March 28th, 2009 at 4:19 am
@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!
March 28th, 2009 at 4:12 pm
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.
May 11th, 2009 at 11:29 pm
동강의 알림…
Flash 10 vs Silverlight 3: Perspective 3D…
May 20th, 2009 at 1:33 am
[...] Flash 10 vs Silverlight 3: Perspective 3D [...]
June 3rd, 2009 at 3:00 am
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.
June 23rd, 2009 at 12:08 am
很好,很不错
June 27th, 2009 at 2:18 am
อยากทำได้มั่งจัง
September 14th, 2009 at 6:19 am
[...] 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 [...]
September 14th, 2009 at 1:37 pm
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
September 19th, 2009 at 6:55 am
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
September 19th, 2009 at 6:57 am
Not to mention that Silverlight doesn’t limit you to **** ActionScript.
At least Silverlight cares about developers as well :)
December 22nd, 2009 at 5:16 pm
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.
January 15th, 2010 at 5:53 am
Да уж, судя по комментариям тут на сайте, никому не повредит умение ярче высказвать свои мысли, поддерживать интересную беседу, быть остроумным в конце концов… :)
January 15th, 2010 at 9:58 am
Да уж, судя по комментариям тут на сайте, никому не повредит умение ярче высказвать свои мысли, поддерживать интересную беседу, быть остроумным в конце концов… :)
February 2nd, 2010 at 10:30 pm
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!
March 20th, 2010 at 11:38 pm
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 :)
May 22nd, 2010 at 11:12 am
Wow, awesome!
Flash sucks
June 4th, 2010 at 4:12 am
[...] 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 [...]
July 10th, 2010 at 3:35 am
waw,
very good comparasion..
thanks for sharing..