Monday
Apr182005

A different side of Providence

For the last few days, I've been taking the bus around Providence... because my car is in need of major repairs, (a new clutch, apparently) and I still need to get to and from work. Providence is very different on public transportation. Providence feels more like San Francisco, on public transportation. (At least, Providence in April feels like San Francisco in March-October.) There are a whole lot more people who are not affluent white college students. The bus routes go through the center of downtown Providence -- Kennedy Plaza -- yielding some vistas inaccessible from a car: Waterplace Park and the skating rink, a plaza at the head of Westminster street, the river walk down along South Main Street... Mostly there are a whole lot more green places, public places, and art places from the bus than from a car. The public transportation system seems to be actually designed to pull people into downtown and create a feeling of liveness there; it works.

I remember wandering downtown as a freshman some spring afternoon ten years ago. This was before Kennedy Plaza was renovated, before the mall, before the traffic flow changes on Westminster... I ran into Garth, a rock-climbing artist who lived in the Milhaus Co-op with me, and we had a sugary greasy lunch at a dark Chinese restaurant on an alley. I went on to the Arcade, then, probably; the first glassed-covered shopping area in the United States, where people could walk between several stores and restaurants without getting rained or snowed on. Built in the early nineteenth century, I think, it's now cramped between too many boxy office buildings. The voluminous (but not tall) semi-industrial buildings, combined with one-lane major streets, create an urban canyon effect, like New York on a 1:4 scale, and even more claustrophobic. My memory of Providence, from my undergraduate days, boils down to "Providence is a hole."

Today I saw a different Providence; not a hole but a presence, a place, a personality, a life. Kennedy Plaza is now a real plaza where people gather; Waterplace Park and the River Walk extend public urban space from the north to the south end of downtown; the Providence Place Mall creates a reason for surbanites to enter the city.

Providence is not just a waypoint for me between a suburban youth and a west-coast adulthood; Providence is a real place, and I live here.

Friday
Apr152005

Capturing high-quality video with G3D

My collaborators and I put together a sketch submission for SIGGRAPH '05. Along the way we came up with a process that lets us capture high-quality video with G3D, the C++ OpenGL abstraction we're using for CaveWriting. This technique is a vast improvement over the video capture techniques I've used for interactive 3D graphics in the past, because it captures the actual bits on screen and yields a high-frame-rate video with smooth animation.

(Until recently, we did video capture of interactive graphics either with a digital-to-analog scan converter, or by filming the walls of the cave with the head tracker attached to the camera. These techniques yielded low-resolution images with a fair amount of distortion; they did, however, capture real-time interactions. Based on my preliminary research, standard video capture applications will have difficulty with capturing high-frame-rate graphics which rely on extensive hardware acceleration; the technique described below slows down the frame rate, captures each frame, then re-creates interactive frame rates in post.)

The process has several steps:


  1. Set your rendering hardware to do exactly what you want. In particular, do you want to turn on hardware antialiasing? You'll want to go through the whole process with and without hardware antialiasing, to see what gives you better results after your whole encoding & compression process.

  2. After drawing each frame, capture a screengrab using G3D::RenderDevice::screenshot("grabs/"); This will create a series of dated and numbered screenshots in jpeg format in the grabs/ directory. Interact very slowly! Your motions will be speeded up by a large factor (10-300 or so) depending on many things. You'll have to do iterate through this process a few times to get the timings right.
  3. Assemble the screenshots into a video. On the Mac, using QuickTime Pro, do File -> Open Image Sequence, open the directory with all your images in it, import at your desired output frame rate (probably 30 fps), then save as that same frame rate. You can also do this with Graphic Converter, which (unlike QuickTime) doesn't require registering to use this feature, On Windows, Morgan suggsets using VirtualDub. For Linux, Peter Sibley suggets mencode/mplayer
  4. Tune timings; if your animation is based on real time passing, extend the duration of each tween; if your animation is based on simulation time, slow down the passing of simulation time.
  5. Archive, if desired, and clean up the captured images. Frame numbers just keep incrementing with every subsequent call to RenderDevice::screenshot(), so if you don't clean out the grabs directory, you'll be using an awful lot of disk space, and it will be tricky to identify the first frame of each run.
  6. Repeat steps 2-5 until you have the timing you want. In our experience, we captured about a thousand frames at 800x600 at 1-2 fps; the same program running without frame-grabbing ran at >100 fps.
  7. Edit and title. We edited using iMovie 4, which was acceptable but not great.
  8. Add audio.


  9. Export. Video is huge; for SIGGRAPH we had to get our sketch down from 250 mb without audio to under 40 mb with audio. Video compression is an art, and not one that I know well. If you can recommend good video compression settings for captured CG, let me know. We used MPEG-4 compression with medium quality.

A few suggestions:


  • Leave a lot of time for working with video. Video can bring even blazingly fast computers (like our dual CPU 2 gig ram G5) to a crawl.

  • If you're using linux, figure out how to capture to a local temporary directory (/tmp or /ltmp) rather than using the networked file system.
  • You might have to ask for permission in advance to use local storage.

Thursday
Mar312005

don't think of an elephant - or - changing the frame on the schiavo debate

I've been reading Don't Think of an Elephant! Know Your Values and Frame the Debate -- the Essential Guide for Progressives" by George Lakoff. I've been trying to apply Lakoff's theories to the Schiavo case, because I see this dissonance between "don't let poor terri starve to death" and socially conservative fiscal policies: "cut taxes on the rich and cut spending, except for on defense."

The religious conservatives are doing a fantastic job of framing the debate on Schiavo; it's how they're getting away with espousing these "culture of life" policies that are so at odds with their fiscal policies. The religious right has framed the debate as "Activist judges are starving and thirsting poor Terri to death." This frame sets up the opposing position as, "We should let people starve and thirst to death," and, "This woman with a vacant grin in a flower nightgown should die." If we (the progressives) accept the religious conservatives frame on the debate, we sound like heartless villains.

Let's consider another frame for the debate, a frame in which this story began more than twenty years ago, not fourteen. Why did a woman in her twenties have a sudden traumatic loss of oxygen to the brain? Could this have been prevented?

Twenty years ago, a young woman named Theresa struggled with her weight and self-esteem. In high school, she weighted 200 pounds, then quickly lost 50 pounds. This rapid weight loss was a symptom of her bulimia, a sometimes-fatal eating disorder. When she went to college and got married, her health stabilized, but after a few years the eating disorder re-emerged. We don't know, today, whether she was being treated for the eating disorder, or what sort of treatment she was in, but we do know that whatever help she was getting wasn't enough. Like many other people with eating disorders, her compulsive behaviors seriously threatened her health. People with bulimia, by definition, alternate between overeating and restricting food, far beyond the behaviors of a normal dieter, and sometimes beyond the limits of human physiology. In 1990, Theresa's compulsive behaviors had caused such damage to her body that her heart could no longer supply blood to her brain. Much of the cortex of her brain died due to hypoxia; only the central, ancient parts of the brain survived.

An eating disorder caused a massive decline in Schiavo's physical health over the course of several years. The state of the art in treatment of eating disorders calls for a combination of social, behavioral, psychiatric, and physical methods, including frequent monitoring of vital signs. Changes in physiology, such as those that surely presaged Schiavo's injury, are corrected before they become life-threatening. Affordable, available, effective health care would have improved Schiavo's health. I do not know what, if any, treatment Schiavo received for her eating disorder, but I do know this: a large fraction of adolescents and young adults do not have any health insurance, let alone access to comprehensive mental health insurance. The Schiavo case should be an object lesson in the risks we face as a society without guaranteed medical treatment for all who are ill, regardless of their ability to pay.

A few years after Schiavo's injury, her family sued her doctor for malpractice. Their suit was successful, and they were awarded over one million dollars, 70% of which was placed in trust for Schiavo's care. Tort reform, as favored by the president and his party, would cap this amount. What would Schiavo's care have been like without this award? Schiavo's case demonstrates that large awards for medical malpractice are sometimes necessary.

The collapse fourteen years ago damaged huge portions of her brain. Look at this CT scan of Schiavo's brain. Her head is full of fluid where her brain used to be. How different would this debate be if this picture of her destroyed brain was shown every time the flower-nightgown-vacant-grin video was shown?

