Posts

  • XAML Exporter for Illustrator using the CS2 COM Type Library

    I guess the title for this blog post answers 90% of what I had to say ;)

    Yes, I have spent the last few days working on using the scripting object model for Illustrator CS2 to export the artwork to WPF/XAML. The code is entirely in C# / .Net 2.0 and uses the Illustrator CS2 COM Type Library. Now you may be wondering why I did one more Illustrator-XAML exporter, when there is already one by Michael Swanson. Couple of reasons:

    Continue reading...

  • An improved water effect

    Sometime back I posted a video of the Water ripple effect created using a 3D Mesh. In that I had only used a height-map to simulate the ripples which ofcourse wasn’t the most convincing Water effect. This time around I have improved it with the some refraction effects happening to the texture. Refraction is the phenomenon where the light rays get bent when they change the medium of propagation; for example a change from air to water. Due to refraction the objects in the new medium appear displaced from their original positions. The amount of displacement is dependent on the Refraction Index of the medium. Water has a refractive index of 1.33. With this improvement the Water effect looks much better and closer to reality!

    Continue reading...

  • Genie Effect, the WPF way

    I have been contemplating for many days about creating the Genie effect that you see in Mac OSX, when you minimize a window. It kind of creates a suction effect like a cloth being sucked into a vacuum cleaner. If you have a Mac, you would know. Unfortunately I don’t have a Mac, well not yet! So what better can I do to fill the void…what about creating the Genie Effect in WPF?

    Continue reading...

  • Auto position a Viewport3D Camera for Full view

    I have been spending a lot of time lately in developing 3D effects and some reusable controls for overlaying 3D effects on 2D controls (a subject of a forthcoming blog post). One of the core requirements is that the position of the PerspectiveCamera should be such that the 3D model is completely visible and has the same bounds as that of the Viewport3D. Now, what do I mean by that? A diagram should elucidate this concept.

    Continue reading...

  • Smooth 3D rotations with Quaternions

    When we talk about 3D rotations in WPF, we immediately think of RotateTransform3D and AxisAngleRotation3D. Animating these rotations is then a matter of changing the Angle property using a DoubleAnimation. When we want to apply a series of rotations on 3D models with smooth transitions to different orientations, specifying the rotations using AxisAngleRotation3D may not give the best possible results. The transitions from one orientation to another may not be smooth or sometimes you may lose a Degree of Freedom (DoF), also called the Gimbal Lock effect.

    Continue reading...

  • 3D models with simple 2D strokes -- awesome!

    I loved watching this video demonstration of a Takeo Igarashi from the University of Tokyo. In the demo he demonstrates a tool that can be used for creating 3D models by simple 2D strokes. More than being an awesome video it is also a fun tool to spend hours just doodling and seeing those doodles turning into great looking 3D models. It is a very easy to use tool and I had to deliberately pull myself away from it to make this blog post ;)

    Continue reading...

  • A great tool for visualizing KeySplines

    WPF provides a keyspline based animation for achieving very realistic effects. Creating an ease-in, ease-out effect is a matter of specifying the right keyspline values. I have always found it difficult to visualize these values and in an attempt to alleviate my pain and misery I have spent many days bugging Google to get me the results I want. At last I have found a tool that seems to work very well. Surprisingly the tool is SVG based, which is very similar in concept to XAML.

    Continue reading...

  • A Water ripple effect using a 3D Mesh

    Particle effects like fire, fog, snow, ripples in water are very captivating. I love the way Max OSX uses these effects to create a great user experience. For example OSX has a nice ripple effect in the background when you add a Dashboard Widget. That effect has been my inspiration for creating something similar in WPF. Fortunately WPF makes it a lot simpler to create effects like that using the 3D API.

    Continue reading...

  • Screens and Transitions - a cool WPF app

    I have been working on a cool new WPF application that is supposed to run on a big Plasma display. It is going to be a non-interactive application that shows some information in the form of screens. A screen is a term we are using to denote a visual representation of some information. Some examples of screens we have include a Statistics screen that shows some numbers in a tabular format, a Photo Album that neatly lays out some photos (say from the last night’s party) and does some cool slideshow effects, etc. Each screen will stay on the display for a certain time after which a transition-animation will be played to switch to a different screen. The application has a plugin architecture, which makes screens as well as transitions, pluggable. A developer could create his own nifty screen, package it into a DLL and drop it into a known location. The application would pick that up the next time it loads.

    Continue reading...

  • DataModel-View-ViewModel pattern

    Dan Crevier has made some great posts on using the DataModel-View-ViewModel pattern, which is the defacto pattern for implementing WPF based applications. I believe that using this pattern will enable a better Designer-Developer workflow, which has been my focus for past few weeks.

    Continue reading...

  • A day of Information Visualization

    After having read a part of the book “Beautiful Evidence” and after having received good feedback about the class, I finally I got to attend Edward Tufte’s course on Presenting Data and Information at the Manhattan Center, NY. It was a day long course starting at 10am and continuing till 4:30pm. I was joined by my co-worker and we went around 9:30am for registration. At the registration desk we were given four of Tufte’s books:

    Continue reading...

  • Recommended practices for WPF Custom Control developers

    I have always found that there isn’t enough documentation about Custom Control development in WPF. Most of the information is segregated into articles, blog entries and posts on the WPF Forums. In order to save the trouble for other fellow WPF developers I intend to document all my findings at one place: this blog. To start with, there are some articles which are a must read for all control developers:

    Continue reading...

  • Slideshow visualization in WPF

    Viewing photographs is always fun. What if there was a cool visualization to view them? Well with WPF, the what-if question should be replaced with when. So here is a little application that takes in a bunch of images and adds some nice slideshow effects. The images that I am using are from Michael Swanson’s blog. Have a look at the video for a sneak preview of the application. The video is a little choppy but the application runs much smoother.

    Continue reading...

  • Great tutorial on TextureCoordinates

    I have been working on the 2D side of WPF for a long time now and its about time I added an extra dimension; 3D. I have worked with 3D before, just that I haven’t done anything substantial. Its time now for me to ramp up. One of the tricky concepts of 3D is to understand how to map textures to 3D geometry. This, according to me is a fundamental concept that needs to be understood very well.

    Continue reading...