[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/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 - Fullbright textures..

Fullbright textures..

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

Moderator: InsideQC Admins

Fullbright textures..

Postby Downsider » Mon May 03, 2010 2:05 am

Been messing around with this for a while. I want texture with the prefix "fb_" to be unaffected by the lightmap, but for some reason I can't figure it out.

Hopefully someone else can help me out here :/

No matter what I do, the lightmap either still renders on top of it, or the engine just takes a shit whenever the specific brush enters the player's PVS.
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby Spike » Mon May 03, 2010 2:35 am

replacement texture names:
mytexture_luma
mytexture_glow
one of them, depends on which engine you're using
some engines will use alphablending, others will use alpha testing. if you want it to look identical in both sorts of engines, use only 0% or 100% alpha, not anything between. Just avoid < 5%.

legacy textures:
the quake engine 'blends' lighting by looking it up in a table - the colormap.
Actually, GL engines don't use the colormap though. Instead most expect the last 32 palette indexes to be fullbright, and the others not (FTE attempts to look at the colormap to see how many were meant to be fullbright). This behaviour matches the output of software, but can fail if you have mods using custom palettes/colormaps. ID's glquake does not support fullbrights at all, thus you need a modified engine to get fullbrights in GL.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Downsider » Mon May 03, 2010 2:39 am

Yeah, mate, I threw this in the Engine Programming subforum because I'd like to add it to my engine, heh.

I've looked through the brush loading code, as well as brush drawing, and I can't really figure this out. For the sake of argument, where would one have to look to add this to an unmodified GLQuake?
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby Spike » Mon May 03, 2010 3:10 am

you would have to generate new textures.
find the pixels with 224+ values and pass them through unmolested. for everything else, clear out the alpha channel to 0.
then upload those 32bit textures.
the add an extra pass to the entire world where you draw only those fullbright textures, after any lightmapping effects.
on anything with more than 2 tmus you can use register combiners/multitexturing. set up the first three stages to do texture*lightmap+fullbright. and that should work on anything past a geforce2.
But yeah, multitexture isn't required. You can just enable blending and do it as an extra pass. GL is state-based so you'll need to undo state changes in order to fix the rest of the scene again.

Ideally, choose an engine that already has ARB multitexturing implemented and optimised.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Downsider » Mon May 03, 2010 3:29 am

The PSP engine does lighting in a second pass. That's the engine I'm working with. Can't I simply mark certain textures as fullbright and ignore the second pass on them?

glpoly_t surface flags?
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby Spike » Mon May 03, 2010 9:43 am

probably.
however, consider that that requires the entire texture to be full bright.
consider a dark room... actually, consider any room in quake... it has a light. a nice fullbright light. and the textured fitting around the light is just as bright as the bulb. but the floor right next to it is dark.
perhaps a better example is the fullbright runes on maps like dm4. but hey :)

you'll need to provide some way to tag such a fullbright texture as fullbright. by name would work, I suppose. check the miptex_t's name at load time and set a flag on the surface to skip it when rendering the lighting pass after.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby metlslime » Mon May 03, 2010 5:28 pm

metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Postby Downsider » Mon May 03, 2010 11:25 pm

Again, lol, this is for the PSP.

I'm really only using this for a strange case in which I need it in order to accomplish a special effect I'm trying to replicate from another game. Honestly, I could even be doing it on the compiler's end and it wouldn't make a difference.

And, well, what I've been doing has been working from the start. I just thought it wasn't fullbright for some reason :roll:
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby ceriux » Tue May 04, 2010 2:18 am

lol downsider you should never doubt yourself , your too good at what you do.
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Downsider » Tue May 04, 2010 2:34 am

User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby ceriux » Tue May 04, 2010 9:15 pm

User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Downsider » Wed May 05, 2010 1:18 am

User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby ceriux » Wed May 05, 2010 1:28 am

User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Spike » Wed May 05, 2010 8:16 am

tor?... though I'm guessing half the entry points are blocked - but maybe not all
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby ceriux » Wed May 05, 2010 9:02 pm

every proxy site iv tried on google has been blocked .
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests