Advanced entities and structures - ie strip lighting?

Discuss the construction of maps and the tools to create maps for 3D games.
Post Reply
spamalam
Posts: 31
Joined: Mon Jul 10, 2006 7:15 am

Advanced entities and structures - ie strip lighting?

Post by spamalam »

/me a newbie (been making a level since earlier this morning so be gentle)

I was wondering if anyone can point me to some resources for some more complex structures and entities in Quake. I would like, for example, to make some strip lighting for parts of my first level. Unfortunately the entities for light sources all seem to be point light sources. I made a cylinder, squashed it and put a white texture one it for the model, and then i put an entity of "light" up.

Here's what it looks like atm, ideally it would be a flickering strip light and atm its a little spot light.
Image

I'm guessing that I've got to use quakec and code up an entirely new entity for a strip light which defines its size and properties, and then insert this new entity into my level ie. light_my_strip_light? Is that about the gist of it or is there an easier way?
than
Posts: 15
Joined: Sun Jan 22, 2006 7:41 am

Post by than »

STOP! There is an easier way!

The basic light entity can have more properties than just brightness and appearance (flicker, strobe, etc.) If you are using a more recent tool such as Tyrann's tyrlite (http://www.disenchant.net) , or aguirRe's light tools (http://user.tninet.se/~xir870k/) you can set values for attenuation too. This means you can create a light with a high brightness yet have it spread over a small area. It also means that you can do the opposite and light a large area with ambient light from just one light source with a high attenuation.

To do this, add the key "wait" to the light (if you are using worldcraft, click on smartedit in the entity properties and you will be able to add new things). Set this above 1 to decrease the distance the light can travel, and below 1 to allow the light to travel further. If you create a light with the a brightness of 400 and wait of 10, and then copy and paste it along the surface you want to be a strip light, you can effectively create a convincing striplight (that WILL NOT work if you are using real time lighting of course!)

You can then set the appearance value for all these lights to flicker, and as long as they all use the same style, they will operate as one flickering light. You can't have more than 4 different styles ona surface, but if they are all the same (even if flcikering) there is no problem. I think the lights are removed from the bsp at compile stage these days, although I think they might be kept for engines such as tenebrae and DP.

Either that or you could texture the surface with a light texture that uses fullbrights (most of the original id light texture use fullbrites), although many gl based engines do not support fullbrites. The only engine that does to my knowledge is fitzquake, although I imagine DP probably does too.

You can also create spotlight cones by setting the "angle" key of a light to a sort of direction vector using pitch yaw and roll. "angle" "0 -90 0" will produce a spotlight aiming straight down.

Anyway, I'm off to the pub, so that's all I can say. If you want to know more, check out the mapping help thread at func_msgboard or #terrafusion on irc.quakenet.org, and I'm sure someone will tell you what you need to know.
than
Posts: 15
Joined: Sun Jan 22, 2006 7:41 am

Post by than »

There are also different light attenuation formulae you can use for each light, and you can set brightness tp a negative value to cast shadows instead of light :)
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

Don't forget about the original id spotlights.

Any light entity can have a "target" key set that corresponds to another entity (usually an info_null)'s "targetname" field. When you do this, the light is re-interpretted as a spotlight that will have a cone shape from the point of the light origin in the direction of it's target. When doing this, the "angle" field will have an effect on the spread or final radius of the cone.
spamalam
Posts: 31
Joined: Mon Jul 10, 2006 7:15 am

Post by spamalam »

Hmm seems i'm going to have to spend a long time playing with these settings, i can't quite visualise out what the values do and small changes seem to do little.

Seems tenebrae erases the lights and draws in its own.

Thanks for the info guys, i'll have a play and see what I can come up with :)
FrikaC
Site Admin
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Post by FrikaC »

Tenebrae is not a Quake engine.

It is a techdemo for a yet-unproduced game. Do not map or mod for it if you wish to have the map or mod used by the general Quaking public.
Quake Matt
Posts: 129
Joined: Sun Jun 05, 2005 9:59 pm

Post by Quake Matt »

I personally use IKLite when I'm mapping, since it's got a couple of nice attenuation formulae.

Although, that said, I heard TyrLite can make light-emitting brushes, which should be just about perfect for a strip light. Never used it, though, so I'm not sure how well it'd work in practice!
spamalam
Posts: 31
Joined: Mon Jul 10, 2006 7:15 am

Post by spamalam »

thanks people, got something that looks more like a strip light now:
Image

:)

Using the latest darkplaces engine.
Post Reply