KolosoK@Posted: Sun Sep 26, 2004 10:27 pm :
First of all, I did a search on this tutorial on d3w. I found some, but they did not include screenshots of the creation process. This is my first tutorial that I am posting here.


-------------------------------------------------------------------------------

Do you want your lighting to look like this:
Image

If so, follow the easy steps! It will take about 5 minutes to achieve such an effect.

Step 1: Make a light model/texture from which you want the light to be emitted from. I selected a_trimlight_08_fin from the textures\base_lights directory.

Image

Step 2: Add a light. Place it so the origin (the red dot) of the light overlaps the center of the face of the light texture or model.

Step 3: With the light selected, press J on your keyboard. Now check the "Projected Light" radio button.

Step 4: Now it's time to move the pink dots around to where you want your light projected. Make sure to move them in all the windows: XY, XZ, and YZ. Just click and drag! Make sure the light overlaps the surface. If it does not overlap the surface, it will not light it up!

Image

Step 5: With the light selected, press N to bring up the properties manager. Here you can disable shadows if you want by typing in the key "noshadows" and the value of "1". You might also mess around with the color by hitting "k" to change the color of your light (give it a darker color to reduce its intensity).

Step 6: It is now time to copy the light and rotate it so it will project from your other light sources.

Image

Step 7: Compile your map, and test it! Check out the first screenshot and see how it should look like.


I hope this helps some of you! Have a kick-ass day!



Dogstar@Posted: Mon Sep 27, 2004 11:19 am :
Well I found that useful - dare I say 'illuminating'? Thanks for posting this. Every little tut helps! I'm going to try it out later tonight. I just need the cheap thrill of getting something - anything- to work properly. Maybe this will be it! :D



bb_matt@Posted: Mon Sep 27, 2004 1:06 pm :
Nice work Kolosk !

I've done a follow up tutorial to briefly explain how to create custom projected lights.

Projected Lights, Part II - Custom Lights



moziz@Posted: Mon Sep 27, 2004 1:10 pm :
another good small tutorial what explains only one THE thing and nothing useless. Good work Kolosok :wink:



funcrusher@Posted: Mon Sep 27, 2004 2:52 pm :
Personally I wouldn't use a projected light for strip lighting like that, looks pretty fake, to me.

Taking a cue from real world lighting, I found a point light with one of the "falloff_exp*" textures overlaid give you a much better approximation of how what appears to be a "light bar" (much like a flourescent bulb) would cast light. Projected lights seem better used sparingly for actual spotlight-type light textures or models.



Eutectic@Posted: Mon Sep 27, 2004 7:13 pm :
Perhaps but as Matt demonstrated in in Part II tutorial on projected lights, making it look real might simply be a matter of finding or creating the right light texture for it. One big advantage of projected lights is that the "light volume vs. actual lighted area" equation is much easier to control than with point lights.

With point lights, you have to create a much bigger light volume than what will actually look lighted in the game. The consequence in such a small area is that you inevitably end up with overlapping light volumes. Projected lights with a fine-tuned light texture offers the possibility to produce the desired effect without overlapping light volumes.

Just my 2 cents.

Oh and good work Kosolok and Matt. Thanks to your efficient "to the point" tutorials, I understand how to use projected lights and light textures. A big Thank You to both of you :)



bb_matt@Posted: Mon Sep 27, 2004 7:30 pm :
Eutectic wrote:

With point lights, you have to create a much bigger light volume than what will actually look lighted in the game. The consequence in such a small area is that you inevitably end up with overlapping light volumes. Projected lights with a fine-tuned light texture offers the possibility to produce the desired effect without overlapping light volumes.


Yes - it's basically a bit of a trick really. Of course, you have to be a bit careful how you use them in terms of shadows and the brightness of the projection onto a surface - it could look a bit odd in some circumstances.

If you look at the "misconception" thread I started, it goes into projected lights when De makes that suggestion and indicates these kinds of tricks have been used in CG for years. It basically solved the final part of a lighting dillema I had.

I got a brightly lit largish area using 3 points, 1 ambient and a bunch of projected lights, which basically solved problems with FPS - projected lights are an excellent and very useful addition and can solve many lighting problems - specifically where FPS would otherwise suffer using conventional lighting.

I've been experimenting quite a bit with them today - just for the record, don't try to project a RoQ file :lol:

Well, I had to try ! :)



KolosoK@Posted: Mon Sep 27, 2004 9:37 pm :
I will add one thing:

