Jump to content
Hash, Inc. - Animation:Master

Combining Mutiple Frames in a Sequence.


goodguy20k

Recommended Posts

Ok, Rodney's topic brought up something I've been scratching my head about for a while now. I'm rendering out displacement maps for footprints. The displacement maps render fine, but now come the next step. I need to combine the frames so the footprints "add up".

 

I'll try to say this simple and clearly.

 

So, you have the first frame:

 

----------------

----------------

----------------

 

No footprints.

 

Second frame:

 

----------------

---x------------

----------------

 

First foot print.

 

Third frame:

 

----------------

----------------

----------------

 

Nothing.

 

Forth frame (and so on):

 

----------------

------x---------

----------------

 

 

Now, I need frame 3 to look like:

 

----------------

---x------------

----------------

 

And frame 4 to look like:

 

----------------

---x--x--------

----------------

 

Adding the first foot print to all frames after it, and so on.

 

The method I learned this from used some imaging program that supported scripts and handled it that way. I don't have that program (but do have PhotoShop and Paint Shop Pro). What are my options for doing this? The more automation, the better, as, for my short, I'm going to be looking at LOTS of footprints! (YES, I know I'm looking at horrible render times. :P;) )

 

Thanks!

Link to comment
Share on other sites

  • Replies 17
  • Created
  • Last Reply

Top Posters In This Topic

Try using an animated displacement map for the footprints. It can be as easy as each image in the sequence

showing an additional footprint and use the frame property of the image sequence or movie (whichever you use)

to show the appropriate map at the appropriate time.

 

So.....:

 

(Image sequence example):

 

footprint0.tga -- shows first footprint

footprint1.tga -- shows first and second footprint

footprint2.tga -- shows first, second and third footprint.

footprint(n).tga -- etc. until you have all the prints you need.

 

It is a little overhead work, but it seems like the best way to do it.

All you need is to have the image for left and right foot and copy/paste

in paint shop. If you end up having, say 100 footprints showing in the final

animation at once, then you will need 100 frames of displacement mapping.

 

If you come up with something better, please share it with us. I'd DEFINATELY

like to know the easiest way, myself. :)

Link to comment
Share on other sites

That's the problem. I'm trying to make that animated sequence. I have frame 1 showing the first foot print, and frame 2 showing the second footprint, and ONLY the second footprint. Somehow, I need to combine frame 1 with frame 2 so that the first footprint shows up on frame 2, and all following. :)

Link to comment
Share on other sites

  • Admin
