Skip to content Skip to sidebar Skip to footer

How to Make White Wall Tires White Again

Introduction

Kickoff off, a shameless plug to my website deticated to Source Engine Level design. You can observe downloads, tutorials, and more content here: TopHATTwaffle's Website[world wide web.tophattwaffle.com]

Lighting is a very of import part of levels. It tin can alter the mood, feeling, and immersion level for the player. Without lite, a level is never truly complete. VALVe's lighting has been increasing over the years, just still mostly remains lightmapped, with some dynamic shadow mapping added in newer games.

In this guide you'll learn from the basics, to more than advanced parts of lighting. So kick back and enjoy the read.

VRAD

VRAD is the control-line tool that takes a compiled BSP map and embeds lighting data into it. VRAD's static and pre-compiled low-cal is bounced around the world with a radiosity algorithm.
VRAD will:

  • Generate lightmaps
  • Generate ambient samples
  • Generate per-object or per-vertex prop_static and item prop lighting

VRAD is the generally the slowest (assuming that y'all've optimized VIS correctly in the level.) of the 3 compilers due to the many, many calculations it must perform. Lighting optimization can assist, equally can ensuring your map is free of leaks

Bones Lighting Tips

Tip i Placing a standard light entity is rather uncomplicated, just the most common mistake is placing it likewise close to the model. In real life the low-cal is projected from the bulb, only this is not how information technology works in source engine. No matter how bright a light is when placed as well close to a brush volition requite a rather cruddy bright circumvolve. The light is actually projected from the center of the entity, the small "X" in the center. All you need to do is pull the entity away from the brush. Both lights have the same brightness of 150. You lot can see the difference in the screenshot.

Tip 2 The colors of the lights are important to the feel, and mood of a area. This is quite some reading you can do on this. Here are the links.
Color Temperature
Lighting Psychology

A calorie-free is most NEVER solid white, this is why I get a bit angry when I meet a 255 255 255 200 light. (All light in source engine is colored in Red Green Blue Intensity)

The lighting psychology is a good thing to read, it will allow you get inside of the player'south head to keep them feeling what you want.

Nigh lights in game will exist from a blood-red, to a blue. Whilst nigh lights lights in the real world produce a warm yellowish glow. You volition see me mostly employ a yellow glow in my maps. The calorie-free settings for the first picture is: 255 239 202 150

  • Yellow/Green – When a role player stumbles upon a room lit past yellow lighting, it automatically makes them feel either achieved, content, or comfortable, depending on the state of affairs. Besides a very stealthy color. Makes the player more aware, and more careful. Information technology too gives the surroundings a living, animate quality.
  • Bluish/Purple – The colour of sadness. Bluish rooms seem very full of retention. It's the opposite of yellow, and then it's a good way to brand players slow downwards and retrieve. It can also cause players to second gauge, so be careful.
  • Reddish/Orange – Using red will make players feel like they need to do things quickly. Nigh like the place is "gonna blow." Putting enemies in the mode of the escape just helps exaggerate the suspense of the situation.
  • White/Brightness – White doesn't really make the player recall much. Unremarkably just makes the player focus on the job that needs to be done and non much else. If yous want to make a adept map, use white when NPCs are talking or telling a story. Players will focus more on the talking than the unimpressive background.
  • Black/Darkness – Gives a large sense of uncertainty and insecurity. Good for scary maps. If y'all employ this, don't use it as well much because, like white, it'south not meant for fun. When a player has just finished a completely dark portion of the map, make sure that when they ascend, they come across something actually bright and absurd for a sense of accomplishment and dissimilarity.

Tip 3 The brightness, or intensity, tin can aid fix the mood near as much every bit color. This is a shot of the same light, with 4 unlike brightness settings.

Tip four

NEVER proper name a light unless yous need to

. Giving a light entity a targetname makes VRAD compile a 2nd lightmap "page" for the surfaces that its emitted light touches. This won't harm in-game performance, but it will increase compile time and BSP filesize, regardless of whether the light ever receives input to change its country.

All the same, the system tin can be overloaded if you endeavour to brand it handle a large number of overlapping named lights (since the number of pages needed increases exponentially). When this happens operation tin exist harmed and you may well see lighting anomalies.

VRAD attempts to avoid this with its difficult-coded limits of two switchable lights affecting a brush face and 32 pages in total. You tin can help too by giving lights that will e'er change state at the same time a shared targetname, which makes VRAD merge their pages together.

The "Light" Entity

[/previewimg]A static, invisible, omni-directional lite source. Tin be turned on and off through the I/O system (notation that this will increment the complexity of your lightmaps, as pre-compiled values must exist stored for each on/off combination and cost more memory). Able to fix upward with patterns given furnishings just cannot move locations. Light is bandage in all directions from the origin of the entity. The brightness depends upon the falloff values you set. This light entity is the simplest of all lights and is used commonly.

