Skip to main content

Microsoft Silverlight

Jesse LibertyPresented by:
Jesse Liberty

Using 3D Transforms, Part 2

0 0

Leave a Comment Comments (10) RSS Feed


waxpo...

Member

Member

23 Points

#1 March 18, 2009 11:33 PM

Thanks for the tutorial.

(just a small problem: you may have a problem with your microphone. The sound is a little bit choppy:) )


SharpGIS

Member

Contributor

3397 Points

#2 March 19, 2009 1:36 AM

This must be the most tedious way of accomplishing something this simple.

First of all, why don't you use DiscreteDoubleKeyFrame to get the element out of view instead of the hack with setting multiple linear key frames. Secondly, a DiscreteObjectKeyFrame would be even easier by just collapsing the element.

Lastly why not put the backpanel truly at the back, and then flip the whole thing, instead of doing all these complex storyboards?

My solution is:

Create a Grid, and put both FormFront and FormBack in it. Add a YRotation=180 to the FormBack panel. Place FormBack before FormFront in the Grid hierarchy.

To do the animation, rotate the grid instead of the panels and halfway through the animation set visibility collapsed on the front panel using DiscreteObjectKeyFrames. This reduces the amount of XAML and code to accomplish the exact same thing to a fraction, and also makes the code much more logical and easy to explain.

Technically you shouldn't have to collapse the panel. If the two panels were really rotated, the z-indexes should also swap, making the back panel show up on top. I wonder if that should be considered a bug?


atitu...

Member

Member

1 Points

#3 March 19, 2009 2:06 AM

OMG!!!

Thanks Jesse, wonderful tutorial.

Adamlar yapmış abi bu ne ya çok heyecanlandım :)


greenboi

Member

Member

239 Points

#4 March 19, 2009 12:17 PM

i agree with #CSharpGIS:

this tutorial is horribly long-winded and boring, although I find the topic is highly interesting.

Thank you for the work anyway Jesse, but please think it through next time first. I don't think your xaml-heavy approach is any use for a real-world application (yes, even if it is specifically about media!)


techn...

Member

Member

42 Points

#5 March 19, 2009 4:40 PM

Jessy, using Blend this must be a piece of cake and can be done quicker. Will it be feasible to make videos that also uses blend?

Thanks, Rajeev

http://technicalpage.com


Bigsby

Member

Member

262 Points

#6 March 20, 2009 10:32 PM

You'll have to slow down a little, #SharpGIS.

I agree the tutorial isn't based on the best technical options. I think it's only suposed to show the possibilities available.

About the z-index, remember that:

1. What is done here is just two StackPanels on a Grid meaning, the z-index is always inverted with the grid's children index of the StackPanel.

2. As consequence of the first point, this is not a Viewport3D yet. Viewport3D provides those kind management but at GPU level. I'm sure SL3 final release will have complete 3D native support just like WPF and you won't have to swap StackPanels and will just have to set each as the front material and the back material of the same surface.

The naming used for this feature makes it quite clear that this is only (yet) a planification (or Skew as named by Jesse) but, joyfully, already performed by the GPU.

Would you believe SL3 would be already at this point so early in time? I wouldn't...


mbroo...

Member

Member

30 Points

#7 March 21, 2009 1:01 AM

Actually, I would have thought they would have been a little further on then this. The base code already exists in WPF (Silverlight being a subset and all). And given that WPF based 3D engines already exist out there for Silverlight 2 (See Kit3D on Codeplex), I had hoped they would have implemented the Viewport3D, etc stuff at least at some level. "Flipbook" based rotation is fun, but the rubber hits the road in realtime manipulation of vector based 3D objects such as quaternion rotation. A lot of us are well beyond this stuff already and are chomping at the bit for real meat. Translating Zam3D Geomertry3D Mesh’s by hand is supper tedious. I have on more than one occasion considered creating my own parser to strip out the usable parts (things like Emissive and Spectral Materials not yet available).  Given that the current implementation of Blend follows the WPF model for 3D (as one would expect), I’m curious to see how the new Blend 3 preview will be supporting SL3. Again, given that SL is a WPF subset, seems like a no-brainer. On the other hand, it’s hard to plan going forward when you’re not even sure if Microsoft is going to suddenly veer off into left field.


Bigsby

Member

Member

262 Points

#8 March 23, 2009 12:58 PM

You're just half right. SL is not a subset of WPF. It is a complete separate framework that shares object naming with WPF and the rest of .Net. Whereas WPF uses the complete .Net Framework for its processing rendering and all, SL has to have all this transposed for its framework. Although most of it is supposed to be copy/paste based, security/trust issues raise addicional problems for this separate implementation. Everybody knows (or should know) about the wholes in Flash security and it's a goog thing SL is not going that way.

Again, MS boys are doing a hell of a job!


Plugi...

Member

Member

553 Points

#9 April 21, 2009 4:29 AM

I think I end up with a much easier solution:

weblogs.asp.net/.../silverlight-3-create-a-nice-navigation-flip.aspx


mbroo...

Member

Member

30 Points

#10 May 07, 2009 5:36 AM

Sorry, my mistake! Was under the impression that Silverlights’ original working code was named WPF/E. In fact, of all the sources I've come across thus far, it’s the first time someone has stated that Silverlight is NOT a WPF subset. Your mention of transposing the code to a web friendly platform makes sense however, subset" was Microsoft’s term (see Scott Guthrie’s blog), not mine. Be that as it may, whether binary level “subset” or simply a superficial code syntax “subset”, it’s kind of irrelevant. The CODE is out there and ready to be recompiled into the Silverlight framework giving a more complete implementation of the WPF 3D functionality. Again, take a look at the KIT3D project on Codeplex. Many of the goodies are already there.

  • 1

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities