MantisBT - Zandronum
View Issue Details
0000651Zandronum[All Projects] Suggestionpublic2012-01-16 15:202018-09-30 19:51
Watermelon 
Torr Samaho 
normalfeaturealways
closedfixed 
MicrosoftWindowsXP/Vista/7
98d 
1.0 
0000651: Allow player sprites in OpenGL to not have the palette enforced on them
For some reason, the palette seems to be enforced only on player sprites in OpenGL. If you import a PNG and assign it to a player, when you play as that player... the sprites can become quite messed up.

For example, this is actually something that occurs in game for my popular wad:
'http://img6.imageshack.us/img6/268/icefiend.png [^]'
NOTE: This file is also attached in the upload file section

The left is what it looks like in game under either renderer, right is what it's supposed to look like.

It seems that if you make a monster out of it... true color is allowed, but not for players.
I don't know if there's a flag or feature that allows OGL to draw player sprites without palette enforcement. I've gone all over the ZDWiki and STWiki and haven't found anything. I started a thread on it in the editing section and others are having the same problem as me.

Neither do I know if it's designed to prevent bug abuse or sprite replacement... or maybe some other reason it's disallowed? It'd be nice to allow it, or maybe even create a new flag that allows for non-forced player translation to be toggled?
No tags attached.
related to 0000910feedback  Allow skins to turn off colour translating via skininfo 
png ICEFIEND.png (6,853) 2012-01-16 15:20
/tracker/file_download.php?file_id=448&type=bug
png

? TestDontTranslate.wad (203,755) 2012-01-20 04:09
/tracker/file_download.php?file_id=450&type=bug
jpg MyselfInMirror.jpg (79,346) 2012-01-20 04:13
/tracker/file_download.php?file_id=451&type=bug
jpg

? TrueColorTest.wad (203,702) 2012-01-24 04:18
/tracker/file_download.php?file_id=453&type=bug
? TestDontTranslate2.wad (203,772) 2012-01-24 12:23
/tracker/file_download.php?file_id=454&type=bug
Issue History
2012-01-16 15:20WatermelonNew Issue
2012-01-16 15:20WatermelonFile Added: ICEFIEND.png
2012-01-16 23:45Torr SamahoNote Added: 0002476
2012-01-16 23:58DuskNote Added: 0002477
2012-01-17 18:12WatermelonNote Added: 0002478
2012-01-19 18:40Blzut3Note Added: 0002491
2012-01-20 04:09WatermelonNote Added: 0002494
2012-01-20 04:09WatermelonFile Added: TestDontTranslate.wad
2012-01-20 04:13WatermelonFile Added: MyselfInMirror.jpg
2012-01-20 13:15DuskNote Added: 0002496
2012-01-20 15:07WatermelonNote Added: 0002498
2012-01-21 15:13Torr SamahoNote Added: 0002505
2012-01-21 15:14Torr SamahoStatusnew => feedback
2012-01-21 21:08WatermelonNote Added: 0002513
2012-01-21 21:08WatermelonStatusfeedback => new
2012-01-21 21:17WatermelonNote Edited: 0002513bug_revision_view_page.php?bugnote_id=2513#r1259
2012-01-21 22:35Edward-sanNote Added: 0002514
2012-01-22 20:03Torr SamahoNote Added: 0002525
2012-01-22 20:05Torr SamahoStatusnew => feedback
2012-01-22 20:23MinigunnerNote Added: 0002527
2012-01-22 20:24MinigunnerNote Edited: 0002527bug_revision_view_page.php?bugnote_id=2527#r1261
2012-01-22 20:27MinigunnerNote Edited: 0002527bug_revision_view_page.php?bugnote_id=2527#r1262
2012-01-22 21:43WatermelonNote Added: 0002530
2012-01-22 21:43WatermelonStatusfeedback => new
2012-01-22 22:19Torr SamahoNote Added: 0002531
2012-01-22 22:19Torr SamahoStatusnew => feedback
2012-01-23 05:15WatermelonNote Added: 0002532
2012-01-23 05:15WatermelonStatusfeedback => new
2012-01-23 12:22Torr SamahoNote Added: 0002533
2012-01-23 12:24Torr SamahoStatusnew => feedback
2012-01-23 13:58WatermelonNote Added: 0002534
2012-01-23 13:58WatermelonStatusfeedback => new
2012-01-23 15:24WatermelonNote Added: 0002535
2012-01-23 15:24WatermelonNote Edited: 0002535bug_revision_view_page.php?bugnote_id=2535#r1264
2012-01-23 15:25WatermelonNote Edited: 0002535bug_revision_view_page.php?bugnote_id=2535#r1265
2012-01-23 15:34WatermelonNote Edited: 0002535bug_revision_view_page.php?bugnote_id=2535#r1266
2012-01-24 02:03Torr SamahoNote Added: 0002536
2012-01-24 02:03Torr SamahoAssigned To => Torr Samaho
2012-01-24 02:03Torr SamahoStatusnew => feedback
2012-01-24 04:17WatermelonNote Added: 0002537
2012-01-24 04:17WatermelonStatusfeedback => assigned
2012-01-24 04:18WatermelonFile Added: TrueColorTest.wad
2012-01-24 04:20WatermelonNote Edited: 0002537bug_revision_view_page.php?bugnote_id=2537#r1268
2012-01-24 04:26WatermelonNote Edited: 0002537bug_revision_view_page.php?bugnote_id=2537#r1269
2012-01-24 12:23Torr SamahoFile Added: TestDontTranslate2.wad
2012-01-24 12:25Torr SamahoNote Added: 0002538
2012-01-24 12:25Torr SamahoStatusassigned => feedback
2012-01-24 15:53WatermelonNote Added: 0002539
2012-01-24 15:53WatermelonStatusfeedback => assigned
2012-01-25 02:30Torr SamahoNote Added: 0002540
2012-01-25 02:31Torr SamahoStatusassigned => resolved
2012-01-25 02:31Torr SamahoFixed in Version => 1.0
2012-01-25 02:31Torr SamahoResolutionopen => fixed
2012-07-08 21:01DuskRelationship addedrelated to 0000910
2018-09-30 19:51Blzut3Statusresolved => closed

