Cyberdemon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > GZDoom Builder issue! (colored lighting)
 
Author
All times are GMT. The time now is 04:22. Post New Thread    Post A Reply
GoatLord
I really should think before I post.


Posts: 2307
Registered: 07-02


I decided to try to implement colored lighting. I could not find anything on Google save for a YouTube video on how to do it in Zdoom format in Doom Builder 2, but the author left out a lot of information and I had no idea what to do.

Old Post 11-13-12 22:00 #
GoatLord is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6312
Registered: 12-00


ZDoom in Doom format?

For some reason, I can't find this in the ZDoom wiki but...

Make a line type 334 and tag it to a sector. Put a HEX number on the upper side def of the line to represent the colour you want in the format RRGGBB - eg FF0000 is red.

Old Post 11-13-12 22:21 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
GoatLord
I really should think before I post.


Posts: 2307
Registered: 07-02


I'm sorry, but I have no idea what any of that means.

Old Post 11-13-12 22:26 #
GoatLord is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6312
Registered: 12-00


You know how you give lines specials to do things and these lines have numbers associated with them? The number for the type of line you need is 334.

You know how when you make a switch that affects another sector, you give the switch a sector tag and give the sector the same tag? Do that.

You know how you can put a texture on the upper side of a line? Don't do that. Instead, put a number there. The number represents how Red Green and Blue the colour of the sector lighting will be. It's a hexadecimal number so FF is the biggest number you can have. FF0000 id red. 00FF00 is green. 0000FF is blue. FFFF00 is yellow etc.

I'll whip up a quick example.

[edit] Here you go:

http://www.mediafire.com/?fdpo7av8b7krn83

[edit2] I just checked in Doom Builder 2 (I made the map in DeePsea) and DB2 doesn't seem to know about line type 334 (that doesn't stop you using it BTW). With this missing from both the Wiki and DB2 I wonder if the ancient art of colouring sectors in ZDoom in Doom format has been forgotten?

Last edited by Enjay on 11-13-12 at 23:04

Old Post 11-13-12 22:41 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
GoatLord
I really should think before I post.


Posts: 2307
Registered: 07-02


Thanks, this really clears up a lot of confusion and eliminates the need to write a script. Can the amount of color be changed? For instance, if I wanted the red sector to only be 20% red?

Old Post 11-13-12 23:35 #
GoatLord is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6312
Registered: 12-00


Sure you can. It might take a bit of messing around with the values to get the colour that you want but it's quite flexible.

Just so you know, the numbers are all hexadecimal (base 16). The number 255 (the maximum for lots of stuff in Doom) is FF in hexadecimal. 128 is 80 in hexadecimal. So a line "texture" value of FF8000 would be the same as 255 red, 128 green 0 blue in a script - which gives the orange colour in the last coloured sector in the example map.

I find the quickest way to check a hex value is to enter the normal base 10 number (eg 255) into the Windows calculator in programmers view then change the calculator to read hex instead. You can also google for a decimal to hex converter (and you'll get loads of matches) or if you are comfortable counting in base 16 you can just work it out in your head.

You may also be interested to know that if you put a hex number on the lower side instead of the upper, it will create coloured fog instead.

Old Post 11-14-12 00:06 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Dragonsbrethren
Forum Staple


Posts: 2395
Registered: 03-09


Wow, I'm surprised that isn't documented anywhere. I always assumed you needed to use an ACS library to get colored lighting in Doom format maps. That should really be added to the wiki; it's definitely the best way of having colored lighting in cross-port wads (shame vanilla chokes on unknown line specials).

Old Post 11-14-12 00:23 #
Dragonsbrethren is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
GoatLord
I really should think before I post.


Posts: 2307
Registered: 07-02


Enjay, I appreciate the advice, but you only seem to be talking about how to change color values when I want to adjust the TRANSPARENCY of the color value.

Old Post 11-14-12 03:30 #
GoatLord is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 6312
Registered: 12-00


It can still be done by setting the colour values. Try thinking about it this way. FFFFFF would be normal full lighting. So, instead of making your red value FF0000 try keeping red at FF but only reduce the blue and the green to, maybe, DD. FFDDDD gives an effect that is a bit redder than an uncoloured sector but it's reasonably subtle.

Old Post 11-14-12 17:56 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 10685
Registered: 07-07



Dragonsbrethren said:
Wow, I'm surprised that isn't documented anywhere. I always assumed you needed to use an ACS library to get colored lighting in Doom format maps. That should really be added to the wiki; it's definitely the best way of having colored lighting in cross-port wads (shame vanilla chokes on unknown line specials).


How it works is explained here; but the Doom-format linedef numbers aren't documented. One of the reasons being that they can be changed.

And vanilla doesn't choke on unknown line specials. It does, however, quit abruptly when the player enters a sector with an unknown type.

Old Post 11-14-12 18:33 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Dragonsbrethren
Forum Staple


Posts: 2395
Registered: 03-09



Gez said:
And vanilla doesn't choke on unknown line specials. It does, however, quit abruptly when the player enters a sector with an unknown type.

Huh, really? I could've sworn I had trouble when I ported a Boom map of mine over to vanilla and missed a few Boom line specials. That's great to know.

Edit: Still errors out trying to read the value as a texture, though. I'd have to include dummy textures for every color I use.

Last edited by Dragonsbrethren on 11-14-12 at 18:58

Old Post 11-14-12 18:37 #
Dragonsbrethren is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 04:22. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > GZDoom Builder issue! (colored lighting)

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Message Board Statistics