DF-21 Forums Forum Index DF-21 Forums
The Dark Forces Community
 
DF-21.net Home | FAQ | Search | Memberlist  | Register 
Profile | Log in to check your private messages | Log in

Red light in sectors

 
Post new topic   Reply to topic    DF-21 Forums Forum Index -> Dark Forces Levels & Editing
View previous topic :: View next topic  
Author Message
sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Sep 04, 2008 22:07    Post subject: Red light in sectors View user's profile Send private message Reply with quote

Can someone PLEASE tell me how to change the sector lighting to red? I've seen it used in a few mod levels, mainly multiple times in the Open Project.
I've searched all over WDFUSE and the Unofficial DF specs, didn't find a thing. I even opened up the Open Project and compared the sectors . . . nothing unique shows up on the red-light sectors.

Burning Gundam
Kell Dragon

Joined: 28 Sep 2003

PostPosted: Sep 04, 2008 22:52    Post subject: View user's profile Send private message Send e-mail Reply with quote

It's part of the CMP file and most of the lights that are "Red" are really sectors that have zero "light", but editing the CMP via PACMUT and looking at the file at zero light shows all red hued.

Just extract the CMP from those levels and look at it in PACMUT. And to demonstrate that this is how it works, if you fire your weapon in a place with that kind of lighting, you will notice that the surrounding area affected will flash black.

So in short, it's really not a light at all, it's just the CMP pallette changed at the zero light to trick the game into thinking everything at zero light should appear red-tinted.

Hope that answers your question Smile

_________________
I don't think outside the box... I customize it.

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Sep 04, 2008 23:03    Post subject: View user's profile Send private message Reply with quote

Yeah, I'm pretty sure that's it, thanks. I didn't think it was connected to the fog thing in Gromas, but it makes sense now . . .

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Sep 05, 2008 01:53    Post subject: View user's profile Send private message Send e-mail Reply with quote

Just as a somewhat related side note:

