[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/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 - Transparency on Moving Entities (Quake2)

Transparency on Moving Entities (Quake2)

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

Moderator: InsideQC Admins

Transparency on Moving Entities (Quake2)

Postby jitspoe » Wed Jun 12, 2013 10:38 pm

Surely somebody has already fixed this and can save me the effort... If you use a transparent brush on something like a door, the transparent polygons stay in place while the door moves. Anybody know of some code or an engine that fixes this?

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

Re: Transparency on Moving Entities (Quake2)

Postby Spike » Thu Jun 13, 2013 12:14 am

transparent polys are added to some separate list when drawn. just the polygons, so they loose all context regarding their owning entity. which means they don't have the right matrix and can't move/rotate.

fte builds batch lists, ordered by blend mode and grouped by texture+entity. each batch retains the context of the render-entity thus any origin/angles/alpha/colormod/light directions/etc all carry through to the polys that need them.
the code is quite different from vanilla q2 though, so I don't know how useful knowing that is to you.

either build a per-entity list instead of a single global list for transparent surfaces, or just store a pointer to the owning entity with each surface and update the modelview matrix if that rentity pointer changes from one surface to the next.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Transparency on Moving Entities (Quake2)

Postby Barnes » Thu Jun 13, 2013 8:08 am

User avatar
Barnes
 
Posts: 232
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: Transparency on Moving Entities (Quake2)

Postby jitspoe » Thu Jun 13, 2013 5:50 pm


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

Re: Transparency on Moving Entities (Quake2)

Postby Knightmare » Sat Jun 15, 2013 6:55 am

This is one of the oldest Q2 rendering bugs that has a fix available. I think it was Quake2Max that first addressed it back in 2002. Hard to believe that R1GL still doesn't have this fixed.

Be sure to load the world matrix before caling R_RotateForEntity() for each surface, and again after the last one, or it will end up moving the first-person weapon model, too.

These bmodel alpha surfs aren't depth-sorted from traversing the BSP tree, so they will occlude others behind them (due to being stuffed at the front of the alpha chain). Various attempts to depth sort them failed, so I ended up just disabling the depth mask when rendering them.

You can also use this surface ent pointer to enable animated textures on both bmodel and world alpha surfaces (see my unofficial v3.24 patch source). The added pointer is only 4 bytes per surface, and the memory use increase is negligible compared to v3.20.
Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: Transparency on Moving Entities (Quake2)

Postby Knightmare » Thu Jun 27, 2013 11:08 pm

Knightmare
 
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests