YOMEDIA
ADSENSE
Essential Blender- P22
63
lượt xem 7
download
lượt xem 7
download
Download
Vui lòng tải xuống để xem tài liệu đầy đủ
Essential Blender- P22:You may copy and distribute exact replicas of the OpenContent (OC) as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the OC a copy of this License along with the OC.
AMBIENT/
Chủ đề:
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Essential Blender- P22
- Chapter 11: Lighting: Tutorial By Roland Hess While lighting is extremely important to the quality of a final render,[KM] and good setups can run the gamut from basic to complex, Blender's lighting tools themselves are simple to use. Open the scene called "Lighting Tutorial.blend" that is found in the "lightingexamples" folder of the included CD. Figure LT.01: The "lighting tutorial.blend" file when first opened. If you were to render this scene right now (F12), you would get nothing but a completely blank image. Although the models and textures are complete, nothing will render without lamps. Use the toolbox (Spacebar) to add a standard Lamp to the scene.
- Figure LT.02: The ttoolbox adding a lamp. Like any other Blender object, new lamps are created at the current location of the 3D cursor. They can be moved (G-key) or rotated (R-key), with the transform manipulators and mouse gestures working as well. salthough scaling should be avoided. In fact, scaling Lamps in Blender can create serious problems with your scenes., as dDistance, energy and shadow settings can be sensitive to the scene's overall scale of a scene, and using the Scale tools on them can lead to unexpected results. The transformation manipulators and mouse gestures will also work with lamps. With the new Lamp selected, find the Lamps subcontext of the Shading context, commonly referred to as the Lamp buttons. In the example file, the buttons window is already set to the Lamp buttons.
- Figure LT.03: The lamp buttons. The type of lamp we you[KM] have added to our your[KM] scene is often referred to as a "point lamp,"[KM], although that term is not used in the Blender interface. A point lamp casts light equally in all directions, using the lamp's location as the light source.
- Figure LT.04: Lamp with arrows showing to how it lights. The arrows show how light shines in all directions from the standard lamp. Try a render (F12) to see what the scene looks like with a single point lamp at default settings. Note: You can also use the Shift-P preview panel that was demonstrated in Chapter 2 to get a quick faster idea of how your lamps affect the scene.
- Figure LT.05: render without shadows. Rendering without shadows makes the vase seem to float. One thing you'll notice about the render is that while the objects are illuminated on the side facing the lamp and dark on the side facing away, there are no cast shadows. You would think that light sources should always cast shadows like they do in the real world. Shadows, however, require extra calculations at render time, which can slow things down. In addition, some scenes may have complex lighting setups using dozens of lamps, not all of which need to show shadows for the scene to be believable. For those these[KM] reasons, shadows in most CG programs, Blender included, can be enabled or disabled. Let's turn on shadowing for our your[KM] point lamp. In the Shadow and Spot panel, press the "Ray Shadow" button. Now re-render. That's all there is to using a point lamp. Note: If no shadows are rendered after enabling clicking "Ray Shadow,"[KM], be sure that the "Ray" button is enabled in the Render panel of the Render buttons (F10).
- Figure LT.06: render with shadows. The vase now looks like it makes contact with the tiles. From a top view (Numpad-7), press Shift-D to duplicate the point lamp and move it to the other side of the scene. If you have added the wrong kind of lamp to your scene and would like a different kind, you don't need to delete it and create a new one. The Lamps panel in the Lamp buttons lets you switch the actively selected lamp into a different type. Change the duplicated lamp into a Sun lamp by pressing the "Sun" button on the Preview panel. A Sun lamp has the same set of options as a standard Lamp in the Lamp buttons, but works a little differently in the 3D view and has a very different effect on a render. Recall that the standard Lamp broadcasts light in all directions from it's[KM] location. A sun lamp does not shine light from a single location, regardless of where the lamp is located in the scene. It creates uniform lighting coming from a single direction.
- Figure LT.07: sun lamp in 3D view with arrows showing how light comes from it. All light from a sun lamp flows in the same direction. The direction is controlled by the rotation of the lamp in the 3D view, visualized by the dashed line attached to the lampit. All of the light generated by a Sun lamp will shine parallel to this line. To see the difference between the parallel shading and shadows of a Sun lamp and a standard Lamp, move the lamp fairly close to the vase and orient rotate the lamp's direction tolamp to face it.
- Figure LT.08: sun lamp close to vase, pointed toward it.[no text] Render the scene. With the Render view still up, press the J-key. This will switch the render out to themove the render to an alternate render buffer, so we you[KM] can easily compare it to the next step. Back in the 3D view, change the Sun lamp back tointo a stand standard[KM] lamp and render again. When the render is finished, you can press the J-key several times to toggle between the two versions of the render. It's quite obvious when doing this how the light sources differ greatly in their effect, even though their controls are mostly the same.
- Figure LT.09 and LT.10: render of scene as sun lamp and as standard. The sun lamp render is on the left. Even though the lamp is nearly touching the vase, notice the parallel shadows it casts. Now that we've introduced you to[KM] the absolute basics of lamps (creation, positioning and shadow activation), we'll you'll[KM] create two different lamp setups, one each on a different layer, to learn the rest of the lamp controls. Three Point Lighting The discussion section of this chapter talks about some of the weaknesses of this very traditional method, common in studio lighting, but using it will give us you[KM] a good chance to learn some additional techniques. Three point lighting makes use of... three lamps!. Surprise. One lamp provides a direct light[KM], to show the details of the subject (the vase in our the[KM] example). Another lamp shines from a different direction and fills in the areas that are cast into shadow by the first lamp. A third lamp shines from behind and above, throwing a bright rim of light around the back and top edges of the subject. We'll You'll[KM] start by creating the first light, called the "key" light. Select and delete (X-key) the two lamps that are already in our your[KM] scene. Add a new Spot lamp at about the location shown in the illustration. We've split our 3D view into two separate views so you can better see the placement of the lamps.
- Figure LT.11: spot lamp added for key light. The 3D cursor positioned before the creation the Spot lamp. Using either the hotkeys, the manipulators or mouse gestures, rotate the spot lamp until its central targeting line passes through the vase.
- Figure LT.12: spot lamp with line passing through vase.[no text] Spot lamps have quite a few more controls than the other types of lamps we've you've[KM] seen so far. Almost all of those settings are related to shadows, and we'll examine them in a moment. For now, duplicate the Spot lamp twice with Shift-D and position and rotate the two new lamps as shown in the next illustration.
- Figure LT.13: three spot lamps in 3 point lighting configuration. See if you can get close to this lamp configuration. A render with this setup produces bland results.
- Figure LT.14: three lamp render without adjustments. Three point lighting with three identical lamps. What we you[KM] need to do is to adjust the intensities of the lamps to give the image better contrast. Select Spot number 1, the key light, and adjust the value of the Energy slider on the Lamp panel to around 2. Also, change the R and G values in the RGB sliders to 0.6. As you can see in the color swatch below the sliders and in the Preview panel, this will change the key lamp to a light blue.
- Figure LT.15: lamp panel showing energy=2 and rg=.6 Spot number 2 is called the "Fill" lamp, because it fills in the areas that are not illuminated by the key lamp. It should be a more subtle light, so turn its energy down to 0.60, and reduce its Blue slider to 0.5.
- Figure LT.16: lamp panel for fill light Finally, select Spot 3, the "Back" light, so called because of it's placement behind the subject. It will give the vase a bright rim around its upper edges. Leave the color alone (R, G and B all stay at 1.0), but change its Energy slider to 5.0.
- Figure LT.17: render with energies and colors adjusted. A much more interesting render. There are a couple of ugly things that are ugly in about this render that can need to be fixed. First, the specular highlighting from both the fill and back lamps looks bad on the wooden frame of the base, as well as on the highlight on the left side of the vase. We You[KM] don't want it to lose the highlights from the key lamp, though, so we you[Km] can't just turn off specularity in the vase's material. Blender allows you to enable and disable both specular and diffuse shading on a lamp-by-lamp basis. Select the fill lamp (number 2), and click the "No Specular" button on the Lamps panel. Do the same for the back lamp (number 3). You can re-render to see the effects. Another problem is the shadow being generated by the back lamp. If you examine it closely in your render window, you can see that it becomes pixelated (boxy) around the edgededges[KM]. In our first experiments, we enabled the "Ray Shadow" button on the standard and Sun lamps. That type of shadow generation always results in sharp, accurate shadows with no user configuration. Those shadows come at the cost of speed. In contrast, the default shadowing method for Spot lamps is called "buffered shadows."[KM].
- Each time an image is rendered using a lamp that has a buffered shadow, a special mini-render is done of the scene from the point of view of the spot lamp. An image is created of how far the objects in the scene are from the lamp. This kind of image is called a "shadow map."[KM]. When the final render is done, that shadow map is used to decide if there is anything between the part of the object being render rendered[KM] and the[KM] lamp, creating shadows. If you're thinking ahead, you may already realize why the shadow being generated by the back lamp looks pixelated. . It's because the shadow map, being an image, doesn't have enough resolution (enough pixels) to cover the area of the scene it is being asked to cover. We You[KM] can control the size of the shadow map with the "ShadowBufferSize" spinner in the Shadow and Spot panel. Select the back lamp and set its ShadowBufferSize to 2000. Re- render to see the shadow from the back lamp with a much nicer edge this time. There is one other huge problem with the shadow from that back lamp, one you may not have even noticed: there seems to be light leaking through the vase! Figure LT.18: fixed shadowbuff size, but highlighting light leak. Some problems have been cleaned up, but light is bleeding through the vase.
- Where is that coming from? Without being too technical, we'll just say that at some point during the creation of the shadow map, the wall of the vase was too thin to be detected. The result is an inaccurate map and a bad render. To fix problems like this, turn the Bias setting on the Shadow and Spot panel to 0.3. Re-render, and the problem has gone away. Figure LT.19: fixed render. Much better. You might be thinking at this point that tweaking buffered shadows is a pretty big pain and wondering why you shouldn't just use ray shadows all the time. The first reason is speed, and the second is flexibility. If you like, note your render time for using buffered shadows on the Render window. Then, switch each of the lamps to use ray shadows, re-render and see the time difference. On my the[KM] test computer for this simple scene, the difference is that buffered shadows are almost 20% faster than ray shadows. The second advantage, and probably the most important, is flexibility. Buffered shadows allow you to easily create blurred shadows, which can give an image a softer, more realistic look. To show this effect, set the Soft value of the back lamp to 10 and re-render. To increase the quality of the softening calculations, you can raise the Sample value.
- Figure LT.20: soft shadowing. The back light's shadow, softened. When working with buffered shadows, there are several things to watch out for: - Pixelated Pixelated[KM] (blocky) shadows can be fixed by raising the ShadowBufferSize. - Light leaks in a shadow, as well as a shadow not quite meeting the bottom of the shadow- casting[KM] object, can be fixed by reducing the Bias value. - Buffered shadows can be blurred by raising the Soft value. There are two more things we you[KM] can do to increase the quality of our your[KM] buffered shadow. The first is to adjust the Spot lamp's cone that you can seeappears in the 3D view. The cone that emanates from the lamp shows the area of light that is projected. Nothing outside of this cone receives any light from the lamp. You Your[KM] goal as a lighting technician in Blender is to get that cone to be as small as possible, while still encompassing the objects in your scene.
- Adjust the area the spotlight covers by reducing the SpotSi (Spot Size) slider on the Shadow and Spot panel. In the case of our the[KM] example, I waswe were[KM] able to reduce it to 15.00. Note in the illustration how much smaller the cone is than before. Figure LT.21: smaller light cone. Try to achieve the tightest light cone that will cover your objects. The second adjustment that can assist with spot quality deals with something called clipping. Clipping is just another way to limit what the shadow buffer creator creation process sees. The defaults that you can see at the bottom of the Shadow and Spot panel are 0.50 for ClipSta (Clip Start) and 40.00 for ClipEnd. This means that Blender will create a shadow map for objects that are between 0.50 and 40.00 units from the lamp. Nothing outside of that range will be able to cast a shadow. Like the size of the Spot lamp's cone, we you[KM] want to keep this range as small as possible while still encompassing all of the objects that need to be included. The newest version of Blender allows you to set this the clipping values automatically. To do so, click the "Automobile" button (Get it? Auto?) to the left of each Clip spinner on the panel. In a rudimentary scene like our this[KM] example, none of these optimizations make much of a difference to rendering speed or quality. It is when scenes grow in complexity, to hundreds of
ADSENSE
CÓ THỂ BẠN MUỐN DOWNLOAD
Thêm tài liệu vào bộ sưu tập có sẵn:
Báo xấu
LAVA
AANETWORK
TRỢ GIÚP
HỖ TRỢ KHÁCH HÀNG
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn