Doom Comic
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 > TRANMAP abuse in Boom: additive blending, inversion, grayscale, and more!
 
Author
All times are GMT. The time now is 15:19. Post New Thread    Post A Reply
esselfortium
A Major Doomworld Concern


Posts: 7053
Registered: 01-02


I discovered tonight that Boom's TRANMAP lumps (precalculated translucency tables) are effectively 256x256 flats, meaning they can be edited in Photoshop, Paint.NET, or any other decent image editor that supports layers. This means that they can be manually created and used for all sorts of cool things that basic translucency can't do. With it I've created Boom-compatible additive blending, grayscaling effects, color inversion, hue-shifting, and all sorts of other useful things. They work perfectly in PrBoom and Eternity, but ZDoom completely ignores the TRANMAP lumps, totally breaking the effects. (I've put in a feature request for this, since it seems most people just use ZDoom for everything regardless of intended port.)

A few examples:
http://sl4.poned.com/screens/tranmap-fx/etrn425.png Hue shift, inversion, and grayscale
http://sl4.poned.com/screens/tranmap-fx/etrn413.png Additive blending
http://sl4.poned.com/screens/tranmap-fx/etrn411.png Grayscale
http://sl4.poned.com/screens/tranmap-fx/etrn419.png Inverted midtextures and stuff behind them
http://sl4.poned.com/screens/tranmap-fx/etrn418.png Inverted stuff behind midtextures only

The screenshots were taken in Eternity, but this feature was in Boom itself.

I used http://sl4.poned.com/screens/tranma...ps/TRANS100.bmp as a base, a 0% opacity table.

To create a tranmap, open TRANS100.bmp in your image editor of choice, and create a new layer with those same color bars from TRANS100.bmp in it (just copy and paste, or duplicate the layer). Then rotate it 90 degrees counter-clockwise (putting the purples on the right), and set its opacity to the amount of translucency you want. Changing the brightness or coloring of the horizontal bars will affect what's behind the midtexture, and changing the vertical bars in the transparent layer will affect the transparent midtexture itself.

Now import it into your wad with whatever lump name you want, and use the Save As Doom Flat menu item in XWE to put it into the correct format.

To use it in a map, tag all the lines you want to make translucent, but do not set special 260 (translucent line) on them. Put a line in a dummy sector somewhere that has special 260 and that sector tag, with your tranmap lump's name as its middle texture. If you've done it right and you're using a Boom-compatible port that's not ZDoom, it should work.

Here are a few sample tranmaps. They need to be converted to Doom flats in XWE before you can use them:
http://sl4.poned.com/screens/tranma...ps/TRANSB_W.png - Turns everything behind the midtexture into grayscale, without actually making the midtexture itself visible.

http://sl4.poned.com/screens/tranma...ps/TRANSBW2.png - Makes the midtexture and everything behind it grayscale.

http://sl4.poned.com/screens/tranma...ps/TRANSAD2.png - Bright additive blending.

http://sl4.poned.com/screens/tranma...ps/TRANSIN2.png - Inverts the colors of everything behind the midtexture, without displaying the midtexture itself.

http://sl4.poned.com/screens/tranma...ps/TRANSIN3.png - Inverts the colors of the midtexture and everything behind it.

http://sl4.poned.com/screens/tranma...ps/TRANSINV.png - Inverts the midtexture only, but not what's behind it.

Have fun!

Last edited by esselfortium on Sep 6 2008 at 06:56

Old Post Sep 6 2008 06:33 #
esselfortium is offline Twitter account Youtube || Blog || PM || Post History || Add Buddy IP || Edit || Quote
lupinx-Kassman
Senior Member


Posts: 1429
Registered: 10-06


Your awesome Essel.

Old Post Sep 6 2008 06:56 #
lupinx-Kassman is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Death-Destiny
Forum Regular


Posts: 934
Registered: 12-07


Cool. More toys to play with the next time I make a Boom map. Thanks a ton Essel! I still play maps in the ports they're intended for, so I can appreciate this. =D

Old Post Sep 6 2008 07:19 #
Death-Destiny is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 8104
Registered: 01-03


Just a note:

OpenGL ports can not recreate such effects at all for obvious technical reasons so anyone using GZDoom or PrBoom's GL renderer won't be able to use it.

Old Post Sep 6 2008 08:21 #
Graf Zahl is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
TomoAlien
Member


Posts: 320
Registered: 06-08


Cool, i've made some effects with it (Red glass effect, tinter, invulnerability sphere effect). Nice find Essel.

Old Post Sep 6 2008 11:09 #
TomoAlien is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
andrewj
Senior Member


