[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 - Software Renderer Mysteries

Software Renderer Mysteries

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

Moderator: InsideQC Admins

Software Renderer Mysteries

Postby Baker » Sun Jul 27, 2014 3:09 am

For WinQuake ...

Does anyone know how to make brush model entities render with alpha? If I make the code stipple brush models with .alpha, behind them = void (like the software rendering code has decided what is behind it cannot be seen).

Has anyone done this successfully or know how it can be done?

.alpha is part of the Fitz 666 protocol and although I added Fitz 666 to a WinQuake , without .alpha maps like back2forwards (great test case!) won't look right.

Image

Thoughts?
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Software Renderer Mysteries

Postby Spike » Sun Jul 27, 2014 9:46 am

the software renderer's spans are drawn with no overdraw. it clips the polys against each other before filling in the screen.
then it draws depth after, just so mdls+particles+sprites work properly.
if you want transparent or translucent stuff, you'll need to move those surfaces into a separate rendering mechanism, to ensure the stuff behind is already drawn.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Software Renderer Mysteries

Postby leileilol » Sun Jul 27, 2014 2:00 pm

Quake2 even had this problem so they derived their translucent brush drawing code from the water spans code, making some very jumbled up glass textures as it worked strictly with 64x64 tiles. This is why that window in base1 right at the start looks corrupt, as well as other places such as bloody glass in the jail maps


Another place to research is Hexen II which absolutely ABUSED lookup table effects (among other crazy things like particle collision). Makaqu also got this to work with recursive translucency IIRC.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Software Renderer Mysteries

Postby Baker » Sun Jul 27, 2014 2:31 pm

Darn, that's what I thought. :( Thanks for the infos.

[Update: although on the plus side, digging through the Makaqu code ... I'll have to see how this works out ... crosses fingers.]

[Update2: Makaqu hates the back2forwards QuakeC, crashes. Even if I do -game back2forwards +map e1m1 ....]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Software Renderer Mysteries

Postby Baker » Sun Jul 27, 2014 3:13 pm

Documenting as I look around in the source:

r_main.c: Found r_foundtranslucency qboolean
r_draw.c: Several instances of same. Code in R_RenderFace.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Software Renderer Mysteries

Postby Baker » Sun Jul 27, 2014 3:43 pm

Grabbed quakec source, open defs.h + add .float alpha. Made .ent file deleting one door and adding "alpha" "0.5" to other:

Loads Makaqu ...

Image

Cool!

Image

Incredible!
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Software Renderer Mysteries

Postby mankrip » Mon Jul 28, 2014 12:16 am

Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: Software Renderer Mysteries

Postby mankrip » Mon Jul 28, 2014 12:55 am

By the way, even though translucent BSP entities doesn't blend with themselves, they do blend with each other.

Makaqu screenshot:
Image
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: Software Renderer Mysteries

Postby Spike » Mon Jul 28, 2014 3:36 am

to get depth working sensibly with the object itself:
draw the object's depth values.
draw the object's colour values using some depth test that draws with equality.

the further stuff will then safely be masked by the near stuff without drawing it.
perfectly viable in gl.
probably workable in software too, if needed (cache the spans!), but everything involving software rendering takes more time.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Software Renderer Mysteries

Postby mankrip » Mon Jul 28, 2014 5:37 am

Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: Software Renderer Mysteries

Postby Spike » Mon Jul 28, 2014 11:19 am

fte does, at least for transparent view models (two render-entities to not break custom shaders on the viewmodel), and q2 shells (quad/god glows around players, using a 2-pass shader for the shell render-entity). both look much better for it (fte's rendering code is nothing like glquake, so good luck copying it, its nothing like software rendering either, of course, which was the focus of this topic).
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Software Renderer Mysteries

Postby qbism » Sun Jan 11, 2015 4:25 am

User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Software Renderer Mysteries

Postby mankrip » Sun Jan 11, 2015 2:46 pm

I can't look at the code yet, my house is a mess.

Anyway, the problem lies in the spans sorting&clipping algorithm, which still is a mystery to me.
A way around that is to reinitialize the BSP renderer before drawing each translucent entity. I've done that in r_main.c.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: Software Renderer Mysteries

Postby qbism » Mon Jan 12, 2015 5:02 am

Thanks, that method got alpha entities working. Fence textures seem to work on bmodels but not the worldmodel. Might need a separate pass for fences. I'm working on support for the Rubicon Rumble Pack.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Software Renderer Mysteries

Postby mankrip » Tue Jan 13, 2015 2:59 am

Alpha masked texture support on the world BSP requires a number of complicated changes. I still have some major bugs to fix in it, and in the BSP entities too.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests