PNG translations

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

PNG translations

Post by Cutmanmike »

Is there any way I can use translations with PNGs? I don't want to convert them back to Doom's format because they're large images. Converting them in slumped cuts them off so I assume Doom's graphic format has a limited size for sprites.

Can I change the PNG's palette to Doom's? Would that allow me to use translations?
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: PNG translations

Post by DBThanatos »

Well, in my experience, I didnt need to do anything with the PNG to use translations on it. For example, I had a Hexen2 (gray) archer (in PNG of course) I wanted to make gold, so I used this

Code: Select all

Translation "80:95=160:164", "96:111=64:79"
But when i decided to make this a Hexen mod instead of doom, I used this code in the exact same set of images

Code: Select all

	Translation "31:5=143:128", "33:47=128:135"	//hexen translation
So, depending in which game (pallete acutally) you are going to play it, is the translation you must use
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: PNG translations

Post by Cutmanmike »

DBThanatos wrote:Well, in my experience, I didnt need to do anything with the PNG to use translations on it. For example, I had a Hexen2 (gray) archer (in PNG of course) I wanted to make gold, so I used this

Code: Select all

Translation "80:95=160:164", "96:111=64:79"
Was this a PNG with the Doom palette or what? I don't understand how it gets the colors right if there's more colors in the PNG format used. Hopefully someone can explain it to me how translations work full stop.

Btw I'm using the GL renderer in GZDoom if that changes anything. :geek:
User avatar
DBThanatos
Posts: 3101
Joined: Fri Apr 14, 2006 3:17 pm
Location: in "the darkness that lurks in our mind"

Re: PNG translations

Post by DBThanatos »

No, it wasnt (not that I know). I ripped the model with QME. Then zipped all the images. Loaded with Slumped to adjust the offsets. And that's it.

Let me see if I stil have at hand those things and I'll give you the example.

EDIT: ok, give it a try if you wish. Note that Im no expert in PGN use nor anything similar. Maybe I just got lucky in having the exact ranges in the PNG needed for the translation. Meh, i dont know.

Just run this Zip in doom and summon "archer1" to see the original. "ArcherDoom" to see the doom translation working and "ArcherHexen" in hexen. If you summon the hexen one in doom, of course it'll look horrible.

http://www.sendspace.com/file/3vpi1g

And, yes, I have tested this with both ZDoom and GZdoom (gl render)

EDIT2: now I think about it, i think i read somewhere about being able to use RGB values for the translations. But that's something I never tried (if that even exist)
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: PNG translations

Post by Cutmanmike »

It would certainly save me a lot of hassle if I can translate pngs, so I shall look into this later :)
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: PNG translations

Post by Ghastly »

Full color pngs can't be translated, I don't think, because they don't use a 256-color color palette.

By the way, Doom's lmp sprites aren't much bigger, and I think might be smaller than pngs.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: PNG translations

Post by Cutmanmike »

I know but like I said it cut off half my sprites (which are fairly big btw and are scaled down in decorate). What if I use a png with the same amount as colors as Doom? (if you can even do that...)
User avatar
Enjay
 
 
Posts: 27130
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: PNG translations

Post by Enjay »

I know that LWM sometimes had trouble getting big sprites into a WAD using her WAD tool (XWE I think) and she would sometimes send me stuff to put in using DeePsea. So, maybe it's not a sprite size limit but a tool limitation.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: PNG translations

Post by Cutmanmike »

Damn. I wish SLayeR was around more. I'll try doing it in XWE then unless I can figure out if pngs can still do it.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: PNG translations

Post by Cutmanmike »

Bugger. PNGs work but translating to certain colors makes them bright blue. Oh well. I've just gotta figure out a way to convert Jitterskull into the Doom palette without making him look like ass. Maybe I'll post a new thread about it later.
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Re: PNG translations

Post by Ghastly »

Cutmanmike wrote:Bugger. PNGs work but translating to certain colors makes them bright blue. Oh well. I've just gotta figure out a way to convert Jitterskull into the Doom palette without making him look like ass. Maybe I'll post a new thread about it later.
Bright blue == Ass? ;)

Might be a bug, actually. I made a skin for Skulltag out of the Jezebel Quake 2 skin (by request), and if you tried translating it to black, it turned out light blue/cyan.
User avatar
Isle
Posts: 687
Joined: Fri Nov 21, 2003 1:30 am
Location: Arizona, USA

Re: PNG translations

Post by Isle »

when you translate high color pngs in gzdoom it first translates it to the doom palette then applys the translation.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49235
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: PNG translations

Post by Graf Zahl »

Translations on PNGs are undefined. There is no guarantee that they may work correctly.

For example, if you change critical colors in PLAYPAL they may stop working altogether.

If you want to use translations you should always use graphics in Doom patch format for them.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Re: PNG translations

Post by Cutmanmike »

Ah... the nail in the coffin! Thanks Graf. I won't bother giving it a translation unless people still think it looks okay in the Doom palette (I don't think it does at all).
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Re: PNG translations

Post by HotWax »

Ghastly_dragon wrote:Bright blue == Ass? ;)
It does if you're a Smurf. :P
Post Reply

Return to “General”