While light travels from its source, it usually diminishes in intensity, limiting the expanse that its source can illuminate. This diminishing is called "light attenuation" or "fall-off.

The "Light_Spot" Entity

The light_spot is a very versatile form of lighting. Although it is typically use to direct calorie-free in a cone shape, it tin can exist changed depending on your need.
When the light_spot is starting time placed you lot will see a cone displayed from information technology, this shows the path that the calorie-free will take. This is rather unproblematic to set up up. It can too be used to create a florescent lite. This is a more favorable option over the light entity.


There is a inner, and outer bending. This allows you to modify how the light_spot displays calorie-free. In the screenshot you see a cone, this has been changed to requite use the florescent light feel. These are the settings used for light_spots in the picture to the correct.

  • 1. Just a calorie-free entity, With the brightness of: 255 227 187 600
  • ii. light_spot, with the brightness of: 255 227 187 600 inner angle:50 outer angle:90
  • 3. Light_spot, with brightness of: 255 227 187 300 inner angle:50 outer bending:90. AND a calorie-free with the brightness of: 255 227 187 15, and a ratio of 0:one:0 (you will learn most this ratio below)

Avant-garde Lighting Settings

There are many things that tin be done to further brand the lighting in your map look real. This is washed with the Constant-Linear-Quadratic Falloff. These are how the light is projected. The lights are stock set to 100% Quadratic. (Abiding:0 Linear:0 Quadratic:ane (0:0:1)) Go on in listen that this is ALOT of information to take in, that is i reason this is not a video. you can re-read things easier then re-watching.
The information below if straight from the VDC


Constant Attenuation - The picture on the right shows a lightsource displaying the simplest of attenuations: Constant attenuation. The keyvalues Constant, Linear and Quadratic take here been set to "1″, "0″ and "0″ respectively, creating a Constant-Linear-Quadratic ratio of 1:0:0, meaning that the attenuation is 100% Constant, 0% Linear, and 0% Quadratic.

The 100% abiding attenuation will event in a calorie-free that has no attenuation at all. The intensity, represented by the brigtness setting of the low-cal entity, will be totally unaffected past distance, continuing until it hits a surface, theoretically capable of illuminating an space expanse. This type of light tin be seen from the heaven (sunlight, monlight and starlight), and other large and afar calorie-free sources. It can likewise be used for setting local ambient lighting (past letting information technology illuminate the shadows of the room) or mood lighting.

Equally a 100% constant lightsource is an extreme type of calorie-free, constant lite is mostly used in combination with the other two types of attenuations, to "soften" or limit them.


Linear Attenuation - This is the same calorie-free entity, but at a 0:1:0 ratio, making its lighting 100% linear instead.

Mathematically, the decline of this type of light is linear, inversely proportial to the distance from the low-cal source (I = i/d where I is intensity and d is distance). This means that the calorie-free intensity (ready by its brightness) will diminish (at a fixed charge per unit) as information technology travels from its source. To recoup for this refuse, Valve has boosted the intensity of the lightsource to 100 times its effulgence.

In the real world a 100% linear lightsource would be practically impossible, as it would represent a real world soft light of infinite size, merely in the virtual world, a 0:one:0 lightsource is believable for most entity based lightsources.


Quadratic Attenuation - This is a normal, unmodified light source, preset to 0:0:1, making information technology 100% Quadratic.

Mathematically, the attenuation of a 100% quadratic lite is exponential (quadratic), expressed as "I = 1/d^two″, meaning that the further the light travels from its source, the more it will be diminished. This creates a very sharp driblet in light. To recoup for the fast decline of quadratic lights, Valve has boosted the intensity of them to be 100^2 (10 000) times more intense than the actual intensity.

An unmodified (100% quadratic) lightsource represents a pure "point light source" in the real world. In the virtual world, this effect looks similar a lightsource shining through murky water, looking far from typical real world lightsource behavior.
When used in moderation, quadratic attenuation tin can exist used non simply for small lightsources, but also to reflect light travelling through something more dispersing than air, like air humidity (similar fog) or water.

Mixing Attenuation - When blending between these three types of attenuation, you set the proportions of each attenuation blazon confronting the other two types. To avoid defoliation, keep in mind that you can set the calibration of these proportions equally yous wish: A proportion of iii:half dozen:1 gives the exact same result as 6:12:2, or 30:60:10, which can easily be translated to 30%, threescore% and x%.

Although the Abiding-Linear-Quadratic Falloff is a very good way to fine tune the projection of the lighting in your level, this can be very confusing. You can still tune the lighting using the falloff distance.

