3d animations in Flash
December 13, 2007 1:09 AM   Subscribe

I want to put rendered, animated, anaglyphic 3D in a flash, with flash merging the eye-images at runtime.

I just bought a copy of Poser 7 and a copy of Shade 8 and am going to get back into rendering, having spent a couple of years learning about Flash (CS3) but not really getting very good at it.

Here's what I want to do: Create a short animation (e.g. 30 frames). Render it once for the left eye, producing frame files L01-L30. Then move the camera and render it again, producing right eye frame files R01-R30.

Then read all 60 files as BMPs or PNGs into Flash. They'll be in color. A "left eye" sprite gets created which frame-flips images L01-L30, and a "right eye" sprite gets created which frame-flips images R01-R30.

The two sprites are then displayed simultaneously, with the "left eye" sprite producing only red, and the "right eye" producing green and blue and all three colors being added together to produce a single displayed image, which changes as the two frame-flippers run.

I can do that merge for a single frame using a graphics editor; you can see what it looks like here. I want that in a flash file, with the face animated (e.g. her mouth opening and closing).

So there are two problems. First is creating those frame-flipping sprites. Right now the only way I know to do that is to manually add each successive frame, with four steps: copy keyframe, paste keyframe, right-click the image, and swap object. That puts a new frame in the exact same x/y position as the previous frame. (The other approach is to drag-and-drop the image into the new keyframe, then manually change the X and Y positions to 0.)

Is there any way for me to create a frame-flipping sprite out of multiple rendered images with a single operation? (Which does not include creating an FLV file? DO NOT WANT!) I want, somehow, to say "See this file here? It's the first of 30; I want you to load all 30 into successive frames." Any way to do that?

Second problem: how do you make an object selectively transparent? If the left image is in front, it needs to be opaque in red but fully transparent in blue and green, so that the blue and green from the right eye images merge to form a full RGB. I know how to do that for one individual frame using a graphic editor (as shown on my link above) but doing that for a long sequence of frames is tedious. I want to figure out how to do it in Flash itself, at runtime.

I can, if necessary, batch preprocess all the images so that L01-L30 are red-channel only and R01-R30 are green-and-blue only. But the tools I have (Paint shop Pro 8 and Thumbs Plus 7) don't permit me to batch-merge the files.
posted by Steven C. Den Beste to Computers & Internet (8 answers total) 2 users marked this as a favorite
Is there a particular reason you're rendering separate left and right frames? You'll only be able to use them in matching pairs, so surely it's easier to just render the anaglyph frames directly.

Back in '95 when I was screwing around with 3D rendering in college the program we were using had a native red/blue anaglyph rendering mode, you didn't have to render each "eye" separately.
posted by krisjohn at 2:09 AM on December 13, 2007

You can import numbered frames into a Movie object. in one step.
You could do the merging first, in Photoshop, using automated actions.
posted by signal at 7:30 AM on December 13, 2007

As far as I know Flash doesn't natively support automated masking of imported symbols, whenever I've needed transparency I'd build that into the graphic beforehand. What are the particular requirements that lead you to choose Flash as the medium? It might be easier to help with a more rounded understanding of the project goals, because a lot of this stuff is trivial for a compositing package like AE/FCP
posted by prostyle at 8:06 AM on December 13, 2007

I want to use Flash, because I own it. I don't want to have to buy anything else.

Poser doesn't have a "render to anaglyphic 3D" mode so far as I know.

I also don't own Photoshop.

Tools I do have:

Thumbs Plus 7
JASC Paint Show Pro 8
Poser 7
Flash 9
Shade 8

Signal, I'll check out "movie objects". I just hope it's possible to create one without using FLVs.
posted by Steven C. Den Beste at 8:23 AM on December 13, 2007

When you have a series of images that are named sequentially (i.e. graphic01.jpg, graphic02.jpg, graphic03.jpg, etc.) Just import the first image and Flash will ask if you want to import all of the images as a sequence. It will then place all of the images together on the stage as separate frames in the current timeline. At least, that's how it works on a Mac, if you have a PC it may or may not be different.

Then you'd load your images into two separate movie clips. One will have all of the red frames, the other movie clip will have all of the blue-green frames. Then on the stage just place one movie clip on top of the other (use the align palette to do this easily). Then in the properties tab change the blend mode to "Add" and you should be in business. People will need to have the Flash 8 or later plug in installed in order to see it.

I think this should work, but if you could post a couple of example red-green-blue separated images I could double check it for you.
posted by ssmith at 9:04 AM on December 13, 2007

SSmith, those things worked perfectly. I never noticed the "blend" mode choice on the properties pane before, and every time I'd brought a load of images in I just dragged them en masse into the object pane instead of using "import".

Amazing what you miss when you never look at manuals, isn't it? (Manuals are for wimps.)
posted by Steven C. Den Beste at 12:31 PM on December 13, 2007

Great. Glad I could help. And yeah, "if at first you don't succeed, read the directions." has always been my motto.
posted by ssmith at 2:33 PM on December 13, 2007

Anyone care to see the result? Requires Flash 8 player
posted by Steven C. Den Beste at 2:37 PM on December 13, 2007

« Older Can you be my herb doctor?   |   Good places for me to sell my used cds, books... Newer »
This thread is closed to new comments.