And finally -- she was born with the name Theresa Schindler. Calling her by the diminutive of her first name, as much of the media has done, enforces the idea that there is a person there, and even connotates a child. The media does not usually refer to full-grown adults with diminutives of their first names.

By allowing the conservatives to frame the debate, by allowing their nomenclature and images to infect all media discussions of the Schiavo situation, the progressives have lost a tremendous opportunity to increase awareness of mental illness, to argue for universal health care, to fight tort reform... and we have let the religious right villainize us again.

How many people with eating disorders are "starving and thirsting themselves to death" in the United States today? How many children go to school hungry because their parents can't afford to feed them? How many communities in Africa lack a safe water supply? The conservatives say the strong should take care of those who cannot take care of themselves. I'm glad Schiavo's heart has finally stopped beating. Now let's see what we can do about the millions of people who lack the kind of care that would have prevented this woman's tragedy.

Wednesday
Mar302005

Potentially disastrous user interface mistakes

Since my mac is getting rebuilt in Cupertino, my iPod is just sitting here with nothing to do. I thought I'd try plugging it in to my pc and see what happens. I have a firewire card for the PC because, way back when I thought things would just work, I asked work to buy a firewire pc/mcia card so I could move large files between my mac and my pc on my handy FireFly 5 gb drive. I quickly learned that plugging the FireFly in to the firewire card on the PC got me bubkiss, even though plugging the FireFly in to the firewire port on the mac did exactly what I expected: it mounted the drive. The problem with my Firefly + firewire card + PC system is that the firewire adapter can't deliver enough power to the drive. Oookay, so I need a firewire drive which has its own power. Voila, le iPod.
Now, I'd heard rumors that you have to either get a mac iPod or a PC iPod. This seemed suspicious -- is the hardware actually different? the firmware? or just the disk format? I'd held off on investigating until tonight. I have just discovered BitTorrent as retroactive VCR, so I have a few gigs of season 6 west wing avi's on my big machine, that I have to get to my small machine. So, this might work: connect iPod to big machine via firewire card. Copy large files onto iPod. Connect iPod to small machine via pc/mcia card. View avi's on small machine, which has better speakers. Or, well, that would have been the plan. Here's where it all went wrong: I plugged in the iPod to the pcmcia firewire card, and... a little tiny dialog box popped up. "F: is unreadable. Reformat?"

...which brings us to the potentially disastrous user interface mistake. The default action for that dialog box is "Yes," meaning, "Yes, please reformat my 30 gb storage device on which I have a few years of music and data stored." I jerked away as from a hot flame! My impulse was to unplug the iPod from the Destroyer of Worlds, but I paused... shut down the Destroyer of Worlds... and then gingerly unplugged my sacred iPod.

I will not... I will not connect my iPod to any pc's ever again. That's just the classic "bad defaults leading to disaster" error... and I won't be bringing my sacred pod into contact with the Destroyer of Worlds again.

Never fear; there are other methods! I have an external USB 2.0 DVD-RW drive, but the big machine doesn't support USB 2, just USB 1. Transferring half a gig at USB1 speeds? no thank you. I will try my backup backup plan, which I'm pretty sure will work... and then I'll be lying in bed falling asleep while catching up on the West Wing episodes I've missed.

Technology is just so much fun. Getting technology to do what I want it to do actually helps me sleep better at night.

Wednesday
Mar302005

best free thing on the web lately: david byrne radio

I heard about this on npr and couldn't believe it -- David Byrne is offering his current playlist as a streaming radio station. Scanning through the current playlist, I see a wide range of artists, including Rufus Wainwright, Paul Simon, Gilberto Gil, and Outkast. And that's just the artists I've heard of...

This just seems like an incredible freebie. Like the celebrity playlists on iTMS, but free. Free, legal, and filtered by a musician I respect -- sweet!

BTW, apocryphal rumor holds that Talking Heads got started in
a dark little house called the Vault, which is literally one block from here.
Maybe I'm having too much fun with google maps, but here's directions from here to the Vault.