fifty/0 percent falloff distance

This is, in theory, the same equally the information listed above, only you have a little less control. Only it'due south easier to set up, just set the numbers and go.

50 per centum falloff distance: What ever you set this to the low-cal volition dissipate down to 50% by this distance. Same for the 0%.

Every bit you can see from the screenshots above and beneath, the falloff gives yous most the same effect you would get with the Constant-Linear-Quadratic Falloff. All of the lights in the picture here utilize these settings: 255 239 202 200

The dynamic lights and shadows

And then env_projected texture is a special entity that tin can projection light, and dynamic shadows of the receivers.
As you can see hither it projects a texture and draws the dynamic shadows. This gives u.s.a. a very erry feeling that can be frightful if seen from the corner of your eye. If you do not give it a texture it will but brandish a color that you tell information technology to. Whatever calorie-free projected from this will Non be bounced like other lights compiled with VRAD are.

Y'all're only allowed to have 1 of these on at a fourth dimension. Any game made afterward Portal ii will have nicer shadows emitted from this entity. Games earlier Portal 2 will have grainy shadow edges.

Games such every bit Counter-Strike Global Offensive can have a dynamic lights broadcast from the skybox using the shadow_control entity forth side the light_enviroment

The light_environment

This is a entity that projects the light from the "Tools/Skybox" texture. When creating role of your level that uses a outside expanse you should use this. This, used in combo with, env_sun gives you the good experience of the dominicus. The env_sun merely displays a sprite, where the light_environment actually displays the light. To gear up this light up just give it a bending and some color. Yous should simply have 1 light_environment in a level.

Glows, and beams for lights

There are things you tin can add together to your level that will produce a glow effect from the source of the entity. These entities are Env_Sprites, and point_spotlights.

Env_Sprites are typically used for a normal light glow, they are defaulted to be circle light glows, but can be changed to any sprite.

Start to create a env_sprite, just create information technology. Then send the render mode to "World Space Glow." This will let the sprite to render in game (Meet Render Modes for details) Then set up your colour and FX corporeality. This volition tone down, or intensity the effect of the sprite. For a florescent light fix the FX corporeality to around 140ish.

Point_spotlights are used to create a low-cal beam from the source, and a blinding outcome when looked at direct on. These are fifty-fifty easier to set then the env_sprite. Just create ane and point it. Under the flags of the point_spotlight there is a flag that will enable the dynamic light for this. This effect is very expensive to render and should not be used alot.

Lightmaps

A lightmap is the lighting data of each confront. The stored light is then added to the face giving it effulgence. The lightmap's scale refers to the number of texture pixels per light pixel (luxel). Smaller values mean more luxels, thus a better quality just larger BSP size and compile times. The commencement prototype with the finest shadows has a lightmap calibration of four, the 2nd image is sixteen, and the 3rd epitome is 64. To change the lightmap calibration just open up the face edit sheet and lower the value. This value should remain a power of two between two and 64. (2,four,8,16,32,64) When settings a lightmap scale, set it to the receiving face, not the casting. To view your calorie-free map grid int he 3D view, click on "Camera" on the 3d view and select "3D Lightmap Grid"

info_lighting

This is an entity used to specify the origin from which another entity is lit. Sometimes due to drastic changes in light over short distances or complex shadows a model can appear to be lit incorrectly. Past using this entity the model will be lit every bit though information technology were stationed at this location.

Ane common instance is the HL2 static Ladder props; when used in dark areas they may appear to glow, which tin exist corrected by inserting an info_lighting, naming information technology and specifying that proper name in the backdrop for the Ladder prop.

Tonemap and HDR lighting

HDR lighting gives your map a whole new feel of realism with lighting. It stands for High Dynamic Range Lighting, basically. It makes things glow as they would in real life. When y'all go from a night tunnel, to a bright outside environment you are basically blinded. Just like if you wake upwards at apex and look outside. Simply the HDR is not always good to right subsequently a compile, it is often likewise vivid, or dark. To fine melody this yous demand a env_tonemap_controller. Just add information technology to a map, then name it "tonemap" Next load the game. Burn down this panel control:

  • ent_fire tonemap setautoexposuremax #
  • ent_fire tonemap setautoexposuremin #
  • ent_fire tonemap SetBloomScale # (Bloom ONLY)

For the numbers on the max, I like to starting time with vi and become from there. Then set up the min to about .75 and go from there. And so write these numbers down once you are happy with them. Yous may not notice anything happen when you alter the flower scale, this is because HDR is on, and not blossom. Basically just have the low average of the max and min. So if max=4 min=.5 set the bloom to virtually one.5. Then create a logic_auto in your level and add the post-obit outputs:

  • "onmapspawn" tonemap,setautoexposuremax,#,0.00,-1
  • "onmapspawn" tonemap,setautoexposuremin,#,0.00,-1
  • "onmapspawn" tonemap,SetBloomScale ,#,0.00,-i