Interesting thought, but still back to the, how do you combine them in the first place? (I mean, I could copy and paste from each frame, but...

 

As others are demonstrating, you have several options available to you.

 

Perhaps one of the easier ways would be just to bring your images in as rotoscopes.

It doesn't matter that the images are horizontal as the image will be the same.

Position the images to taste and render out as a sequence of images.

 

I think I like this method best as you can then adjust the transparency of these rotoscopes to create the animated effect.

You should be able to turn them all transparent at the same time.

Create a model with one patch.

 

Apply a two image sequence to the patch as a patch image (Select the Patch > Right Click > Add Image)

Note: If the image renders in the wrong orientation you'll have to select the patch and rotate it.

 

Drop your models into the Chor from a top view and place them where you want them.

Note: A trick to placing them correctly might be to have your character perform his walk cycle with the ground plane a little high.

The feet protruding through the ground can then easily be seen from the bottom view.

 

Adjust the frame of the patch image to frame 1 for the left foot and frame 2 for the right.

 

If you don't want to do all this foot changing business you could just create two models, one for the left foot and one for the right.

 

If some cases you can just use the protruding feet to create the the animated displacement automagically.

Just keep in mind that the image will be reversed.

 

If your character has distinctive feet this may be the best method as the footprints will then exactly match the character's foot placement.

View frame by frame on foot contact to determine best keyframe/timing for transparency.

 

Depending on the level of detail you need the process can get more complex.

If for instance the toes need to displace the ground first followed by the heel and then ending with the arch you might have to set up 3 distinct maps to capture the effect.

 

Hope this makes sense and points out a few more options.

Link to comment
Share on other sites

I have the footprint frames... No problem there. (I have it rigged up much like you mentioned.) I'll try the rotoscoping... Haven't played with that much. The problem I have is that the frames are all white, except where the foot protrudes. That means no alpha channel. :( I'm worried that if I "unhide" one frame on the next, it will cover the previous. Maybe I could crop the frame? :)

Link to comment
Share on other sites

  • Admin
I'm worried that if I "unhide" one frame on the next, it will cover the previous. Maybe I could crop the frame?

 

That shouldn't be too much of a problem.

You could crop... or apply to a small patch as a decal.

Just take care that the white of the background and the white of the image are the same or you'll get artifacts left over.

You could identify a keycolor (white) as transparency in the image but... the thought of almost guaranteed bad transparency scares me.

 

If that becomes a problem you can create an outline of the foot and extrude outward to create a solid mask of one color.

Or if you have a program like Photoshop/GIMP you could mask it out that way.

 

This demonstrates one of the reasons I'm such a big fan of Alpha Channels in A:M.

The results of the image rendered out of A:M with Alpha Channels are almost always perfecct for compositing.

 

All of this mostly for future reference.

As you are looking to build a displacement map I'd say you are on the right track already.

Link to comment
Share on other sites

Ok, I'm trying, but it's not working... Transparency route, that is. Croping, etc., sounds like what I'm going to have to do... I'll see what I can do with GIMP, and see if I can't provide a nice script for everyone. :)

 

P.S. The reason I require such automation is that I'm talking a LOT of footprints! Like, over 50 per scene, by guestimation. Add that up, and you get a LOT of footprints for the final animation. (Yes, they stay throughout the short. :) ) I think I calculated over 10,000 footprints by the time this is all said and done...

Link to comment
Share on other sites

Just a thought,

 

if you have TGA's and the part yo want transparent really is white, then set the key color on each image in the PWS.

 

The problem with this method over TGA's with transparency is that as it changes from white to black you uget a fringe, which of course is only slightly darker thatn White. There for, you foot prints can not get to close to each other or overlap one another. For this I believe you would need to process the TGA's and replace the White with transparency.

 

Why not render the Foot print TGA's with Alpha?

Link to comment
Share on other sites

Here's the reason alpha doesn't work. (I think. If I'm wrong, I would be SO glad to hear it! :D)

 

I have the camera under the ground mesh, right?

post-10167-1174514866_thumb.jpg

 

That gives me a shot of everything coming through the floor:

post-10167-1174514817_thumb.jpg

post-10167-1174514849_thumb.jpg

 

Problem is, it also sees the floor. The floor blocks it from "seeing" the full alpha, and you get no alpha.

 

Here's the video of the footprints:

walk1.mov

 

And yes, the floor is gray to "avoid" displacement. The feet are too gray in the preview, but render black.

Link to comment
Share on other sites

I've got a couple of ideas that might work. I try and write them up here. Do you have and actual model walking on the top surface?

 

I'm thinking either a transparency gradient or a boolean cutter to remove everything above the Ground and hiding the ground.

 

More later, got to go.

 

Glenn

Link to comment
Share on other sites

Lets see if I can explain my process of using a boolean cutter and a gradient material to create TGA's (or exr's - although I haven't tried) with any thing above 0 on the Y axis clipped and starting at zero (127 grey) to - whatever (black).

 

Create a Gradient Material with:

Global Axis turned on

Start at 0,0,0

End at 0,-deepest,0 (deepest is the y value of the furthest the feet go below the ground plane ( y = 0 )

First Atribute

Abiance Color = 127,127,127

Abiance Intensity = 100%

Second Atribute

Abiance Color = 255,256,255

Abiance Intensity = 100%

 

Modify your foot model as follows:

Apply Material to any portion (or the whole model) that will break the ground plane in the Negative direction.

 

create a cube (8 cp's) with its bottom face at y = 0 and extend up and outwards to fully contain the model.

 

Add a bone below the highest level bone in your rig, attach the 8 cp's of the cube and turn on Boolean cutter for this bone. (Everythin in the Cube will no longer render, only those parts of the model that extend outside of the Cube will be visible in a render.)

 

In the Chor do the following:

 

Turn off (or remove) all Lights, ground plane and anything else, leaving only the camera and the foot model.

 

You may have to adjust the Boolean Cutter Bone in the Chor to maintain the bottom face of the Cube at y = 0

 

I use a Stationary Orthogonal camera with the background set to Black. (the background can be set to any color, it will still render as transparent with the Alpha Buffer turned ON)

 

Render Output with Alpha Buffer ON, to a file type that supports Alpha (Tga, EXR)

Render Option all OFF, choose your quality and Single or MultiPass.

 

All the TGA's (or EXR's) can then be laid ontop of one another and composited into an animated Displacement map. You can put each rendered frame as a Layer in the Chor in front of the Ortho camera and turn the ON one by one to accumulate the trails of foot prints. (seems to be a fringe on the renedered composite using layers - will have to investigate)

 

Let me know what you think

Glenn

Link to comment
Share on other sites

Beautiful method, Glenn! Everything except to the point of rendering out all the frames into a stacked animated displacement map... As you have to drag each frame in one at a time... And then set the activation for each... 8-|

 

But I now have beautiful alpha-ed footprints! Now I just need to put them together. :)

 

(Oh, and I'm having trouble with the gradient a little... It's coming out VERY white, and very little gray. I keep adjusting the start and end values, but not having a whole lot of luck. If you have any more tips with that, I'd love to hear them. :) )

 

Thanks!

walk1.mov

Link to comment
Share on other sites

I agree the building of the animated displacement in A:M could be a little bit tedious. Still brainstorming on that one. Possibly Gimp, but I've not played with scripting in it yet. Cinepaint(Linux) might be another possiblity.

 

Here are my tips on using gradients to create displacement map.

 

1- Only Abiance set in the material at 100%

2- No lights in the scene ( active set to off is fine)

3- set the start and end for the gradient to the extremes of your models movement in world space (set world space on the material)

4- in rendering, turn off everything!! Alpha buffer on. No reflections, no shadows.....

5- Use Orthogonal camera

 

You need to find the highest and lowest point of the displacement object in the animation. Try a cone shape of the same depth (highth), is should come out a smooth ramp from outer edge to center.

 

Glenn

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...