Date: Wed, 25 Mar 1998 18:28:04 -0800 From: Matthew j Roddy Subject: Re: [IML] IFW:Shadows on the ... pavement I have a client who would like me to have a 3D object "interact" with his car lot. So I would go out and shoot his lot, and would then like to have my object there amidst the cars. I wouldn't necessarily need any shadowing on the cars themselves, but would like to have a shadow on the ground. I know I've seen this done in Lightwave (I've just seen it, I haven't done it), and was wondering if it could be done with IFW. My small amount of knowledge about Imagine tells me it can't be done, but you all are a lot smarter than I. Any suggestions? THANKS! ---------------------------------- Date: Thu, 26 Mar 1998 10:35:49 EST From: Phil cook MJ Here's one way to create shadows that will fall on you your live action background pavement. Once you've designed your animation, scanline render another animation with the same choreography at 320 X 240 but from the light source's point of view. Turn off all the lights and make the background white. Essentially you've rendered a silhouette of your character from the light source's view. Now you can take this AVI and map it to a simple 2 polygon plane as a transparency map and place this object under your character in your main animation. If you distort this object to a trapezoid, you can mimic the effects of light at an angle. Make sure that the shadow mapped object and the character are in frame by frame sync. Adjusting the mix/morph value of the shadow.AVI controls the density of the shadow. Furthermore, you can take the silhouette animation in Premiere and brighten it for more transparency, add more keystone distortion and defocus it for a soft shadow look. If your live action video sequence is loaded in the Stage Editor's backdrop, the character will be opaque and the shadow will render with transparency. Make wazzu sure the gamma for the render is not set to high in the Preferences otherwise you'll see the edges of your shadow map object. I hope this helps. ---------------------------------- Date: Thu, 26 Mar 1998 11:15:26 +0000 From: Richard Gowland This is some thing I tried with a resonable amount of sucess in extreme 3d. Create a bright white plane and orient your view so that the plane is is oriented in the view in the same way as the pavement is in the photo. Render this against a black background at the same resoulution as the photo. Take this image into a paint package and use it as mask for the a copy of a photo. Take the selection (should be the same area as the plane), and use transformation tools to alter the selection until its four corners are at the corners of the image (so the selection should now fill the frame. Save the resulting image. Return to Imagine, apply the image as a brushmap to the plane (check the orientation of the map), and reduce the brightness level (not to zero). Add your objects and lights etc. to the scene and perform a test render. You may have to alter the brushmaps brightness in a paint package and the attribute of the plane to get the best results. Hope this helps. ---------------------------------- Date: Thu, 26 Mar 1998 10:48:34 EST From: Phil cook Richard Gowland's solution for turning a 2D background image into a 3D plane using Photoshop is very clever. I hadn't thought of that one as a solution to shadows in live action video. Great idea. ---------------------------------- Date: Thu, 26 Mar 1998 11:37:09 -0700 From: jbaker08 The best way That I've found to do this is to set up the camera to mimic your orginal video footage, then set up a flat plane and color it true blue (0,0,255). The plane will stand in for the ground, make the background blue also. You will have to render it twice, once for the shadows and once for the object. when you render the shadows you must color your object blue, so it wont be visible, then render it again with the object at its original color and texture with no shadows . Then you composite the scene together in Adobe Premeire or other video editor with a blue screen option. Rendering the shadows seperately allows you to make the shadows transparent and soft. When you do it right it looks amazing, you can also use stand in objects for walls or cars or whatever, just color them blue and let them recieve shadows. I hope this makes sense, and that it helps. ---------------------------------- Date: Thu, 26 Mar 1998 13:47:21 +0400 From: Charles Blaquiere My first solution, below, is suitable for an animation where things may move (including the camera), but the car may not change alignment. (It can move in a straight line, though) A variation, explained later, would give lower-quality shadows but allow the car to rotate. Here's how I would do it: create a duplicate of the scene, deleting all objects but the car, which should be made black. In Stage, pick View / Stage Settings / Lightsource view, and select your "sun" light. The Perspective view will show the scene as seen from the sun's angle. Zoom in with the Perspective window controls, until the car is as large as possible. (It helps if your original scene was composed so that the sun is aiming right at the car, easily done by a one-time Track To alignment bar on frame 1 only) You should plunk down a fully-filtered ground under the car; though invisible in renders, its edge structure will be seen in the Perspective window (in Pers. Edit mode). This will help you figure out how many Imagine units are covered by the field of view; the information will come in handy later. Remove the gridded ground and quickrender this image, at a resolution relative to the size of the car in your actual image, for example 320x200 if the car is less than half the screen width and height. The higher the resolution, the better-defined the shadow will be. Jot down the position and alignment of the sun. Back in your original scene, add a horizontal plane, floating fractions of a unit above the ground. (When creating this plane in Detail, it helps to have a Stage Snapshot of key objects, like the ground and car, to bring into Detail as guides) The plane should be black, with Filter set to maximum. Add your shadow brushmap, in Filter mode, and transform its axes, plugging in the position and alignment numbers recorded earlier. Wrapping mode should be flat (XZ), and the brush Y axis should be scaled long enough to extend underground. You will then need to fiddle around with the brush size to match the area covered by the quickrender that created the shadow brushmap. This is where the ground measurements you eyeballed in the Perspective window, before quickrendering the shadow, will be useful. After a bit of tweaking, you should have scaled the brush axes to match the earlier quickrender, and the shadow object should match the position of the car's tires. You can now save this shadow object and bring it into your original scene, and you'll have a perfectly-scaled, perfectly-angled shadow under the car! If the car is to move (in a straight line, remember), just Associate the shadow to the car and they'll move as one. If you don't want too harsh a shadow, simply adjust the shadow brushmap's Mix/Morph setting. At 255, the shadow will be pure black, but at 205, it will be 20% transparent, letting some of the ground show through. This is a much more natural look/ Since the sun is so far away, it casts sharp shadows. In an environment where the light source was more of an area light (e.g. a chandelier), you could simply apply some Gaussian Blur to the shadow brushmap after you quickrender it. Presto, instant soft-edge shadows! If your car turns, however, its profile (as seen from the sun) will change, and so will its shadow. Think of your head's shadow on a wall, as you turn sideways, and you'll see how the shape of the shadow evolves. If the animation requires motion beyond a straight line, you'll need an animated brushmap, where each frame will be the car's shadow at the corresponding moment. To do this, you should probably establish a fixed shadow plane, covering the entire area of the scene covered by the car in motion. This way, you can leave the shadow plane immobile and avoid the nightmare of trying to match its motion to the car's. The plane will be mapped with a _series_ of renders, not just one, showing the car's shadow on each frame. In the duplicate black-car-on-white-background scene, you'll need to place the camera at the same position and alignment as the sun. To properly set the field of view when rendering, you'll need to establish the boundaries of the car's motion. (You don't want to miss a corner of the car partway through the animation, yet you don't want to be zoomed out so far that the car only uses a small part of the field of view) To define the optimal camera zoom, follow this procedure: add a 1x1-section, horizontal plane to the scene, under the car. Set the Perspective view to Camera View and Perspective Edit Mode. Zoom the camera view out, enough to cover the scene. Go to the last frame, and activate View / Stage Settings / Bluing. Now step through the animation, all the way back to frame 1. When you're done, you'll see the tracks left by the car in all four views. Pick the plane, and move/scale it to cover the entire set of tracks. This plane represents the area you must be sure to render. (Nifty, huh?) Now zoom the camera in, until one of the corners of the plane touches the edges of the Perspective view. Delete the plane. You can now use the Render menu command to create a series of shadow files, one for each frame in your animation. Because the camera covers a much larger area, you'll have to render at proportionately-higher resolution. Them's the breaks, there is no free lunch. Create a shadow plane in Detail, just like in the first tutorial, except that its size will be much larger than the car's, and the brushmap will be an animated one. (Either an AVI or individual frames, depending how you rendered the shadow dequence) Once properly sized so that the shadows match the car throughout the animation, you'll have an animated shadow that will perfectly mimic the car's motion. How's that for a tute? ---------------------------------- Date: Thu, 26 Mar 1998 20:01:49 -0800 From: Musica AWESOME....AWESOME...AWESOME-----"Tute of the Year" Wow....my hats off Did you get all that Matthew? ---whewww R- ---------------------------------- Date: Fri, 27 Mar 1998 17:49:44 +0400 From: Charles Blaquiere Matthew j Roddy wrote: > > Another absolutely BRILLIANT suggestion! Very well thought out and > detailed explanation! Thanks very much! What really clinches this tutorial are two key ideas: using Lightsource View to get a silhouette of the car, as seen from the sun; and duplicating the sun's position and alignment onto the brush axis, which recreates the exact deformation of the silhouette when projected onto the ground. ---------------------------------- Date: Fri, 27 Mar 1998 12:27:08 -0700 From: jbaker08 From: Matthew j Roddy Date: Friday, March 27, 1998 12:16 AM >It makes perfect sense! It was what I was originally thinking, but >thought that if I rendered the shadow falling on blue, and tried the ol' >blue screen effect, that I would then get blue shadows. But you're >telling me I won't! FANTASTIC! I'll give this a try (along with >everyone else's method!)! >By the way, why render twice if I'm just going to key the blue away? >THANKS! you must render the shadows seperately with the object painted blue if you want to be able to control the transparency of the shadows when you composite the scene together. If you render the object and the shadows together your object would be transparent along with the shadows. Hoping that makes sense... ----------------------------------