HELP, How do I make lights so they turn on and off?


(darrenackers) #1

I need to be able to create light sources in GTK Radient, so that I can have switches on the wall and turn them on and off, and it affects all of my room. Which includes some misc_model md3 files too.

This must be possible as it is done in Half Life, so how is it done?

Any help/advice/links would be appreciated.


(The5thHorsemen) #2

open radiant hit the help tab then open the shader manual and look for the headder

Appendix A: targetShaderName and targetNewShaderName

should explain it all.

in a nut shell you creat a set of images for the light on- and the lights off , and target them with a shader switch through a func-button that will switch the image in game giving you the effect that the light’s have been turned on or turned off.
however the player model is unaffected by this switch and either stays lite or stays dark depending on the compile values for that area.


(rgoer) #3

What game are you mapping for right now? There are a few ways that this might be possible, depending on what you’re working with.


(darrenackers) #4

I’m mapping for Quake3

I don’t think that’s an option as we have over 600 textures in a realistic looking house. Although we have to now use vertex lighting if that helps. This image is the house in the day light, but now need to simulate it at night.


(LordDaimos) #5

Nice room :slight_smile:

/LordDaimos


(darrenackers) #6

Thanks… more here:

http://www.darrenackers.co.uk/pictures/house01.jpg
http://www.darrenackers.co.uk/pictures/house02.jpg
http://www.darrenackers.co.uk/pictures/house03.jpg
http://www.darrenackers.co.uk/pictures/house04.jpg
http://www.darrenackers.co.uk/pictures/house05.jpg
http://www.darrenackers.co.uk/pictures/house06.jpg
http://www.darrenackers.co.uk/pictures/house07.jpg
http://www.darrenackers.co.uk/pictures/house08.jpg
http://www.darrenackers.co.uk/pictures/house09.jpg
http://www.darrenackers.co.uk/pictures/house10.jpg
http://www.darrenackers.co.uk/pictures/house11.jpg
http://www.darrenackers.co.uk/pictures/house12.jpg
http://www.darrenackers.co.uk/pictures/house13.jpg
http://www.darrenackers.co.uk/pictures/house14.jpg


(The5thHorsemen) #7

I think it will work.

export the light maps and edit them…

thats what styles is doing in a way …

or maybe a shortcut.

I’m not sure but it would seem possable to make each room with a styles light and then let the styles light make the light map’s for you then go back and pick the light maps you need and rewrite the the q3map2 shader generated for the styles effect to work as a target shader just for the light’s off effect.

I’m sure Ydnar will tell me if I’m wrong or not.
hope I’m not.


(ydnar) #8

Port your mod to Jedi Knight II or Jedi Academy (or SOF2).

Those engines have native lightstyle support (Q3Map2 can compile for them) including switchable lights, which isn’t an option in Quake 3.

y


(darrenackers) #9

ydnar,

So your saying this is not at all possible in Quake 3?
Even if we have the source code and can re-write some of the functionality?
How about using these Lightstyle shaders, is that a possibility?

We’ve re-coded quite a bit of the quake engine, so would this be easily portable to Jedi Knight II or Jedi Academy?

You can see it in action if you have broadband: http://www.darrenackers.co.uk/animations/House.mpg (11MB)


(ydnar) #10

It’s low-level, in the renderer.

Porting a simple mod from Quake 3 to one of Raven’s games shouldn’t be that complicated.

Heck, they just released the Jedi Academy SDK last night, so that’d be where I’d start–it’s the most refined of the Raven game engines.

y


(darrenackers) #11

So it’s all done in the renderer.

It’s not a simple mod, it’s a simulation, a training package for British Gas. We worked on it for 18 months, allowing them to spec a house out for the fitting of a new boiler, and it allows them to do all sorts of measuring all then fitting a new boiler.

I don’t think we’d be able to pursuade them to change engines this far in.

How about a fudge, would we be able to use the dynimic lights as in the RPG’s give off to simulate turning lights on and off?


(Hybridesque) #12

It is possible to have triggered lights in Q3, I know somebody managed it for an example file for Urban Terror. How the person concerned did it, I have no idea… but I’ll dig out the file concerned. It did use exported lightmaps.

|HSO|Hybridesque.


(darrenackers) #13

Thanks.

So how are those dynamic lights done, when the rocket launcher is fired?


(The5thHorsemen) #14

Hybridesque
I think is talking about target shaders like in this old sample map for q3 from when the target shader’s where still pretty new…
theres a portal sky sample in there also…

http://spiderdemon007.home.comcast.net/5thmisc/small.zip

the dynamic light from the weapons I don’t know about.


(MrLego) #15

I have noticed in the RTCW multiplayer map Tram, that there is a flickering light on the floor in front of the fireplace in the transmitter room - simulating the fire flicker?

Was that a shader effect or something else?


(ratty redemption) #16

in wolf we can use dlight ents which are like point lights but can have a style key, value attached to them.

but I tried using them to turn on and off lights in an office room and the light they cast looks crap at high luminosity, so they only seem useful for dull flickering lights.

you could clone your “lights on” version of your room and make a “lights off” version somewhere else in the map, then swap them using script movers or func trains, but there can be a slight delay as the rooms are swapped.

I got around this by moving in the “lights off” room a split second before moving away the “lights on”.

but this method can also affect fr and I eventually scrapped the test map as I ran into other problems.


(WJTW) #17

I agree with using the JK2 engine. There was one level where the turning off and on of lights was demonstrated. I believe it was one of the Cairn levels. You’re supposed sneak to the door on the other side whilst the lights were off.

WJTW


(GRouZER) #18

Looks good!
Is there gonna be a (beta) release soon?