March 2006 - Posts

3D modeling is one of the most exciting parts of Windows Presentation Foundation but there is a lot of uncertainty about how it will be used in real applications. 3D is a very powerful tool at the disposal of WPF developers, but 3D by itself cannot address all of an application's UI requirements. 3D is one tool within WPF that can be leveraged to compliment the overal user interface of a solution.

When I've talked to peers about the use of WPF 3D in Windows applications, we've focused on determining what types of applications could benefit from making 3D the focal point of the application. While this might be the most obvious way to think about using WPF 3D, it's not the most realistic. For applications that require heavy use of 3D or where 3D modeling is the focal point of the work being done, Microsoft DirectX might be a better choice for a development technology.

WPF 3D is great for complimenting user interfaces. There are two great demos out there right now that use 3D in WPF (The North Face and iBloks). While both of these applications rely on WPF 3D to solve UI challenges, they do not rely on WPF 3D to be the focal point of their user interface.

Consider using WPF 3D for:

  • User Controls - Robert Hogue's carousel control is a great example. While his app presents the carousel on a large scale, it could be easily scaled down and used in a small task area in an application.
  • Animation Effects - use 3D animation to scale, rotate, and move objects within the application in response to user actions or other events. Animation can be used to draw attention to a UI element, transition an element's focus to a new state, or as a metaphor. Animation can also be accomplished with 2D graphics - so don't go overboard with 3D just because you need some element of animation.
  • Inspection of real objects - The North Face demo plainly demonstrates this idea. A model of a real object (e.g. a manufactured product) can be created and placed within a viewing area of the application for a user to examine and manipulate (e.g. use of a trackball).
  • Eye-catching multimedia and layouts - this is especially evident in retail and marketing-related scenarios where a goal is to captivate the user and draw them in to explore data within an application. Video on animated 3D surfaces and layering/angling windows are popular examples.

I commonly develop systems for users where they maintain data, perform steps in a process, approve steps in a workflow, run reports, and do other business-related tasks. I don't believe that WPF 3D should really be used to accomplish those types of tasks in a desktop UI directly. However, WPF 3D may be used to compliment the user interface that is used to perform those tasks and make the application experience more enjoyable to the user.

with no comments
Filed under:

Download WPF3DIntroSolution-FebWinFXCTP.zip (2.1 MB)

This solution contains example projects that demonstrate basic 3D construction principles in Windows Presentation Foundation. The projects include:

  1. WPF3DIntro.SimpleCube - demonstrates at its simplest level how to create a 3D mesh in code and display it in a Viewport3D with a camera. Also demonstrates how to load a mesh from an external XAML file.
  2. WPF3DIntro.Transforms - demonstrates how to scale, rotate, and translate 3D objects within a model. Shows single transforms, transform groups, and applying cumulative transforms.
  3. WPF3DIntro.CompositeModel - shows how 3D objects can be grouped and how a group can be manipulated independently of other groups.
  4. WPF3DIntro.Trackball3D - demonstrates the use of a Trackball component that allows the user to rotate around, zoom in/out, and pan back and forth around a scene.
  5. WPF3DIntro.HitTesting - shows how a 3D model can respond to mouse clicks. Uses a stock quote web service (internet connection required).
  6. WPF3DIntro.TrackballWithAnimation - example of applying animation to objects within a 3D scene and at the same time using a trackball to change the view of the scene in real time.
  7. Cube Grid - more complex animation. Builds a matrix of simple cubes and applies a rotate and translate transform to each one. The entire matrix is grouped, then a rotation transform is applied to the entire group.
with no comments
Filed under:

In my exploration of Windows Presentation Foundation (WPF), I've spent time looking for ways that WPF's 2D and 3D graphics capabilities can be used to create effective and visually-captivating user interfaces.  I've downloaded quite a few sample WPF applications and have experimented with Microsoft's Expression Interactive Designer in the past few months and have seen many examples that show off WPF's 2D and 3D features.  Most of the time, the demos, samples, and tutorials I come across are overrun with the "richness" that WPF allows. Curved edges, gradient backgrounds and surfaces, over-the-top color schemes, complex styling of simple boxed containers... the list goes on.

WPF is a major new change in Windows user interfaces. With the abundance of "over-rich" examples that are surfacing as WPF emerges into mainstream Windows development, will we see hundreds of horrid user interfaces developed by newcomers to the technology once the final bits are released? Will one developer use their own sleek blue color scheme with shiny textures and eye-grabbing animations while another company forces their brand into their app with their company color scheme and images?

Luckily, Microsoft has written a set of Windows Vista User Experience Guidelines. These guidelines cover everything from the differences between Windows XP's and Windows Vista's look-and-feel to what wording you should use in wizard controls. They discuss common-sense topics like building user interfaces that are consistent with Vista's UI conventions, but there are other good details in there too about navigation, grammar, and form layouts. Some conventions that we're familiar with in Windows9x/ME/2000/XP have changed a bit, and if you've played with the new Windows Vista operating system you've already seen those changes (e.g. new dialog boxes). All of these changes are covered in the guidelines.

While you're experimenting with WPF, go crazy with its visual capabilities so that you can gain some experience and become familiar with what is possible. Just make sure to reign yourself back in once you start creating user interfaces that will be unleashed in the real world.

Filed under:

Welcome to my blog. My name is Mike Hodnick and I'm a consultant at Inetium, Inc. In this blog I aim to focus on exciting technologies and the challenges that I encounter at Inetium. I work with a variety of Microsoft technologies at Inetium, but my main technical interests include Windows Presentation Foundation (WPF), web development with ASP .Net, CSS, and agile development processes.

Before Inetium, I graduated from the University of Minnesota Duluth with a degree in Industrial Engineering. I've held a variety of jobs over the years, including Industrial and Manufacturing Engineer positions at UPS and Honeywell. I held consulting and .Net development positions at Alto and Nextel Partners before landing at Inetium in 2004.

Outside of work I enjoy home recording, songwriting, camping, hiking, and hockey (I'm an avid Minnesota Wild fan and season ticket holder). My wife and I have a beautiful 7-month old daughter named Eva.