in black and white
Main menu
Share a book About us Home
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

Quake 4 mods for dummies - Guilfoyle E.

Guilfoyle E. Quake 4 mods for dummies - Wiley publishing , 2006. - 411 p.
ISBN-13: 978-0-470-03746-1
Download (direct link): quake4modsfordumm2006.pdf
Previous << 1 .. 46 47 48 49 50 51 < 52 > 53 54 55 56 57 58 .. 129 >> Next

Looking at Figure 11-21, you can see an example of how the light reaches the ground from the sun. The light starts from the sun. Some of it shines directly down on you as it passes through the atmosphere. Anything that stands between this light and the ground creates a shadow. Other beams of light get caught and are reflected by the atmosphere. Eventually, some of that reflected light makes it way back down to the ground in the form of ambient light. The ambient light doesn’t necessarily come from the direction of the sun, but instead it comes from all directions and will fill in that shadow with a less-bright light.
Figure 11-21:
As sunlight passes through the atmosphere, it is bounced around and comes to you in the form of ambient light.
Ambient Light
To reproduce this effect that occurs in the atmosphere, you must use more than one light. One light is created and represents the direct light from the sun. It casts shadows and shines on the world. A second light is created on the opposite side of the map. This second light isn’t as bright and doesn’t cast any shadows or affect the surrounding world in any other way other than to produce the ambient light effect.
146 Part III: Expanding Your Creation
You could get further involved by adding even more lights for more effect, but it isn’t necessary. Two lights will be enough for most maps to create the effect you’re looking for.
Adding a virtual sun
Before you start adjusting the light, set up the CAM window to see how the changes are affecting the level. Press F3 and F4 to activate the Realtime and Render modes in the CAM window, respectively. Render mode displays the level in a way that resembles the game itself. Realtime mode updates the rendering in real time so that as you make adjustments to the light, you will see how the adjustments change your level. At the moment, the picture in the CAM window might look a little bit dark, but that’s about to change.
Here’s what you need to do to create a simulated sun:
1. Start by adding a light entity as you did in Chapter 7 to the northeast quadrant of the map, using Figure 11-22 as a guide.
Move the light near the top of the sky, where you will pretend your sun is sitting.
By default, the light isn’t strong enough to shine onto the ground of your map from such a distance. You could drag out the distance that your light can shine by enlarging the pink box that surrounds the light entity. However, such a method would create problems with larger maps. You would have to stretch out the box for more than twice the radius of the level itself.
Instead, you can apply a special texture to the light. Light textures are really just combinations of images and short scripts that tell the light how to behave. Light textures are already available in the Light Editor window.
2. Drag out the size of the light’s falloff level to fully encompass your level.
This larger, pink box surrounds your light. Make sure the pink lines reach just outside your map in all three directions like you see in Figure 11-23.
3. Press J to open the Light Editor.
The Light Editor, shown in Figure 11-24, allows you to fine-tune the light to meet your needs. Rather than having to remember all the Keys and Values for the light that can be manually entered into the Entity Editor, you can use this window.
Chapter 11: Heading to the Great Outdoors 147
Figure 11-22:
Place the simulated sunlight entity in the northeast corner of the map near the top of the sky.
XY Top
■^89683276870^64657 551644(03 8432^25)6192121864 54 128|l92i25 63 20Î3 84448k 125761640 ”47.






1 1
Figure 11-23:
Drag the falloff level to fully encompass your map in all directions.

25 60 .
rr - — j- — - - - — ~ - — — - — — - - -
; : -J- — -
Previous << 1 .. 46 47 48 49 50 51 < 52 > 53 54 55 56 57 58 .. 129 >> Next