Notes
(0002476)
Torr Samaho   
2012-01-16 23:45   
I think that is a technical limitation because player sprites are always converted to the game palette to make them translatable. (G)ZDoom behaves exactly the same, doesn't it? If so, you should make a request for this at the ZDoom forum.
(0002477)
Dusk   
2012-01-16 23:58   
In the mean time you can use a custom playpal as a workaround for this.
(0002478)
Watermelon   
2012-01-17 18:12   
Damn, to ZDoom I go. I assume this topic locked then?
(0002491)
Blzut3   
2012-01-19 18:40   
I'm fairly certain this has been brought up before and that it was rejected because, as Torr said, true color images are not translatable. I'm going to go ahead and let Graf respond to the ZDoom thread however.
(0002494)
Watermelon   
2012-01-20 04:09   
I just checked with the latest GZDoom revision:
'http://mancubus.net/svn/hosted/gzdoom/ [^]'


When I run the wad "TestDontTranslate" in the latest GZDoom, it shows the exact sprite in GZDoom as per true color.
In skulltag however, it turns all gray again.

It seems that GZDoom does allow palette translation. Therefore, maybe can it be backported from GZDoom since Skulltag I assume borrows from GZDoom for its OpenGL abilities?
(0002496)
Dusk   
2012-01-20 13:15   
Problem is that the license change in GZDoom forbids Skulltag from using anything new from GZDoom, at least, before the open sourcing happens.
(0002498)
Watermelon   
2012-01-20 15:07   
Therefore the only question I have before this would be locked is:
Would it be possible to do it without backporting anything from zdoom-- like adding it in by one's own code, since this is a GZDoom feature or rather OGL feature after all?
(0002505)
Torr Samaho   
2012-01-21 15:13   
Can somebody check if GZDoom 323 behaves like Skulltag in this regard? If it does, we will need to find out in which revision GZDoom changed this behavior and then we can think about backporting the change.
(0002513)
Watermelon   
2012-01-21 21:08   
(edited on: 2012-01-21 21:17)
323 behaves like skulltag and does not translate player sprites to true color.

If you want, I can go through all the revisions and find out which revision GZ added in the thing were looking for.

Or is it only for up to 323 and then the licensing stuff takes effect?


EDIT: If you want me to go through them all, I'll need a link for the list of .zip's to go through.

(0002514)
Edward-san   
2012-01-21 22:35   
It's sad that the svnweb is down, else it would be easier to track down the right version.
(0002525)
Torr Samaho   
2012-01-22 20:03   
> Or is it only for up to 323 and then the licensing stuff takes effect?

Don't worry about the license for now. Before we can say something about this, we need to know what exactly was changed in GZDoom.

> If you want me to go through them all, I'll need a link for the list of .zip's to go through.

I don't know of any binary archive that includes all the builds you'd need for this. Most likely you will have to compile the GZDoom revisions yourself (or find somebody who does it for you).
(0002527)
Minigunner   
2012-01-22 20:23   
(edited on: 2012-01-22 20:27)
It seems that Skulltag forces the palette on player sprites so that any color that is within the green range can be translatable. Otherwise, there would be a major compatability issue with true-color PNG's and custom palettes. If necessary, any color that matches the RGB values of one from the IWAD and/or PWAD palette's 112-127 range (or other range if specified) should be the only colors translated.
One useful application for this would be for the ability to use green blood/monster parts in Brutal Doom without translations occuring during fatalities.

(0002530)
Watermelon   
2012-01-22 21:43   
@Torr:
Do you know where I can get the builds? I can compile them myself, when I find the version I will report back to you
If I find it, would you like me to upload the compiled binary and source of the revision before it was fixed and then the immediate version after it was fixed?

@Minigunner:
This makes me think we'll need a flag of some sort, like +NOPLAYERTRANSLATION, just because in this case when using true color I don't want the player to translate the graphics.
(0002531)
Torr Samaho   
2012-01-22 22:19   
> Do you know where I can get the builds?

Here:'http://mancubus.net/svn/hosted/gzdoom/trunk/ [^]' Just use an SVN client to obtain any revision you'd like to compile.

> If I find it, would you like me to upload the compiled binary and source of the revision before it was fixed and then the immediate version after it was fixed?

It's sufficient if you tell me the revision number of the fix. I can get the source code differences directly from the GZDoom SVN repo then.
(0002532)
Watermelon   
2012-01-23 05:15   
After lots of fun compiling:
GZDoom rev 742 = No to true color translation
GZDoom rev 743 = Yes to true color translation

If this does somehow get integrated into 98e, or even some beta build, I'd probably shift the whole game from 98d to 98e beta if a build gets released with this included.
(0002533)
Torr Samaho   
2012-01-23 12:22   
Alright, this seems to go back to ZDoom revision 2173:
- added an option to disable player translations in single player games.

That means that this is explicitly only supported in single player. Please check if it works in GZDoom in multiplayer.
(0002534)
Watermelon   
2012-01-23 13:58   
Interesting:
- GZDoom rev 743 does not support true color online
- GZdoom's latest revision does support true color online!

Looks like I'll be doing more compiling to find it out

In the mean time (in case you check back before I'm done all the compilations), is there anything else that I can do for you... like maybe finding the possible name of any switches or settings that help here, or maybe pasting the svn-log here of the version that has it? Don't know if there's anything in addition I can do here realistically to make your life easier.
(0002535)
Watermelon   
2012-01-23 15:24   
(edited on: 2012-01-23 15:34)
It appears that GZDoom rev 744 allows true color online; whereas rev 743 implemented single player true color

Don't know if this helps or not:
r744:
- let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to default player color handling.
- Setting a Player.ColorRange now completely disables the translation rather than just making it an identity map.


EDIT: When googling it, ZDoom r2198 seems to come up with having MF2_NOTRANSLATE if that helps

(0002536)
Torr Samaho   
2012-01-24 02:03   
Alright, I backported the change from ZDoom revision 2198 and made some adaptions so that it should also work in Skulltag online. If you give your player class the DONTTRANSLATE flag, it should work as you want it to. Please test this binary and report back.
(0002537)
Watermelon   
2012-01-24 04:17   
(edited on: 2012-01-24 04:26)
Code that I used:'http://pastebin.com/1Wxw8aXv [^]'

I loaded the binary in Doomseeker, and made sure that I joined the server seperately. It did not seem to translate right, this was the result:
'http://img254.imageshack.us/img254/9732/screenshotdoom201201232.png [^]'

That was me staring at another connection to my own server [which is staring into the mirror]

Could there be something I'm missing? Do I need any other flags?
I've uploaded the exact wad that I've used "TrueColorTest.wad" in case you wanted to try yourself. I will of course do any further testing that you would like me to [which should make it easier on you]


EDIT: Inside MAP01 is replaced with a mirror, just in case you do an online test yourself you don't need to enable sv_cheats or anything for a chasecam

(0002538)
Torr Samaho   
2012-01-24 12:25   
I attached the wad that works for me (TestDontTranslate2.wad), I just noticed that it only works in OpenGL though. Does it work in ZDoom with the software renderer? If so, there have to be other ZDoom changes missing.
(0002539)
Watermelon   
2012-01-24 15:53   
I apologize, I screwed up. My build was running software (I always use OGL so I accidentally assumed it was running OGL).

Confirmed! Works online, works offline. Awesome... thanks so much for this.
(0002540)
Torr Samaho   
2012-01-25 02:30   
I'm glad to hear that! I commited the code to our repository, so it will be in the next official beta build.