Posts

  • Don’t forget to pass the Input brush to the Shader

    When writing ShaderEffects for WPF, it is always tempting to first test the shader with images. Testing with images instinctively seems easy but there are some caveats to remember. When the ShaderEffect is applied to an Image, the texture information is directly pushed to the sampler register s0. So there is no need to setup a DependencyProperty of type Brush using ShaderEffect.RegisterPixelShaderSamplerProperty(). You would do this with the following code:

    Continue reading...

  • WarpEffect source code posted on FluidKit

    In my previous post I described a pixel shader technique for distorting images and 2D textures. The source for this effect is now available on the FluidKit project. If there is enough interest I can do a quick tutorial on how the effect was created.
  • Warp Effect using pure Pixel Shaders

    I am totally blown away by the possibilities of Pixel Shaders and already finding a great variety of uses for it. To get started on Pixel Shaders I would recommend stopping by Greg Schecter’s blog and reading his series of articles on this subject. It was definitely a starting point for me.

    Continue reading...

  • File encodings matter when writing Pixel Shaders

    HLSL is the defacto language that you will be using when writing Pixel Shaders for WPF. But before you can use it, you will have to compile the HLSL to pixel shader byte code. The DirectX SDK ships with the FXC compiler that can do this job for you. However this compiler is very sensitive about the file encoding that is used for your HLSL code.

    Continue reading...

  • Working on a Book !

    Hello everyone!

    Over the past couple of weeks I have been really really busy. In addition to my day job I have taken up an interesting side project: Writing a Book. Given my history and background you can take a pretty good guess at the topic of the book. There is some wonderful content in there and I am sure it will be very useful to many of the readers of this blog. It’s about this great technology with a three letter acronym ;-) The chapters are geared towards intermediate and advanced users of the technology, although beginners will also find it pretty useful. I will have more details to share in the coming weeks. If you have been a regular reader, you have already seen a preview of the book content in the form of blog posts, code samples, videos, etc. Of course that is only a tip of the iceberg.

    Continue reading...

  • Use the SWFLoader for loading Flash swf into Flex

    It was a welcome change to do a little bit of Flash/Flex programming after a heavy dose of WPF ;-).

    Continue reading...

  • Mesh Morphing in WPF

    Morphing of 3D meshes can be very cool to play with. I am sure many of you must have seen this in action in movies / tv or even CAD like programs. Its a technique where a set of vertices that describe a 3D mesh change their positions over a period of time into a new surface. In the figure below you can see a Plane mesh morphing into a Sphere. The interesting thing to note here is that only the vertices are changing their positions while keeping the TriangleIndices and TextureCoordinates the same. In some cases you may also want to change the Normals if you have specific lighting requirements. Otherwise you are in good shape just manipulating mesh positions.

    Continue reading...

  • A Carousel View for ElementFlow

    The Carousel view has become a pretty popular visualization for a list of items. It consists of a set of items arranged circularly with the selected item brought to the front, just the like the figure below:

    image

    Continue reading...

  • Announcing the next revision of ElementFlow

    Over the past couple of days I finally got a chance to get back to ElementFlow and give it some overhaul. I have done some integral changes to the core parts of the control so now its leaner and more powerful. There are also a few client-facing changes. Thanks to all the users of FluidKit who sent me feedback via CodePlex + emails + blog. I also want to give a shout out to Jeremiah Morrill for giving me ideas about new features through his blog post !

    Continue reading...

  • Video of the simple 3D engine in WPF

    In my previous post I mentioned about a really simple 3D engine that can be used for experimenting with lines, polygons and shapes in the 3D space. Here is a short video that shows what you can do with it. The video demonstrates: Drawing lines in 3D (note the XYZ axis) Drawing arbitrary polygons (different surfaces: Cone, Sphere, Torus, Cylinder, Cube) Rotating camera (using mouse) Adjusting focal length (using bottom Slider).

    Continue reading...

  • A scaled down 3D engine in WPF

    Over the last few days I have been exploring some interesting ideas in my current project. One of the requirements was to visualize some data in 3D. Of course you would say: “that should be easy: WPF has Viewport3D”. And certainly you are right. In fact that was my initial reaction too. When I got down to building some of the visualizations I soon realized some inherent deficiencies: I cannot draw lines, simple shapes and in general cannot build wireframes.

    Continue reading...

  • Slides + Demos from NYC .Net User Group talk

    Yesterday, May 15th I gave a talk at the New York City’s .Net User Group. As you can expect my talk was around WPF and in fact very similar to the one I gave at the NJ .Net UG. Since I did not change much in my presentation, let me point to my earlier blog post where you can download the slides and demos. Jump to earlier post
  • .Net 3.5 SP1 Beta breaks ElementFlow

    Installing .Net 3.5 SP1 Beta is not recommended if you are using the current version of ElementFlow. When you add items at runtime, the corresponding 3D planes don’t show up. However when I check the Children collection, the models do exist. Looks like there are some issues adding GeometryModel3D to Model3DGroup at runtime. Surprisingly there are no exceptions thrown when I add the elements. I see the following exception only on closing the application.

    Continue reading...

  • TransitionContainer added to FluidKit

    transitioncontainer

    TransitionContainer was a control I created sometime back to enable rich transitions between views. The transitions themselves are pluggable and can be changed dynamically. You can see this in action in the video below.

    Continue reading...

  • CLinq for visualizing streaming data

    My colleague Kevin Hoffman has been working on an interesting project called CLinq or Continuous Linq. It is open-source and hosted on Codeplex. In Kevin’s own words

    Continue reading...

  • Off to a vacation, returning on May 5th

    Hello folks, I am going on a vacation from tomorrow and will be returning on May 5th. So I guess there would be some silence on this blog, but I’ll try to catch up on emails if I get a good connection. Once I get back I plan to release a new set of Controls for FluidKit. You may have already seen some these from my earlier blog posts [hint]. All that and more when I come back.

    Continue reading...

  • Notes from the talk at NJ .Net UG

    I had a fun time yesterday presenting WPF to the NJ .Net User Group. The audience was a mix of people who had WPF experience, beginners, Interaction Designers and some of them coming from very different backgrounds like Linux administrator, VB6 programmer! It was great chatting with some of them after the talk.

    Continue reading...

  • Presenting at the NJ .Net User Group

    I am going to give a talk on WPF at the NJ .Net Users Group on April 10th. If you are around that area do come along for an evening of WPF. My talk will be around Visual Trees, ElementFlow, FluidKit, UI patterns and other interesting tidbits.

    Continue reading...

  • Automatic form layouts with the TreeView

    Over the past couple of days I have been working on an application that automatically generates a Form layout from an XML file. The XML file represents a form with a bunch of parameters. The form can also contain parameter groups, which can encapsulate a set of parameters. Effectively the XML structure is something like this:

    xml-structure

    Continue reading...

  • My first shot at Wordpress themes

    I am sure I am not the only one who would say that Wordpress is a great blogging (+ CMS) platform. There is a vibrant community developing all kinds of stuff with Plugins, Themes and what not! As a fun exercise I decided to create a Wordpress theme for learning more about the platform.

    Continue reading...

  • First community contribution to FluidKit

    I am pretty happy to see the great community interest in the FluidKit project. Even happier is the fact that we have our first contribution from Boris Tschirner (I guess from Germany). Boris is a designer who contributed two classes that draw some nifty shapes, namely the CogWheelShape and the PolygonShape. These classes have some interesting DependencyProperties which can be used for creating neat looking figures.

    Continue reading...

  • ElementFlow added to FluidKit

    I am glad to announce that the ElementFlow control has been added to the FluidKit library. This has been a popular request for quite some time now. If you are unfamiliar with ElementFlow please have a look at these posts: ( Part 1, Part 2 ).

    image

    Continue reading...

  • My talk at NYC .Net UG is rescheduled to May 15th

    Just got an email from Andrew (who runs the NYC .Net UG) that my talk has to be rescheduled due to some overlap. Instead of March 20th my talk has been moved to May 15th 2008. Here is the updated link: http://www.nycdotnetdev.com/EventDetail.aspx?f=list&event=5/15/2008 It does give me sometime to improve the content of my talk !
  • Introducing FluidKit - A WPF Library of Controls, Helpers and the likes...

    Over the past couple of months I have developed a bunch of custom controls and utility classes, which people have found useful. However all of these were released independently, had differing namespaces and lacked a common point of download. Well, not anymore !

    image

    Continue reading...

  • Talking at the NYC .Net Users Group

    On March 20th 2008, I will be giving a WPF related talk at the New York’s .Net Users Group. The session is titled “WPF Beyond the Basics: Playing tricks with the Visual Tree”. If you are around that area do come along. For more information go to this link: http://www.nycdotnetdev.com/EventMain.aspx?type=N A map of the directions is below: Hope to see you there !