Welcome New User Home | Forums | Register | Login | Larger Font
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
Sparks. [Downl]

1 Members and 20 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Friday, Jul. 4th
MODSonair Episode 134
Thursday, Jul. 3rd
Happy 4th of July
Monday, Jun. 30th
Major Retailer Confirms 360 Price-Cut
Sunday, Jun. 29th
MODSonair 134 Live
Friday, Jun. 27th
MODSonair Episode 133
Latest Poll
Want a MODSonline Wiki for various games?
I think a Wiki would be a great addition to MODSonline. 79.73%
I could see a benefit of a Wiki. 6.76%
I think it would take away from the community. 6.76%
Wiki sites are never good. 1.35%
Wiki... isn't that Buck Roger's robot slave? 5.41%
Read More...
7 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
help ,for a good sentence.
CoD 2 Level Desi.. Posts: (2) Views: (23) by AnythingButt
Elevator model problem
CoD Level Design.. Posts: (1) Views: (15) by Tragic
Comiler Problem
CoD 2 Level Desi.. Posts: (3) Views: (31) by jmcke149
A Lunch / Bounce pad?
CoD 4 Level Desi.. Posts: (1) Views: (19) by sinner4
Art of War Central Half-Life 2 Mods for Dummies
Tutorials: HL2
Mapping and modding for Half-Life 2.
Add your tutorial (registered users)

Rating:
Awful Rating Poor Rating Average Rating Good Rating Excellent Rating
Versions: You must be logged in to view history.
Texture Lighting
2004-12-10 19:56:01
N shows us how to create textures that give off light.
One of my favorite things about the Source engine, and the Hammer editor, is a function of lighting known as texture lights.   They  might seem confusing at first, but they are very easy to use, intuitive, and in the end I think provide MUCH better lighting than point lighting.  But enough of that, I'm just here to tell you how to use or implement them, and then you can see for yourself how they look.

Some facts about what we're talking about:

1. Texture lights are defined in a simple text file with the extension .rad
2. Normally this file is called lights.rad, but we'll be changing this to the name of our map
3. Texture lights have basically a three part definition:  the texture name, the color of the desired light, and the brightness of the light.

Alright, so you want to include texture lights in your map, here's how you would do it.    Let's consider that we are making ourselves a half-life 2 multiplayer map, called "mp_light_test"

So we create our map in Hammer, and we save it (not compile it).   Where is the map saved?  Typically this would be something like:

..\Valve\Steam\SteamApps\maldevane\sourcesdk\hl2mp_sample_content\maps\mp_light_test.vmf

Alright, so in this same location, we are going to create a new blank text file and call it "mp_light_test.rad", so that the directory now has both the map (vmf file) and our .rad file in it.

So, in our map, we put in some flourescent light looking textures that we want to emit a cool blueish glow.  We need to write down or remember the name of the texure.  In our texture browser the texture in question has the name of:

lights/fluorescentcool001a

Open up the .rad file in notepad.   And on the first line, we'll enter in "lights/fluorescentcool001a" and then follow it up with a tab.  We'll now be entering four numbers.   The numbers, in their order of entry are:

    red value, green value, blue value, brightness

We want this light to have a sort of cold blue light, so we need to get the RGB values of such a color.   You can find this using paint, even, by creating a custom color and looking at the red, green, and blue values listed in the color custom panel.  These values we then add in next to our texture listing, and have a line that should now look like the following:

lights/fluorescentcool001a    230 240 247

The last number we need to enter is the brightness of the light.  This can be from very dim to very bright; I'm not sure of the minimum and maximum, but I believe values even into the thousands will work for bright worklights or small instrument panel lights.  But we want these to be regular shop lights, so we'll pick a brightness of 375, for a semi-bright blueish glow.   The final line for our texture light definition should now look like this:

lights/fluorescentcool001a    230 240 247 350

That's basically it -- further texture light definitions just go down on the next line, etc etc.   For example:

lights/hazzardred001a    228 37 0 300
lights/hazzardyellow001a    250 215 74 300

lights/HIDcool001a        145 222 172 650
lights/HIDcool001b        205 232 255 650
lights/HIDwarm001a        255 201 116 650

is a section of the lights.rad file that is the base for Half-Life 2's lights.rad file.  Texture lights defined in your map should overwrite the values in the master .rad file, but I'm not one hundred percent sure of this.   Basically, though, making a concise .rad file for your map is the way to go, as it allows you to change the brightness and color for a large number of lights at one time.

So now that we have our map file and the defined .rad file in the same directory, we go ahead and compile the map.   In the status window for the map's compile, you should scroll up and see where it has read in your .rad file and parsed through how many ever texture lights you have defined and used them in radiosity calculations.

Experiment and have fun -- things like vending machines, neon signs, and other subtle lighting effects look REALLY sharp when defined using texture lights in this fashion.  Multiple colored/light vending machines with combined texture lights for flourescent lights and the red glow of an exit sign, are all very easy to define and control, and provide a solution that really provides an atmospheric touch to the lighting of your map!

--N--

All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline.com can be found News.php.
Art of War Central
Partners
The Firing Box
XoXide
Frag Universe
My Topsites List
Call of Duty Headquarters
Battle for Europe COD2
Websites4Clans
modbase.be
Ask About
Advertising
Friends
ModTheater
Volcano
SOF2 Files and Downloads
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 134
MODSonair Episode 133
MODSonair Special CoD:WW Episode
MODSonair Episode 132
MODSonair Episode 131
Next Show
The next MODSonair show will air LIVE on:
07/06/2008 11:00 EDT

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware