home about gallery publications education links contact

..::feedback effect::..

This type of feedback effect was quite prominent throughout the mid 1970’s, and has recently raised its ugly head again in the past few years. It has been used to great effect in some music videos (such as the Chemical Brothers), but has also been widely used in those god-awful cheesy compilation D.I.S.C.O. CD’s that are advertised during mid-afternoon TV, between “get out of debt by getting in to more debt with us” and “you’re going to die soon, but you’ve still got to get upstairs” adverts.

The problem with most renderers is that as soon as a single frame has completed, the buffer is flushed and the next frame starts afresh on a blank screen. Even if there are very few objects in the scene and the background is totally blank, the previous frame is totally overwritten, so we have to determine how to keep the last frame on the screen at all time. Therefore, when the next frame starts, it will render on top of the last frame, therefore generating the trail effect. So, the main problems is how to get around the frame buffer being cleared.

As we cannot prevent the renderer from clearing the last frame, we will have to automate a process to automatically save out the frame and load back in as a background image for the next frame. The problem is how. The solution is not all that difficult with a bit of logical thinking: once the frame has rendered, save it out. Okay, no problem. We can actually do this two ways – one using the standard Render Output in the Render panel, or we can use the File Output render effect. We are going to use this effect as we can simply render out straight away to an AVI at the end of out animation without having to compile the final frames back together.

So, with the render effect added, we can just render out the sequence? Well, no. We first have to create a template of the sequence. The reason for this is that, even with a render effect, a sequence on images is still being produced. We cannot render the frame, save it out to an AVI then load it back in automatically for the next frame as the AVI will not have been fully encoded. We are going to have to use an image sequence. For this, a blank sequence needs to be created of, well, nothing. Just render out 100 frames of nothing, then load this sequence back into the Material Editor as an IFL sequence. As we need the last frame to be on the background (e.g: frame 9 to be displayed on frame 10’s background), we can set the Start Frame of the imported sequence to start at frame 1. We can then simply render off our animation and hey presto, there is out feedback effect.

The reason this works is because of the way an animation sequence is called within 3ds max – it is compiled together and called via an IFL sequence, which is purely just a text file. Therefore, this text file does not care what the image looks like or when it was created, just that the frame exists. We generated the IFL automatically when we loaded in the blank background animation, and when each frame is subsequently rendered, that frame’s file is overwritten in the IFL sequence. The frame is called back in as a background image (due to the IFL sequence being offset by 1 frame) and the new frame rendered over the top. And so on until the end of the sequence!

It should be noted that you should render out to an un-compressed filetype, such as a TIFF, otherwise you will receive compression artifacts which will build up and build up on the earlier feedback “impressions” as these will have been the longest in frame.

The result is an effective method to create some really easy trail effects without having to resort to a shedload of particles or polygons in the scene.

Enlarge Screenshot
Load in the feedback_start.max file included in the resources zip file. In the Front Viewport, create a Particle Flow system, set the Length and Width to 10 and set the Viewport Quantity Multiplier to 100 so that we can see all of the particles in the Viewport.
Enlarge Screenshot
Press 6 or click on the Particle View button to open up Particle View. Select the Birth operator and amend the Emit Stop and Amount to 100. Select the Speed operator and set the Speed to 500 and enable Reverse to get the particles to travel in the opposite direction to the system’s icon arrow. Set the Divergence to 30.
Enlarge Screenshot
Replace the existing Shape operator with a Shape Instance operator. Click on the None button and select the Red object in the scene. Enable the Separate Particles for Object and Children. Add a Spin operator, set the Spin Rate to 300 with 100 Variation. Add a Scale operator and change the Type to Relative First. Set the Scale Factor to 10 for all axis, go to frame 100 and enable Auto Key. Set the Scale Factor back to 100 and turn off Auto Key. Set the Animation Offset Keying to Event Duration.
Enlarge Screenshot
Turn off the particle system. Open the Render Effects panel and add a File Output event. Select a file sequence (eg TIFF, NOT an animation sequence eg AVI) to output to and render off the entire animation so there is nothing in the frame, just black.
Enlarge Screenshot
Re-enable the particle system. Open up the Environment panel and add a Bitmap map to its Environment Map slot. Select the first frame of the animation sequence you have rendered out and check on Sequence. Click on Open to open the IFL file generator and OK the next panel to save out the IFL file.
Enlarge Screenshot
Instance copy the IFL map from the Environment panel to an empty slot in the Material Editor. At the bottom of the resulting Bitmap map, expand the Time rollout and set the Start Frame to 1. Set the End Condition to Hold so that the sequence does not loop, should you wish to re-render the animation out, else we will have the last frame of the sequence displayed at frame 0. Either that or render off your final animation from frame 1 onwards and forget about frame 0! Output the final animation as per usual via the Render Panel.
Enlarge Screenshot
A feedback effect can create some really interesting trail effects. Tonight Matthew, I’m going to be…
Download the max file!
Zip file to accompany.


Try fading out the trails by adding an additional render effect or two before the file output effect. However, this will result in the final outputted frame via the render window being darkened aswell. Therefore, add another file output before the darkening effect to output the final rendered frame, then have the darkener (say, a Brightness / Contrast effect) and finally file output to output the darkened feedback effect.

Some really cool frozen motion blur effects can be created using this technique. Using Object Motion Blur is best as the blur samples will intermingle a lot nicer. Image Motion Blur will cause the background and rendered geometry to smear together which may result in a smeared mess!

Try using this effect with a character and moving camera. Some exceptionally strange abstract shapes can be generated very easily. Also, just for added effect, try animating the field of vision of the camera for added weirdness. Just ensure that you have adequate space visible on the background so the trail effect can be seen.

Try amending the trail so that it fades out gradually to create a nice stylized motion blur effect. This will produce a “motion blurring” effect that will have a leading edge to it unlike any of the other motion blur techniques available to us. This could be produced by saving the image out as before, but loading it back onto a 75% opaque plane that is Screen mapped. Therefore, the first copy of the frozen object in the trail will be reduced in opacity but 75%, then 75% more, then 75% more and so on. For single objects, don't forget that you can always use particles to create trails, although for deforming meshes such as characters this would not be suitable.

Initially published: 3D World magazine, Issue 48, February 2004.

Copyright Pete Draper, February 2004. Reproduction without permission prohibited.