[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Mysterious Black Pixels

Mysterious Black Pixels

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Mysterious Black Pixels

Postby Ghost_Fang » Sun Aug 23, 2015 3:50 am

I'm not sure if this belongs here in Engine Programming or not. I think it does because the issue seems to be only apparent in my DQuake PSP engine. Other tools such as Crafty BSP viewer has no such anomalies. It appears to me that those might be "fullbright" colors not rendering right (to which i have no use for). This is a HLBSP map made in Hammer 3.5.3 and i don't use wadinclude. Has anyone ever experienced this and have fixed/remedied this?

In Game:
Image

Source Texture:
Image
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: Mysterious Black Pixels

Postby Spike » Sun Aug 23, 2015 5:24 am

HLBSP has per-texture palettes (meaning the last 32 indexes could be any colour). it also has no fullbrights.
it also has toolchain licensing issues.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Mysterious Black Pixels

Postby Ghost_Fang » Sun Aug 23, 2015 5:31 am

I figured as much, it was just a speculation i had because I first noticed it on a light texture that I have. I scrubbed through the engine to try to find ANYTHING about pixel manipulation i cannot find any.
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: Mysterious Black Pixels

Postby Ghost_Fang » Sun Aug 23, 2015 5:33 am

(cannot find the edit button if there is one anymore)
So what would be my issue then? Have you seen anything like this?
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: Mysterious Black Pixels

Postby Spike » Sun Aug 23, 2015 7:04 am

if its nulling out the last 32 palette indexes to black because they're within the last vid.fullbright pixels, and then not generating a fullbright image because its an hlbsp, then that might explain it quite well. its certainly possible.
engines are vastly different nowadays so I can't give you many more hints other than vid.fullbright or the number 32 if its hardcoded, or possibly 224. also check to see if it has some cvar to disable fullbrights (not to be confused with the fully-lit lightmaps, of course). good luck...
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Mysterious Black Pixels

Postby frag.machine » Sun Aug 23, 2015 1:24 pm

You can open the texture in any image editor and check the pixel colors to confirm (or discard) the palette theory. But if the dot patterns are constant in all places where the texture is used I can't think of any other suspect.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Mysterious Black Pixels

Postby ceriux » Mon Aug 24, 2015 2:43 am

perhaps it has to do with the texture compression used on psp engines?
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Mysterious Black Pixels

Postby drm_wayne » Tue Aug 25, 2015 3:53 pm

User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Mysterious Black Pixels

Postby frag.machine » Tue Aug 25, 2015 9:03 pm

Actually index 255 in Quake palette was always meant to be a transparent, null color (all 2D graphics such fonts, menu elements and even sprites use it this way). Kurok only extended the concept to alias models. The problem Ghost_Fang reported seems related to fullbrights, as Spike observed.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: Mysterious Black Pixels

Postby Spike » Wed Aug 26, 2015 12:20 am

conchars(read: quake's font) uses 0 for transparent. because special cases are fun.
and 255 is pink, not black.
255 is only 'black' if you consider it transparent, in which case you should be using premultiplied alpha which results in pink*0=0=black. obviously this doesn't apply if its an 8-to-24 lookup table as that has no alpha channel and thus cannot be transparent and thus must be pink, not black.
not supporting premultiplied alpha will result in halos. yes, black halos are generally better than pink halos, but any kind of halo is still a bug - even the filling described below would be preferable to black halos.

For bsp textures, palette index 255 is transparent ONLY if the texture's name has a leading {. Due to depth issues with alpha blending, premultiplied alpha is no longer reliable, and thus engines will probably switch to alpha testing, and in order to avoid obvious halos, these transparent pixels should be filled in with the average of their neighbouring (valid) pixels (but with alpha 0).

Note that halflife has PER-TEXTURE palettes, thus some bug inside your 'VID_SetPalette' function won't affect your halflife textures. Because of the filling described above, it shouldn't affect your q1 textures with { in them either, but it WILL affect valid q1bsp textures/skins that happen to use index 255.

Obviously, because halflife textures have their own per-texture palette, and halflife never supported fullbrights, any attempt to utilise fullbrights in said halflife textures is a bug.

Obviously there could be all sorts of bugs in random projects, but these are the most likely ones that I can think of.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Mysterious Black Pixels

Postby drm_wayne » Wed Aug 26, 2015 8:27 am

User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Mysterious Black Pixels

Postby Ghost_Fang » Mon Mar 07, 2016 3:43 pm

Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: Mysterious Black Pixels

Postby drm_wayne » Tue Mar 08, 2016 8:54 am

glad i could help ;)

you can also try to upload all 8bpp paltextures to the PSPGU with the built-in DXT compressor,
this will save alot of ram.
User avatar
drm_wayne
 
Posts: 232
Joined: Sat Feb 11, 2012 5:47 pm

Re: Mysterious Black Pixels

Postby Ghost_Fang » Tue Mar 08, 2016 10:54 pm

Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: Mysterious Black Pixels

Postby jitspoe » Sat Mar 19, 2016 2:11 am

#BlackPixelsMatter

Sorry. Couldn't resist.

jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest