Posted By: The Channel 9 Team | Jan 4th, 2005 @ 6:52 PM | 314,546 Views | 71 Comments
Daniel is a software design engineer on the Avalon team and he's responsible for the 3D features of Avalon.

Here he gives us a demo of Avalon 3D. Really cool stuff. Originally designed to only run on the next version of Windows, code-named Longhorn, Avalon is now supported on Windows XP and Windows Server 2003. In fact, the demo here is done on XP.

For more information on Avalon, see the MSDN Longhorn Developer Center.
Tag: WPF
Media Downloads:
Rating:
0
0
Minh - You can parse xml directly to an object graph with Parser.LoadXml.  Alternatively Xaml can be compiled into a pre-parsed binary form called Baml.  The default behavior in VS.NET is to compile to Baml and then embbed the Baml as a resource into your .exe.

We did experiment with compiling Xaml directly to IL, but it turned out that the perf difference between Baml and IL were negligible and Baml has the advantage of being more compact and able to be consumed asynchronously.
dmarsh
dmarsh
Knee draggin'
Minh wrote:
Another question: Is there a XAML parser that consumes XAML source & execute statements on the fly, or is there a XAML compiler that converts XAML source to a .NET assembly? If the latter, couldn't you use reflection to check for the "Camera" property, so you wouldn't have to specify <Viewport3D.Camera> ? But perhaps the syntax is there for consistency & simplicity.

Have a look at System.Windows.Serialization.Parser. It parses XAML or BAML (binary XAML) on the fly and turns it into an in-memory object graph (and vice versa).

As for using reflection to find the Camera property how would they know to look for a property named "Camera" if you didn't specify it???

HTH,
Drew
danlehen wrote:
On one hand, we want to be open and transparent with developers about the exciting new things in Avalon.  On the other, windows Forms is a great platform for writing client apps with a long life ahead of it. 


Sorry if this question is well documented somewhere.  Is there a migration plan from Windows Forms to Avalon for those of us that want it?  i.e. Is there someway we can add say an Avalon 3D ViewPort to an existing Winforms app?  I would love to be able to replace my flowchart control with a nicely rendered Avalon 3D version later on.
dmarsh
dmarsh
Knee draggin'
Rossj wrote:
Sorry if this question is well documented somewhere.  Is there a migration plan from Windows Forms to Avalon for those of us that want it?  i.e. Is there someway we can add say an Avalon 3D ViewPort to an existing Winforms app?  I would love to be able to replace my flowchart control with a nicely rendered Avalon 3D version later on.

Yes, you can cross host. Avalon content can be hosted in WinForms (via ElementHost), GDI+ content can be hosted in Avalon (via HwndVisual), a windows form control can be hosted in Avalon (via WindowsFormsHost) and any Win32 Window can be hosted in Avalon (via HwndHost). There are performance hits for doing one or the other, but since MS isn't even @ beta with Avalon yet it's hard to know what exactly the cost will be.

Read all about it here.

HTH,
Drew
I've looked at the code in the demo and I'm starting a XAML generator tool. I'll post more in a bit and if anyone wants to help out or some more info, email me at esmith@halomessenger.org.

Of course the tool wont be complete or very useful until I can get my hands on a build of the Avalon SDK, but I can get the basic app done soon.

-Eric
The code looks a lot like Povray (which is nice), but other than that the demos don't look like anything that couldn't have already been done with Direct3D, and it probably hasn't been because there isn't an overwhelming reason to do so. While they demonstrate a few programs that use 3D, the interface the developer uses remains 2D and 3D isn't used anywhere to enhance functionality, and doesn't show how this would increase productivity. But it's a nice intro to Avalon.
Minh
Minh
WOOH! WOOH!
dmarsh wrote:
As for using reflection to find the Camera property how would they know to look for a property named "Camera" if you didn't specify it???


I meant in terms of mapping the <Camera> element to the Camera property of the Viewport3D object instead of using the syntax <Viewport3D.Camera>. I thought the explanation was that the Viewport3D prefix needed to be specified to signifiy Camera being a property of Viewport3D (maybe I got that wrong). I just like the clean-ness of <Viewport3D><Camera><...>. But that's from a total XAML newbie's stand point.
Minh
Minh
WOOH! WOOH!
Halcyon wrote:
The code looks a lot like Povray (which is nice), but other than that the demos don't look like anything that couldn't have already been done with Direct3D, and it probably hasn't been because there isn't an overwhelming reason to do so. While they demonstrate a few programs that use 3D, the interface the developer uses remains 2D and 3D isn't used anywhere to enhance functionality, and doesn't show how this would increase productivity. But it's a nice intro to Avalon.
I think the main benefits to a vectorized interface won't be an eye-popping 3D buttons & menus. But varrying resolution displays will benefit by minimal UI change. Also, the "silkiness" factor is anothing thing I like.
Minh wrote:
I think the main benefits to a vectorized interface won't be an eye-popping 3D buttons & menus.


What will it be?  Let's take a look at advances made with 3D interfaces today:

Microsoft TaskGallery - Project Looking Glass - Browse3D - 3D Navigator

These are interesting, but do not seem to bring any advancements that 2D equivilants cannot compare with.  For example, Browse3D introduces a useful Exposé-like method of looking at the browser history, but it is still represented in a 2D format, like its OS X counterpart.  The concepts for implementing 3D used in these applications do not seem to be gaining popularity or enhance productivity.

Minh wrote:
But varrying resolution displays will benefit by minimal UI change. Also, the "silkiness" factor is anothing thing I like.


That's a nice change, but overall it's evolutionary and not revolutionary.  This will increase the attractiveness of the interface, but will not directly increase productivity.  There is no overwhelming reason to begin writing applications that have a 3D interface.
Microsoft Communities