Tremulous Forum

Media => Mapping Center => Topic started by: TRaK on April 21, 2007, 10:16:03 pm

Title: How do I get this lighting effect?
Post by: TRaK on April 21, 2007, 10:16:03 pm
(http://img148.imageshack.us/img148/1138/flarejl9.jpg)

I've looked at the shaders in Niveus, but I can't get it to work. I must be using it wrong, or using the wrong thing.

Thanks.
Title: How do I get this lighting effect?
Post by: Pacra on April 21, 2007, 10:23:02 pm
That would be a lens flare added.

Bill Brooks has an excellent tutorial on lens flares:

http://www.wemakemaps.com/lensflare.htm

If you have any other questions, just ask.
Title: How do I get this lighting effect?
Post by: OverFlow on April 21, 2007, 10:25:47 pm
That tutorial is actually a bit incorrect for usage in Tremulous.  Trem has its own entity for flares (misc_flare?) that acts more accordingly to true lens flares.
Title: How do I get this lighting effect?
Post by: TRaK on April 21, 2007, 10:25:52 pm
Thanks :) . I tried searching, but I didn't know the precise term.

Quote from: "OverFlow"
That tutorial is actually a bit incorrect for usage in Tremulous.  Trem has its own entity for flares (misc_flare?) that acts more accordingly to true lens flares.


misc_light_flare?

I'll try that :)

edit : it works!
Title: How do I get this lighting effect?
Post by: Paradox on April 21, 2007, 10:47:45 pm
(http://img249.imageshack.us/img249/4203/stannumlflaresaw0.jpg)
Cookie to anyone who knows what its from.
Title: How do I get this lighting effect?
Post by: TRaK on April 21, 2007, 11:07:10 pm
lies!
Title: How do I get this lighting effect?
Post by: Lava Croft on April 21, 2007, 11:18:33 pm
Taken from entities.def:

Code: [Select]
//=============================================================================
/*QUAKED misc_light_flare (.65 .65 1) (-8 -8 -8) (8 8 8) SPAWN_DISABLED
A light flare entity.

-------- KEYS --------
targetShaderName: The name of the shader of the light flare.

radius: The radius key is a vector.
The first component is the size of the light flare. The radius is calculated by taking the distance of the viewer from the light flare and dividing by this key, so the larger the key value, the smaller the flare. Values between 2 and 10 are sensible.
The second component indicates the angle around the direction the flare points for which it is visible. For example a value of 90 means that you can see the flare while infront of the entity, but not when behind it. If set to zero the light flare will be visible from any angle
The third component is similar to the first except that it specifies the size of the light source rather than the size of the light flare itself. This is useful when the higher detail flare fading modes are enabled. If this is set to the same value as the first component, fading will commence as soon as the edge of the light flare is occluded by some surface between the viewer and the flare. If it is set larger the flare will overlap the occluding surface before it begins to fade.

angles: This reflects which direction the flare points. It is not important unless the second component of the radius key is employed. angles is a vector of PITCH YAW ROLL. For example a value of "90 0 0" would create a flare pointing down. ROLL is redundant in this context and can be set arbitrarily.

-------- SPAWNFLAGS --------
SPAWN_DISABLED: Spawn disabled.

-------- NOTES --------
Triggering this entity toggles it.
*/
Title: How do I get this lighting effect?
Post by: rdizzle on April 23, 2007, 06:44:11 pm
Lens flares are an artifact of small errors optics e.g. lenses.  So unless you are playing as a camera, why would you want lens flares?
Title: How do I get this lighting effect?
Post by: OverFlow on April 23, 2007, 07:06:26 pm
Quote from: "rdizzle"
Lens flares are an artifact of small errors optics e.g. lenses.  So unless you are playing as a camera, why would you want lens flares?


Human (and I'm guessing Alien) eyes aren't perfect either.  Look at a really bright light in a dark room, and you get an effect much like the 'lens flares' in tremulous.   :P
Title: How do I get this lighting effect?
Post by: David on April 23, 2007, 07:30:42 pm
Quote from: "Paradox"
(http://img249.imageshack.us/img249/4203/stannumlflaresaw0.jpg)
Cookie to anyone who knows what its from.


Transit?
Title: How do I get this lighting effect?
Post by: rdizzle on April 23, 2007, 07:45:30 pm
Quote from: "OverFlow"
Quote from: "rdizzle"
Lens flares are an artifact of small errors optics e.g. lenses.  So unless you are playing as a camera, why would you want lens flares?


Human (and I'm guessing Alien) eyes aren't perfect either.  Look at a really bright light in a dark room, and you get an effect much like the 'lens flares' in tremulous.   :P


no you don't, you get an effect related to lensflare but very, very different from the effect he's asking about
Title: How do I get this lighting effect?
Post by: TRaK on April 23, 2007, 10:49:10 pm
The nice thing about lensflares is that they make a light look like it's 'glowing'. Sure, it might not be 100% realistic, but it looks more interesting than just a plain white dot.
Title: How do I get this lighting effect?
Post by: Plague Bringer on April 23, 2007, 11:03:43 pm
Quote from: "rdizzle"
Quote from: "OverFlow"
Quote from: "rdizzle"
Lens flares are an artifact of small errors optics e.g. lenses.  So unless you are playing as a camera, why would you want lens flares?


Human (and I'm guessing Alien) eyes aren't perfect either.  Look at a really bright light in a dark room, and you get an effect much like the 'lens flares' in tremulous.   :P


no you don't, you get an effect related to lensflare but very, very different from the effect he's asking about


Yes, yes I do.
[edit](oops, fuck)
Yes, yes they do.*[/edit]

Also; try staring at the sun for a few minutes, it has the same effect.
Title: How do I get this lighting effect?
Post by: Kaleo on April 24, 2007, 08:23:11 am
Quote from: "David"
Quote from: "Paradox"
(http://img249.imageshack.us/img249/4203/stannumlflaresaw0.jpg)
Cookie to anyone who knows what its from.


Transit?


COOKIE to the man under the GummieBunnie
Title: How do I get this lighting effect?
Post by: whitebear on April 24, 2007, 11:56:14 pm
Quote from: "Plague Bringer"
Quote from: "rdizzle"
Quote from: "OverFlow"
Quote from: "rdizzle"
Lens flares are an artifact of small errors optics e.g. lenses.  So unless you are playing as a camera, why would you want lens flares?


Human (and I'm guessing Alien) eyes aren't perfect either.  Look at a really bright light in a dark room, and you get an effect much like the 'lens flares' in tremulous.   :P


no you don't, you get an effect related to lensflare but very, very different from the effect he's asking about


Yes, yes I do.
[edit](oops, fuck)
Yes, yes they do.*[/edit]

Also; try staring at the sun for a few minutes, it has the same effect.

Thats not exactly the same. ^^
But humans do see lens flares with clear eyes. When it's night (and time of the year makes night pitch black) go look at street lamps in difrent angels you find your self staring at lens flare in no time.