Rendering Text In The Style Of The Star Wars Opening Credits Using Direct2D with Direct3D interop

SciFiText ScreenShot

(Click the image for a larger view) 

This is a fun little sample I created. I based it off of a Hands On Lab that was presented at PDC. If you remember two spinning cubes, one rotating around the other, that's the one. My version is very similar. The main differences are:

  • removed code related to cubes, geometry, or bitmaps

  • modified the matrices and vectors (The "eye" in the scene is slightly above the xz-plane and it is looking towards positve-z and slightly down. The text is in a surface parallel to the xz-plane but slightly below it, sliding off towards infinite in the z direction.)

  • changed the color of the text to yellow

  • changed the text being displayed

  • changed the filtering mode from linear to anisotropic (it looked choppy with linear interpolation)

The zip file contains the source code for this project. Compilation tips:

  • You will need the PDC version of the Windows SDK and the DirectX August 2008 SDK.

  • Your include path must have the header directories from each

  • Your executable path must include the DirectX utility path in order to compile the HLSL code.

  • Find the Star Wars theme music on Youtube and play it in the background when you run the app for the first time. 🙂

I hope this post has piqued your interest in Direct2D. In future posts I will further refine the sample, so stay tuned.

Comments (3)

  1. shevvy says:

    Cool sample!

    It would be great if you could upload a video of the sample for people too lazy to compile.

  2. Tom_Mulcahy says:

    Glad you liked it. I’ll try to include a video with my next post.

  3. Zemblanity says:

    (click image for larger view) ( video from Tom’s Blog ) In my previous post I demonstrated rendering

Skip to main content