Make sure to compile your map with HDR to see the results.

Smoothing Groups

Used to smooth lighting between faces. Plant in the confront edit dialog, the groups allow the lighting of a face up to exist smoothed between other faces, to produce rounded furnishings with lighting. A classic example is when making a cylinder: If no smoothing groups are fix, each face on the brush volition catch light separately and will be lit separately. This will create a very obvious effect of separate each face. If they are all placed in the same smoothing group the light will be blurred between the faces creating a much smoother rounder look on the pillar. Tip:Smoothing groups have no affect on performance, apart from adding actress time for RAD to compile, so use them on your last compile.

Compile Settings

The Orangish Box engine (Source 2007) added three additional options y'all can utilize when compiling to improve the realism during compile. To access these, open Expert mode in the Run Map dialog and select "HDR Total compile -final (tiresome!)"; then, select the "$light_exe" line in the listing below that. In the Parameters field, append the options yous wish to use, as shown beneath.

NOTE: these considerably increment compile fourth dimension, and then information technology is recommended that you save them for the terminal few stages of your map!

-staticproppolys
Normally, VRAD creates shadows nether static props based on the collision mesh, since standoff meshes are ordinarily much simpler but however close enough to the prop's shape. This is unremarkably sufficient, but some props may have oversimplified collision meshes — or none at all — causing VRAD to create unnatural shadows. This option allows you to override this for certain props and forcefulness VRAD to employ the polygon mesh instead. This is also necessary if you demand to use -textureshadows (see below).
Simply append -staticproppolys to the $light_exe Parameters list (see above).

-textureshadows
Non all props take their "holes" divers solely by geometry. Mesh fences, for example, employ textures with alpha channels. These are not unremarkably recognized by VRAD, so if you employ them you lot will accept to either disable shadows from them (which sometimes produces decent results) or add this option, which forces VRAD to take alpha channels into account also, simply like with brushes.

To make -textureshadows work, you need to create a custom RAD file for your map listing which props yous want this option to affect. Extract the lights.rad file from the game in question using GCFScape or Crafty, place it in the game binder, and give it a new proper noun. Then, open it in whatever text editor and append the line forcetextureshadow [full path of prop] to the file for each model you desire this to impact. You volition also need to have 'staticproppolys enabled for this to work.

Finally, append -lights [name of your custom RAD file] -textureshadows to the $light_exe Parameters list (see to a higher place).

-staticproplighting
Different the other ii, this option affects the lighting received by props. Props are generally lit based on the lighting levels at their origin (meet info_lighting above), which tin can lead to unnatural lighting if a lite source is aimed at only one side of the prop or if the prop is half in shadow and halfway in light. This option forces VRAD to calculate the lighting level at each vertex instead. Of these three options, this one will probably affect compile time the most, just is usually a necessary step in making the map'south props look convincing.

Simply append -staticproplighting to the $light_exe Parameters listing (encounter above).

NOTE: This will crusade some props, such every bit pine trees, to try to cast shadows on themselves, creating an unrealistic look. To prepare this, nether the prop's properties, prepare the value for Disable Self-Shadowing with vertex lighting to "Yes."

- Valve Programmer Customs
To meet what these do, view the images/lookout man the end of Tutorial 74: Advanced lighting[www.tophattwaffle.com] has gone over this as well.

Limits

There are alot of limits that the source engine has limits on. I'll listing all of the limits I know well-nigh below (lighting limits only.)

  • One environment in a given level. Simply the first one volition work. Having more so one in a level may crusade errors.
  • Whatever given brush can have a max of 4 unlike lite styles on it. Having more than volition crusade lighting errors.
  • Lights styles are dissimilar types of light colors, not brightness.
  • EX of 5 different lights styles: 255 255 0 200, 0 255 255 200, 255 0 255 200, 128 128 128 200, 0 128 255 200
  • EX of 6 dissimilar lights, but non different styles. 255 255 0 100, 255 255 0 300, 0 255 255 600, 0 255 255 150, 128 128 128 100, 128 128 128 1200. This will not cause errors, because there are only 3 different styles. The brightness does not effect a style.
  • The effulgence of a light must be positive, if not it will suck the light from your map. Or cause errors.
  • 32 Light map pages, when naming lights that would share a face. Name them the aforementioned.

masseywounieve1981.blogspot.com

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=158909187

ارسال یک نظر for "How to Make White Wall Tires White Again"