DarkXL will support colored lighting, in addition to emulating the "CMP". The plan is to have the current sector lighting with CMP support emulated, colored sector light (these sectors won't use the CMP but can be tinted any color), colored sector light gradients (allows a color at "floor" level and a color at ceiling level and interpolated in-between) which is useful for emulating skylight from the ceiling or light coming from lava. And of course actual dynamic lights, like jDoom.

Anyway enough about that, I just thought I'd talk about it since it seemed relevant. it since it seemed relevant.

_________________
DarkXL....http://darkxl.wordpress.com

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Sep 05, 2008 03:27    Post subject: View user's profile Send private message Reply with quote

Oooh, sounds nice Razz

The MAZZTer
Death Star
Death Star

Joined: 25 Sep 2003

PostPosted: Sep 09, 2008 00:52    Post subject: View user's profile Send private message Send e-mail Reply with quote

How red light works...

First you have the palette. Dark Forces is limited to only using 256 colors on-screen at once. Textures and all sprites, frames, waxes all have to use this palette otherwise they will look wrong, since they are rendered with the wrong palette.

Any level can use it's own palette, but it can only use one. All textures, sprites, frames, and waxes have to look right in this palette.

But now, this doesn't take care of light levels. If you turn down the lights in a sector, everything needs to look darker. In modern day graphics this is easy since you aren't limited to 256 colors.

But since Dark Forces is, we have the CMP file. For each light level, there are 256 entries which tell Dark Forces how to map each palette color at full light to the palette color at that light level. So for example, if we wanted to make light level 0 be pitch black, we just find a black entry in the palette (let's say entry 0 for this example) and just put that for every entry for that light level... 256 0s. So when the engine goes to render a texture, it translates all the pixels to black. Ta-da.

It's also easy to make lights that glow in the dark. Just map a color to itself at all light levels.

Gromas Mines uses light levels to make the air seem reddish. Instead of choosing darker colors for darker light levels, they choose "redder" colors.

You can do the same to make a "red" sector. Just remap all palette colors in that light level to a reddish tone of about the same luminescence (you will probably need to actually make some more red colors in the palette... the normal Dark Forces palettes don't have enough to make it look good, IIRC).

_________________
http://www.mzzt.net/ | I am a respectable admin with a respectable sig.

Patrick Haslow
Trandoshan

Joined: 25 Sep 2003

PostPosted: Mar 04, 2009 13:00    Post subject: View user's profile Send private message Reply with quote

My solution would be to just use those 2 files from the Condition: Red mission in your GOB and set your light levels in the desired sectors to 0. This will get rid of the headlamp as well.

I was never any good or patient enough to actually mess with custom CMP and PAL files. That was Matt H's thing.

Barry Brien
Dark Trooper Phase 1

Joined: 26 Sep 2003

PostPosted: Mar 04, 2009 16:02    Post subject: View user's profile Send private message Send e-mail Reply with quote

It's a long and winding road alright. But its cool if you have the patience. You can get some decent effects. Fog, sandstorms etc.

Lionel Fouillen
Gamorrean

Joined: 27 Sep 2003

PostPosted: Mar 04, 2009 16:18    Post subject: View user's profile Send private message Reply with quote

I played with that on doing the improved edition of Archangel 2. I actually wanted to get the water of underwater sectors to look blue but the result was poor and I gave up the idea.

Burning Gundam
Kell Dragon

Joined: 28 Sep 2003

PostPosted: Mar 04, 2009 18:47    Post subject: View user's profile Send private message Send e-mail Reply with quote

I wanted to do a similar effect for Force Crystal on one of my levels. When I realized that a majority of the level was going to use all sorts of lighting conditions, I decided not to do it. But when Dark XL is released I'll probably do a special edition of it with the extended features to add the effect.

_________________
I don't think outside the box... I customize it.

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Mar 05, 2009 00:50    Post subject: View user's profile Send private message Reply with quote

Yeah, I think I'll wait for DXL. My current level will rely more on dark, gloomy lighting . . . which has gotten a bit more important since I started playing Dead Space Razz

Besides, the CMP palettes aren't flexible enough for what I was planning (a pulsing red alarm lighting throughout the entire base). Hopefully DarkXL's lighting system will separate color and intensity options, that will certainly be useful.

The MAZZTer
Death Star
Death Star

Joined: 25 Sep 2003

PostPosted: Mar 05, 2009 03:00    Post subject: View user's profile Send private message Send e-mail Reply with quote

Yeah they are, if you want to turn the entire level red.

Of course you have to make every sector (that you want to pulse) a light elevator. Razz

_________________
http://www.mzzt.net/ | I am a respectable admin with a respectable sig.

Barry Brien
Dark Trooper Phase 1

Joined: 26 Sep 2003

PostPosted: Mar 05, 2009 13:29    Post subject: View user's profile Send private message Send e-mail Reply with quote

Or you could use the lights command in Talay. The only inf command to let you affect an entire level.
It'd be easy to do it then.

Fish
Gamorrean

Joined: 29 Sep 2003

PostPosted: Mar 05, 2009 14:50    Post subject: View user's profile Send private message Reply with quote

If you want to make the zero-light effect in some other color (or apply the aforementioned atmospheric effects), perhaps this might help? (Yes, it's about time I make a v1.0 Razz )

http://df-21.net/downloads/temp/ChromaForces_Beta077.zip

Barry Brien
Dark Trooper Phase 1

Joined: 26 Sep 2003

PostPosted: Mar 05, 2009 16:06    Post subject: View user's profile Send private message Send e-mail Reply with quote

Oh yeah you should Fish. Its a great little program.
And whatever happened to 3docad?

Fish
Gamorrean

Joined: 29 Sep 2003

PostPosted: Mar 06, 2009 14:03    Post subject: View user's profile Send private message Reply with quote

OK, I think it is quite useable already, but a few extra options would not harm.

And regarding the CAD, frankly, from today's viewpoint, it should be completely rewritten. It was started when Tiberius Augustus was at the throne, and also has a very cumbersome code (as a result of my programming knowledge being comparable to that of Augustus), so it would hardly be ported on today's machines. Maybe I will get around reviving/rewriting it some day using DX/OpenGL and all the shiny stuff it deserves, but for now, I'd rather first contribute by focusing myself on finishing the Lava Planet...

Barry Brien
Dark Trooper Phase 1

Joined: 26 Sep 2003

PostPosted: Mar 06, 2009 15:56    Post subject: View user's profile Send private message Send e-mail Reply with quote

Good stuff. I think this global economic crisis could be the start of a new golden age for DF editing. I was gonna drink my way through this recession, but maybe editing through it would be better.

Fish
Gamorrean

Joined: 29 Sep 2003

PostPosted: Mar 06, 2009 16:17    Post subject: View user's profile Send private message Reply with quote

How about both? Very Happy

Jackson
Dark Trooper Phase 2

Joined: 24 Sep 2003

PostPosted: Mar 06, 2009 20:53    Post subject: View user's profile Send private message Send e-mail Reply with quote

That combo might make for some interesting level design!

Barry Brien
Dark Trooper Phase 1

Joined: 26 Sep 2003

PostPosted: Mar 07, 2009 15:20    Post subject: View user's profile Send private message Send e-mail Reply with quote

It's either one or the other I'm afraid, whenever I try both I end up destroying the computer.

Display posts from previous:   
Post new topic   Reply to topic    DF-21 Forums Forum Index -> Dark Forces Levels & Editing All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group