To not make it look so fake, I moved the center back inside the brush a bit, so the width of the light is identical to the object from which it comes out of. You can see this in the screenshot.



W01f@Posted: Fri Oct 29, 2004 5:50 am :
Sorry for bringing back an old topic, but I thought i'd mention that the way that scene is set up, that whole tiny floor area will register as having four light volumes touching it. You can bring that number down to one by simply clipping an X in the brush as seen in the pic below (and slightly nudging the texture alignment on any two brushes so the bsp doesn't weld them together)

Image



S@TaNiC@Posted: Fri Oct 29, 2004 3:03 pm :
Seeing this topic has been bought back up and is most probably searched for quite a bit it may also be worth mentioning that you can also combine the light with the texture, so if the light flashes or is coloured so is the light on the texture. This dosnt work with all textures but can easily be solved.

To combine the two first select the light and then the brush with the texture on it and press shift+k both objects should turn green within the editor.

As i said above this dosnt work with all textures and a_trimlight_08_fin happens to be one of these.
The current mtr file for this texture looks like this
Code:
textures/base_light/a_trimlight_08_fin
{
   qer_editorimage textures/base_light/a_trimlight_08_fin.tga

   diffusemap   textures/base_light/a_trimlight_d08_fin.tga
   specularmap   textures/base_light/a_trimlight_s08_fin.tga
     bumpmap      addnormals( textures/base_light/a_trimlight_local.tga  , heightmap( textures/base_light/a_trimlight_b08_fin.tga, 3 ) )
   {
      blend    gl_one,gl_one
      map    textures/base_light/trimlight_fx.tga
      rgb   blamptable[ time * 5 ]
   }

}


The line above "rgb blamptable[ time * 5 ]" is what currently makes this texture flash.
So i make my own mtr for this .
Code:
textures/base_light/a_trimlight_08_test
{
   qer_editorimage textures/base_light/a_trimlight_08_fin.tga

   diffusemap   textures/base_light/a_trimlight_d08_fin.tga
   specularmap   textures/base_light/a_trimlight_s08_fin.tga
     bumpmap      addnormals( textures/base_light/a_trimlight_local.tga  , heightmap( textures/base_light/a_trimlight_b08_fin.tga, 3 ) )
   {
      blend    gl_one,gl_one
      map    textures/base_light/trimlight_fx.tga
      colored
   }
}


As you can see all ive done is replaced the one line with "colored" now if you retexture the brush with this "a_trimlight_08_test" and combine it with the light, the texture will take on the properties of the light.

Well ive only quickly put this together and someone may point out that this is not the best way to do the mtr file but it works for now, hope this helps.



modern@Posted: Sat Jun 18, 2005 3:17 pm :
You cannot change the intensity of a projected light by adding a key "light". Can this tutorial be edited please to correct this mistake please!



rich_is_bored@Posted: Sat Jun 18, 2005 5:26 pm :
Sure.

Provide me with corrected text for this section...

Quote:
Step 5: With the light selected, press N to bring up the properties manager. Here you can disable shadows if you want by typing in the key "noshadows" and the value of "1". You can also set the intensity of the light by typing in the key "light" and the value of "x", with x standing for how bright you want it. I used the value of 1 for noshadows and the value of 30 for light. You might also mess around with the "_color" key to change the color of your light.


...and I'll edit it into the original post.



voldemort@Posted: Sun Jun 19, 2005 2:19 am :
If you happen to have a colorable texture or model that you are using for the light select both and hit K instead of j and this will allow you to assign the colro to both



modern@Posted: Sun Jun 19, 2005 8:31 am :
How about this?

Step 5: With the light selected, press N to bring up the properties manager. Here you can disable shadows if you want by typing in the key "noshadows" and the value of "1". You might also mess around with the "_color" key to change the color of your light (give it a darker color to reduce its intensity).

You cannot change the intensity of the projected light by typing in the key "light" and the value of "x".



Rayne@Posted: Sun Jun 19, 2005 9:05 am :
Why messin' around with _color key when you can hit "k" and choose a color from a beautifull color picker?



modern@Posted: Sun Jun 19, 2005 9:22 am :
Good point, how about this?

Step 5: With the light selected, press N to bring up the properties manager. Here you can disable shadows if you want by typing in the key "noshadows" and the value of "1". You might also mess around with the color by hitting "k" to change the color of your light (give it a darker color to reduce its intensity).

You cannot change the intensity of the projected light by typing in the key "light" and the value of "x".



rich_is_bored@Posted: Sun Jun 19, 2005 4:14 pm :
Done.