Mac OSX Slideshow Screensaver

smackbadger

New member
If you've never seen the built-in slideshow screensaver in OSX, you're missing out on a simple, yet elegant piece of eye-candy. I've been searching for a clone of it for the PC for a while now and I'm pretty sure it doesn't exist.

Basically, it displays a picture and slowly pans and zooms in/out of the picture, then smoothly cross-fades into the next picture keeping the motion constant and fluid. There's a quick demo of how to use it here, but it doesn't really do it justice. It's incredible how much better this is than the standard slide-show wipes.

This seems like a trivial exercise for anyone with D3D or OpenGL experience, but unfortunately I have neither :(

Anybody out there want to code this? Please :)

If not, how long (ballpark) would it take me to learn how to code something like this? I have some C/C++ experience, but it's been a while since I've put any of it to use. Are there any freeware compilers available that can handle D3D/OpenGL, or will I have to shell out some cash?

Thanks for any help!

-Smackbadger
 
My cousin's husband showed this to me on his new iBook recently with a bunch of photos I took of their wedding last summer. It is so simple and elegant, yet looks really cool (typical of Apple). Kind of that Cheers opening-credits look. I didn't have much time to reverse engineer this screensaver, but it seemed to me that it was basically always zooming in to the center of the photo or out from there and then cross fading to the next one. In rare cases, you'd be zooming in on someone's foot or some other boring part of the image, but most of the time it looked just awesome---exactly the way you would want to zoom in on the action. They were either using texture compression or had done a poor job of downsampling the images read from disk, as I could see kind of nasty bilinear artifacts. Or maybe it was the ratiometric expansion on the LCD. Anyway...

As for implementing this yourself, you could start with the screensaver code found in the DX8.1 SDK and use D3DX to load in a directory of jpgs or whatever off of disk. There are Win32 entrypoints for getting a list of files in a particular directory. You could have D3DX pull them into 1024x1024 (or bigger) textures and deal with the downsampling (D3DX has some options for better sampling than a box filter). Not sure if you want to mip-map them as you're probably going to be magnifying all the time. You're probably not going to want to create a texture for each file you find in the user-specified directory as that could potentially be unbounded. Instead, you should load up some set of n textures at screensaver-startup to act as a cache and then load in a new one from disk everytime you're done using one (i.e. right after a crossfade). Just load the bits right over the bits from the texture you just stopped drawing with and keep going. Don't delete and re-create textures when you swap a new image into your cache. For drawing, all you need is a screen-sized quad drawn with verts using the XYZRHW FVF bit. For the zooming and panning, I'd just scroll the texture coordinates of the quad every frame (either with the texture matrix or by uploading the four changed verts each frame) rather than messing with the vertex positions. What algorithm you choose to scroll/zoom the subregion of the texture that is being displayed will be most of the fun. I think that SDK sample is multi-monitor-savvy as well, which is another interesting wrinkle. Let us know if you come up with anything.

-Jason
 
Progress... and possible OGL Implementation pointers?

Progress... and possible OGL Implementation pointers?

smackbadger....
Any progress on this? I too was looking for something similar for pc platform (preferably on linux), as do many other co-workers. If not, any pointers as to how to implement this using OpenGL?

thx
Tibsss
 
Last edited:
Back
Top