Moving decals


(Flippy) #1

Hey…

In my map i want to make a train that crosses a bridge when the map has finished (you see this in the intermission time).

The map is at night, so the train will have it’s headlights on :stuck_out_tongue:

I was wondering if it’s possible to have moving lights like this?

Obviously i can’t use actual light entities because they are mapped to the textures, but would it be possible to use a decal as the ‘lightspot’ where the light meets the ground?

And then, would it be possible to move this decal with the train so it looks like it’s actually the headlights?

I have never used decals in my life so before i do my head in trying to get them to work i thought i asked this first if it’s possible…
Afaik decals are entities right? So i have to attach them to a tag on a scriptmover?


(carnage) #2

Obviously i can’t use actual light entities because they are mapped to the textures, but would it be possible to use a decal as the ‘lightspot’ where the light meets the ground?

And then, would it be possible to move this decal with the train so it looks like it’s actually the headlights?

u can implement a decal pretty much like any other texture and they require not special entity settings just a shader set up for them to work as decal. this means u can set them up and use them just as you would a script move

another thing you might want to try that would be easier and possible even give better results would be to create some light shafts (the sorta of thing u see from windows in a dark room) for the headlights and not worry about lighting up the actual geometry


(Flippy) #3

I already have the light shafts working, i just made them into a script_mover :stuck_out_tongue:

But i thought a decal was an entity? So i didn’t know it would work when tagged to a mover…

So i can just make the decal texture into a script_mover and not worry about anything? That would be great lol… then ill look up some info on decals ^^


(carnage) #4

for creating decal textures you might wanna check out

http://www.heppler.com/shader/

section 3.7 polygonOffset is probably a good place to start with decals


(FireFly) #5

In my map i want to make a train that crosses a bridge when the map has finished (you see this in the intermission time).

You could attach a dlight & a corona entity to the headlight. I think that would also give a nice effect…


(Flippy) #6

Can you move dlights then? didn’t think that would be possible…

Seems like a good idea then… i know dlights are memory consuming, but since it’s only there during intermission time i doubt this will be a problem.


(FireFly) #7

Normally I wouldn’t suggest using dlights in a map as they will dramatically decrease your fps. However in your case they will only appear in intermission time. :slight_smile:

yes, you can attach dlights & corona’s to a tag.

Chruker created a nice tool to create dummy md3’s with tags: http://www.splashdamage.com/forums/viewtopic.php?t=10593