Posts: 1725
Registered: 04-02



Graf Zahl said:
OpenGL ports can not recreate such effects at all for obvious technical reasons so anyone using GZDoom or PrBoom's GL renderer won't be able to use it.

You could support some of these effects (those that are possible in GL) by performing an analysis of the TRANMAP lump being used. But there's probably no one in the world willing to write that analysis code :)

Old Post Sep 6 2008 13:28 #
andrewj is online now || Blog || PM || Post History || Add Buddy IP || Edit || Quote
TomoAlien
Member


Posts: 320
Registered: 06-08



Ajapted said:
You could support some of these effects (those that are possible in GL) by performing an analysis of the TRANMAP lump being used. But there's probably no one in the world willing to write that analysis code :)

It would require use of Pixel Shaders since they can do that.

Old Post Sep 6 2008 14:19 #
TomoAlien is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 8104
Registered: 01-03



Ajapted said:
You could support some of these effects (those that are possible in GL) by performing an analysis of the TRANMAP lump being used. But there's probably no one in the world willing to write that analysis code :)

I think you nailed the problem. ;)

TomoAlien said:
It would require use of Pixel Shaders since they can do that.

No, they can't. Pixel shaders don't control the blending with the background, only how the source data is generated. And besides, the destination is always true color so the TRANMAP data would have no reference of what color index to use for it.

Old Post Sep 6 2008 14:51 #
Graf Zahl is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
TomoAlien
Member


Posts: 320
Registered: 06-08



Graf Zahl said:
No, they can't. Pixel shaders don't control the blending with the background, only how the source data is generated. And besides, the destination is always true color so the TRANMAP data would have no reference of what color index to use for it.

Stupid me.

Old Post Sep 6 2008 16:04 #
TomoAlien is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
leileilol
dork stalker


Posts: 2726
Registered: 06-04


Heretic and Hexen has tranmaps as well, IIRC

Old Post Sep 6 2008 16:53 #
leileilol is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Mechadon
Senior Member


Posts: 2326
Registered: 12-06


Jesus that's awesome essel :O

Old Post Sep 6 2008 18:54 #
Mechadon is offline Twitter account Youtube Twitch || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Use3D
Forum Legend


Posts: 4742
Registered: 04-02


Yes, secret technology developed for a secret doom project full of secrets....


o.-

Old Post Sep 6 2008 23:52 #
Use3D is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
entryway
Forum Staple


Posts: 2776
Registered: 01-04


Firefox can't find the server at sl4.poned.com :(

Do you still have these screnshots locally?

Old Post Dec 20 2012 09:33 #
entryway is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Mad Butcher
Member


Posts: 268
Registered: 05-03


All the images are at archive.org.

http://wayback.archive.org/web/*/http://sl4.poned.com/*

Old Post Dec 20 2012 09:46 #
Mad Butcher is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
wesleyjohnson
Senior Member


Posts: 1143
Registered: 04-09


I have done some tranmap analysis in DoomLegacy, to support RGB draw modes and opengl rendering.
The analysis can detect average translucency, can draw translucent and opaque pixels.
Other effects will be lost.
More strange uses of these tranmaps will require that the ports have a normal tranmap application before RGB conversion. This will not work with textures and sprites that already are RGB, nor with RGB draw screens, which creates a conflict.
At least we still have a palette draw mode, which should be able to handle these.

Old Post Dec 21 2012 04:04 #
wesleyjohnson is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
hawkwind
Senior Member


Posts: 1022
Registered: 04-04



Graf Zahl said:
Just a note:

OpenGL ports can not recreate such effects at all for obvious technical reasons so anyone using GZDoom or PrBoom's GL renderer won't be able to use it.

Ditto for Risen3D

Old Post Dec 21 2012 10:55 #
hawkwind is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Memfis
Honestly, semen doesn't taste that bad.


Posts: 7112
Registered: 04-07


I don't know if this is the correct place to ask but...
I'm looking at orange sky through translucent waterfall texture and I see some purple pixels:


Do I need some custom TRANMAP to get rid of them? If so, how do I make it? The map is for prboom-plus -complevel 9 (I don't mind if it will not work in opengl)

Old Post Mar 7 2013 17:45 #
Memfis is offline || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!


Posts: 12523
Registered: 07-07


The problem probably doesn't happen in OpenGL anyway.

Old Post Mar 7 2013 18:35 #
Gez is online now || Blog || PM || Post History || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 15:19. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > TRANMAP abuse in Boom: additive blending, inversion, grayscale, and more!

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.