HitchHiker – A dynamic thumbnail UI control for 3dsMax

Oct 24, 2008 by     2 Comments    Posted under: 3dsMax, DotNet, User Controls

HitchHiker is a custom UI control written in VB.net. It could be happily used in a windows forms project, but specifically I am writing all my stuff with the intention of integrating them into my animation workflow in 3dsMax.

Hitchhiker is a dynamic rollout creator – it has one method – populate(path) and it searches the location for a particular filetype. Depending on the display method, it will then dynamically cache thumbnails of many image filetypes and 3dsmax thumbnails and display them as a button within the control. The button has a custom event attached to it, and passes the file location so that you can do with it as you wish. However, you can also drag and drop from it into max should you wish.

Image Limitations in Windows

If you’ve ever done any windows programming, you will be aware of the native image filetypes that windows recognizes. The most notable omission is TARGA, a much used format in the 3d industry. Hitchhiker employs a custom image library to bridge the gap and provide access to many image filetypes.

these include BMP,TIF,PNG,ICO,PSD,JPG, and TGA. however, it is not just limited to image files. it will also search for .max, .wav, .avi and .xml. This makes it extremely flexible and could be used in just about any situation.

Why is this useful?

I hate building UI’s. Funny i guess considering i’m mostly programming UI controls but that’s the point. If i can put something on a maxscript rollout that handles all of the code generation of file handling, it means I can build a script quickly. Hitchhiker has multiple properties to control how the buttons appear in the control. Here’s a few examples. – click the image to see it full size.

Flatbot is a utility that allow me to take a folder of images and generate plane geometry, opacity mapped for a recent production. It’s a simple idea but it really saves time on setup.

Hitchhiker is on the left in ImageText display mode. You can also see that it rescales the thumbnail and keeps the aspect ratio correct. There is another custom class in this utility. The transparent picturebox control is an inherited user control, it simply paints the photoshop-esque checkerboard background for viewing images.

I wanted to be able to easily display the alpha channel of a Targa, but was frustrated on how to do it. I was able to build a method into HitchHiker that converts the targa into a temporary PNG and passes this to the custom picturebox control. This way, it displays the alpha correctly. This conversion is swift, and displays almost immediately.

You can probably see with this control you could build a CG asset browser in about 10 minutes.

other uses are : a sound loading utility –

Above, HitchHiker is in IconText display mode. All formats have a custom icon that will display if you don’t want image thumbnails.

When specifying avi as a search type, it will extract the first frame and do a GDI+ overlay of the icon type in the corner so you know it is a video file. –

HitchHiker also has a tooltip that displays after a moment on the selected button. (This can be disabled) Depending on the filetype, it will extract information pertaining to that format.

Future Plans

i’m most excited about integrating HitchHiker into a character pose system. Storing the poses in XML format for a character, it allows you to dynamically retrieve facial expressions, lipsync, rig poses, anything!

In the XML search function i have a routine that checks for a custom image. if you store a snapshot image titled the same name as the XML file, it will use this as an image on the button.

I’m hoping to release a free version of this control with reduced functionality soon.

thanks for reading!

404