LightWave 3D 8 Lighting Wordware game and graphics library phần 8 pdf

55 372 0
LightWave 3D 8 Lighting Wordware game and graphics library phần 8 pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Note: In my latest feature project, I employed expressions to make the light cone angle automatically change to keep the light cone just large enough to cover the CG element. This way, when the lights were moved to set up a scene, the artist did not have to go through every light to optimize the cone angle. It was done automatically. Adding a Skylight Now that we’ve covered a bunch of different ways of making key sun - light or moonlight, it’s time to throw in a secondary light source, a “fill” light as it were. Fill lights are so-named because they fill in the spaces where the key light does not illuminate. When there is sunlight in the sky (or moonlight for that matter), the most readily available fill light source is usually the sky. During the daytime, this often means a bright blue sky. During the night, it usually means barely perceptible starlight, but we’ll deal with that later. The main thing to understand about skylight is that it is, by nature, omnidirectional and soft. In other words, the shadows, if any, are very soft. This is because the entire sky is one big illumination source, so you have light approaching from all directions, wrapping around objects and causing very soft, sometimes imperceptible shadows. So let’s start with the simple, cheap tricks we can use to simulate skylight and then move gradually on to the more accurate and more expensive methods after that. Using Ambient Intensity By far the easiest, cheapest method of creating any fill light is by throw - ing in a little ambient intensity. I know, I just finished talking about how evil ambient intensity is, but, hey, we’re looking for the cheapest method of creating a fill light. It doesn’t have to be good, just cheap! Ambient intensity is something that only exists in the CG world. LightWave just adds whatever percentage of illumination you choose to every surface in the scene. The net effect of high ambient intensity is that objects tend to look flat and fake. Figure 25.23 shows an image with an ambient intensity of 50%. ··································· Tips, Tricks ’n’ Tutes 357 But used with subtlety, ambient intensity can help boost levels and pro - vide a marginally acceptable, if not exactly accurate, fill light source. The problem, of course, is that since ambient intensity has no shadow provi- sion, it does not produce the soft shadows with which skylight is associated. Figure 25.24 has ambient intensity set at 10%. It is subtle but provides some illumination in areas that were otherwise black and completely unlit. This low-level ambient intensity suggests that there is another light source somewhere without providing any clues (such as shadows and therefore directionality) to its position. Once again, this is a cheap, inaccurate solution, but it can work, especially in shots with a great deal of motion blur. (Did I mention that I don’t like ambient intensity much?) 358 Chapter 25 ··························· Figure 25.24 Figure 25.23 Using “No Shadows” Lights This is an option that works something like ambient intensity. But where ambient intensity is omnidirectional with no source, this option allows you to define the posi - tion and direction of the light source. Hey, I know, let’s call it “directional ambient.” We use a light with the shadow options switched off in order to reduce render time and provide more even lighting (objects don’t get in the way). The benefit to this over ambient intensity is that object self- shadowing still creates shadows on the polygons facing away from the light source. In the first example, I’ve added a dis- tant light to our bongo-vulture scene, placed it directly above the object, and pointed it straight down. I left the light at its default intensity of 50% and turned shadows off for this light. See Figure 25.26. This technique is lightning fast because there are no shadows for the new fill light to trace, but a nice fill illumination is added, brightening up the darker areas of the floor and adding some intensity to the top of the object. Of course, since the distant light is directional, it is only illuminating sur - faces that are facing it. The underside of the object remains unlit. Also, to be really accurate, there would be soft shadows beneath the object. But because the distant light has its shadows turned off, there will be no shadows beneath the object. But that’s OK, because if we turned ························· Tips, Tricks ’n’ Tutes 359 Figure 25.26 Figure 25.25 shadows on, they would be ray-traced, hard-edged shadows, which are completely wrong in this instance and would look worse than having no shadows at all. Remember, there is only one sun in the sky at any given time on this planet in the current eon. It’s unlikely that you can have two competing hard-edged shadows from natural light only. So the moral of the story is, if you choose to use a “no shadows” fill option, remember to turn off the shadows. You can use any light type you choose for this very simple and quick option. Point lights, spotlights, even area lights — they all work pretty much the same with shadows off. The only thing that changes is the direction that the light beams go. With a point light, it’s all directions (omnidirectional) and diverging from the source. With a spotlight, it’s in a cone (usually). Linear and area lights act like arrays of point lights. Fid - dle with them if you wish. They all work for this trick. Using an Area Light Before global illumination came along, using an area light for a skylight fill was the only way to get a really accurate-looking soft shadow. There are those who will argue that the “spinning light” trick did this, or that fuzzy spotlights worked, or that any one of a thousand other techniques did the trick. All those techniques go some distance in creating the look by cheating, faking, and working around technology limitations, but, in my opinion, none of them quite reach it. Area lights have long been my lighting tool of choice for just about everything. Remember, just because it’s an area light doesn’t mean render times have to be outrageous. Smaller area lights render very quickly, and you can also change the quality setting to improve render times. Chapter 25 ······································ 360 Figure 25.27 Note: If you want to get really tricky, and you are lucky enough to have G2 from Worley Labs, you can improve area light quality by improving the settings within G2. G2 uses its own rendering engine to calculate area light shadows. This adds a little extra time to the render but also seriously improves the shading quality. Your call. Single Light Setup So let’s switch our newly added distant light to an area light on the Light Properties panel. To recap, we now have a spotlight as our key and an area light as our fill light. Once you have switched the distant light to an area light, hit the F9 button and take a look. OK, that looks wrong! Where’s the nice soft shadow? Well, take a look at the light size. The default area light is 1 meter square, and remember that we moved the light high up above the object. So the area light is a small light pretty far away from the subject. We know that the sky is much larger than 1 meter. We need to make our area light much larger to match. Let’s size it up to about 15 meters square and bring it down so that it’s about six meters off the ground. Remember, this area light should be pointing directly downward or have a pitch of 90 degrees. You could also make the pitch –90 degrees. Area lights work equally well in both directions. ··································· Tips, Tricks ’n’ Tutes 361 Figure 25.28 Well, that certainly increased render times. This frame took 1:22 to ren - der. But look at the beautiful soft shadows we are starting to get beneath the bongos. Note: Area lights and linear lights tend to create some “noise” that is especially apparent during animated sequences. Higher quality settings will reduce this noise, but you should always have Shading Noise Reduction enabled in the Global Illumination panel if you are using one of these light types. And don’t forget the pre- vious note about G2!! Note: Shading Noise Reduction works by blurring the diffuse channel of objects. Keep this in mind when using diffuse maps; they will become softer. Chapter 25 ······································ 362 Figure 25.30 Figure 25.29 This is the same image as the previous one but with Shading Noise Reduction enabled. It adds only a few seconds to each pass of the render but really improves shadow quality by removing noise. If you closely compare this image with the previous one, you will find that the fuzzi - ness of the shadow map is also softer and more pleasing. Manual “Light Bowl” Setup A single area light over the subject will often suffice as a soft sky fill source. But there are times when you need a sky fill that is shaped more like the sky. You can use global illumination, and we’ll get to that later, but first let’s look at a slightly cheaper (and slightly less beautiful) tech - nique I call the area light bowl. It’s a simple setup, really. You add two, three, four, five, or however many area lights you want in an inverted bowl shape to light your scene from more than one plane. Remember, the sky wraps around like an inverted bowl so this is more like a real sky than a single area light pointing downward. It’s sort of a poor man’s Backdrop Only global illumination. Bear in mind that as you add more area lights, your rendering times may increase dramatically, so try to get away with as few area lights as possible. Also keep in mind that as you add more area lights to your “light bowl,” the light intensities will add up, so as you add more lights, you will need to proportionately decrease the intensity of every light in the “bowl.” ··································· Tips, Tricks ’n’ Tutes 363 Figure 25.31 Here are the respective rendering times for each of the light bowl set - ups I used. The renders were done with Enhanced Medium antialiasing on a single-processor Athlon XP1800. 2 Lights 2:36 3 Lights 3:35 4 Lights 4:54 5 Lights 5:56 Figure 25.32 shows the final five-light “light bowl” area light setup. The shadows are beauti - ful and soft. And really, a render time under six minutes is not exactly outrageous. Obviously, the more area lights you add, the softer and more pleasing the soft shadows will be. Since smaller area lights render more quickly than large ones, you might try adding an array of smaller area lights without too much of an increase from this time. But smaller area lights become more directional, creating harder shadows, so be careful. The nice thing is that you would have a more natural hemisphere shape instead of the blocky shape produced by the five-light setup. But it’s a lot of work to set up a large array of lights in a hemisphere, isn’t it? Not any more. Looks like a job for luxigons! A “Light Bowl” Using Luxigons Luxigons are an absolutely prime tool for exactly this type of setup. When you have a situation where you need to create a large array of lights in specific positions, the fact is LightWave’s Modeler is so mature and robust that it is much easier to create, clone, and reposition poly - gons than lights. So do it. Make all your polygons in Modeler in the positions where you want lights. Import them into Layout and convert luxigons. Done. First, open up a fresh Modeler. Now for an array of area lights, I’d like to have a nice, fairly even bowl of maybe 12 lights. More area lights than that are really not necessary since each area light already behaves like an array of point lights. As long as the coverage is even, the soft shadows will be very nice indeed. I start by creating a ball using the Numeric panel. I make the ball have six sides and four segments. Chapter 25 ······································ 364 Figure 25.32 ··································· Tips, Tricks ’n’ Tutes 365 We’re only going to use the top hemisphere for our luxigon array, so let’s remove the bottom half. An important consideration when creating a luxigon array is the direc - tion of the polygon normals. The initial rotation of the light will be whatever the direction of the normal is. We want all our lights pointing Figure 25.33 Figure 25.34 inward, so let’s select all the polygons and flip them so that the normals are facing inward. Now there are a couple of ways to define what the light settings will be. The first is done in Modeler, but the second method, done in Layout, allows you to include many more settings not available in Modeler. Let’s look at both methods. For the Modeler method, simply go to the Construct panel, click the Additional drop-down, and select the plug-in Add Luxigons. You will see the following panel appear. Using the Attach Light to Polygon panel, you can define the lights’ type, color, and intensity as well as whether shadows are on or off. If you are using a spotlight, you will also get the option to use either ray-traced shadows or shadow maps. I have set the light color to 6000 degrees Kel - vin and set the intensity to 5%. Remember, the light intensities are additive, so 12 lights at 5% will produce sufficient illumination. The second method of defining the light properties is to already have one light in Layout before loading in the luxigon object. When you convert luxigons in Layout, you will be presented with the option to Chapter 25 ······································ 366 Figure 25.35 Figure 25.36 [...]... the red and green to be reflected Red and green light mix to make yellow Ambient Intensity and Radiosity Ambient intensity has generally been viewed by lighting artists as a blight and a plague on lighting, something to be ignored, scoffed at, insulted, and spat upon except in the most extreme of time-constraint situations Even then, ambient intensity would be added reluctantly, with dismay and disgust,... the tolerance, the more often LightWave will use these stored values With higher tolerances, LightWave will less often provide a new evaluation If tolerance is set to 0, its lowest setting, LightWave will never interpolate and will always do complete evaluations This is best if the lighting changes sharply in the scene If, on the other hand, your lighting changes smoothly and gradually, a higher tolerance... slightly, but ambient lighting is very unnatural and will make your lighting look flat In a 3D environment, this is not considered desirable But with the addition of radiosity into LightWave a couple of years ago, ambient intensity has gained a new foothold in our lighting plans This is because ambient intensity, when coupled with radiosity, takes on a new function that doesn’t just wash out and flatten our... option of using any textures available to you in the Surface Editor That means not only gradient but procedural and image textures If you want some realistic-looking sky lighting, including variations in blue and white from clouds and atmospheric changes or perhaps reds and oranges from sunsets and whatnot, you can always add an image to Textured Environment You’d probably use a cylindrical or spherical... Enable Radiosity (and Shading Noise Reduction), and set the radiosity type to Backdrop Only Now that we are using Backdrop Only mode, we’ll need a backdrop to illuminate the scene By default, LightWave s background is black Black will definitely not produce any Figure 25.62 illumination for our scene We have several options: We can use LightWave s built-in Gradient Backdrop, we can add LightWave s Textured... pages; this is good stuff It will give you a better understanding of exactly why your lighting looks the way it does and will give you clues as to whether or not you need to adjust your settings When LightWave determines that radiosity is being emitted from a surface, it creates the light rays by sticking a theoretical hemisphere on the surface and using the hemisphere’s normals to generate new light... it otherwise might be The first problem is understandable If any objects (and therefore shadows) move in the scene, the radiosity will not be recalculated to reflect these changes Therefore, the 386 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · Tips, Tricks ’n’ Tutes lighting will not be appropriate for any frames where objects and/ or shadows have moved Naturally, if things move... bounces and ambient intensity Open the Light Properties panel and set the default light’s intensity to 0% That way we will only see the radiosity illumination In the Global Illumination panel, turn on Enable Radiosity and Shading Noise Reduction, set the radiosity type to Monte Carlo, and leave Indirect Bounces at 1 Make sure Ambient Intensity is at 0%; we’ll add it later Hit the old F9 button and see... known in LightWave as multi-bounce radiosity Note: If you have ever looked at two mirrors that are facing each other, you have likely noticed how the image (and therefore the light reflected from the surface) bounced back and forth into infinity or until the light diffused enough that it became invisible This is radiosity in action Although LightWave makes a distinction between reflected images and reflected... blotchy and unreliable Following are some sample renders showing the Tolerance setting with render times Figure 25 .81 : Tolerance 0.0, 5:36 Figure 25 .81 was rendered using a tolerance of 0 It took 5:36 to render and there is no blotchiness Figure 25 .82 : Tolerance 0.1, 3:32 For Figure 25 .82 , I set the tolerance to 0.1 The render took 3:32 You can definitely see the results of a Tolerance setting that . and image textures. If you want some real- istic-looking sky lighting, including variations in blue and white from clouds and atmospheric changes or perhaps reds and oranges from sun - sets and. 25 ······································ 3 68 Figure 25.39 Figure 25. 38 And now, a quick render to see how our luxigon setup worked. OK, that wasn’t exactly a quick render at 15: 08, but the soft shadows sure. Athlon XP 180 0. 2 Lights 2:36 3 Lights 3:35 4 Lights 4:54 5 Lights 5:56 Figure 25.32 shows the final five-light “light bowl” area light setup. The shadows are beauti - ful and soft. And really,

Ngày đăng: 09/08/2014, 11:21

Tài liệu cùng người dùng

Tài liệu liên quan