[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/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 - _wateralpha and other worldspawn keys proposal

_wateralpha and other worldspawn keys proposal

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

Moderator: InsideQC Admins

_wateralpha and other worldspawn keys proposal

Postby ericw » Thu Aug 14, 2014 9:36 pm

Last edited by ericw on Fri Aug 22, 2014 11:03 pm, edited 4 times in total.
ericw
 
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: _wateralpha and other worldspawn keys proposal

Postby Baker » Thu Aug 14, 2014 10:39 pm

Ah, I knew this day would come.

And I'm not sure what to say.

This kind of discussion came up a couple of years ago and the main thought is that it could lead to infinite worldspawn keys.

[When possibly the real problem is that engines can't detect if the map are vised for transparent water or not.]

I'm not really sure what to think, the problem is real. Doesn't fix this for any of the thousands of existing maps :(
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: _wateralpha and other worldspawn keys proposal

Postby leileilol » Thu Aug 14, 2014 11:05 pm

All 3 are also possible to implement in Engoo (software renderer engine). I would have to change the water drawing code to point to different calculated translation tables (generated on map load) depending on content. Skyfog is even doable very easily by applying a color blend to the sky texture itself on load without any additional rendering code.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: _wateralpha and other worldspawn keys proposal

Postby Spike » Fri Aug 15, 2014 5:25 am

> If the player changes the “r_wateralpha” cvar while the map is running, the engine should switch to using that value until the map is reloaded. This allows for interactive tweaking by a mapper, or lets the player override the value if they don't like the mapper's choice.

the way you implemented that makes me uneasy.
it depends upon other engines having callbacks for when a cvar was modified. it seems clumsy.
its also lots of extra functions. I don't like lots of extra functions, even if they're just one line long. seems messy.

> specifying 0 for the _lavaalpha/_telealpha/_slimealpha worldspawn keys doesn't actually cause the alpha to be set to 0 for those textures, but means "fall back to the wateralpha value".

this is dangerous. use -1 to flag it as unspecified if needed. you may even want to avoid using a float to flag it active/inactive. a bitfield instead or something.


one question: what about 'pretty water' stuff, with a global enable that enables both reflection and refraction (the warpy transparenty view). in this case you don't want to be drawing some ugly water surface over the top, ruining the effect.
which feature wins? :s


needs a test-case, because I'm too lazy to make maps myself.



@baker
.ent files.
detecting watervis won't help you if the water is meant to be 20% visible on one map and 60% on annother, nor if the use has the cvar set to 1 because vanilla water was never meant to be transparent (and they can't be arsed to delete their vis patches).
of course, you can't have one brush with one translucency and another with a different setting with this, unless of course if you make one slime and another a teleporter, but that just gets really messy.
but you know someone is going to do it anyway... :s
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: _wateralpha and other worldspawn keys proposal

Postby Baker » Fri Aug 15, 2014 9:28 am

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: _wateralpha and other worldspawn keys proposal

Postby mankrip » Fri Aug 15, 2014 10:46 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: _wateralpha and other worldspawn keys proposal

Postby leileilol » Fri Aug 15, 2014 2:21 pm



It would suck if you die in a level, reload, and see the water get opaque and the fog disappear


Also I believe _keys should override the cvar when available, and not actually change the cvar itself.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: _wateralpha and other worldspawn keys proposal

Postby qbism » Fri Aug 15, 2014 4:59 pm

Per texture in a vanilla-compatible texture name... Somehow...
*water-hey-I-am-35-percent
*water-some-other-muddy-water-yo-70-percent
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: _wateralpha and other worldspawn keys proposal

Postby leileilol » Fri Aug 15, 2014 5:07 pm

or you could shoehorn in a hexadecimal at the end followed by some symbol.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: _wateralpha and other worldspawn keys proposal

Postby ericw » Fri Aug 15, 2014 7:21 pm

ericw
 
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: _wateralpha and other worldspawn keys proposal

Postby ericw » Fri Aug 15, 2014 7:34 pm

ericw
 
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: _wateralpha and other worldspawn keys proposal

Postby ericw » Fri Aug 15, 2014 8:07 pm

ericw
 
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: _wateralpha and other worldspawn keys proposal

Postby Baker » Fri Aug 15, 2014 9:21 pm

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: _wateralpha and other worldspawn keys proposal

Postby mankrip » Sat Aug 16, 2014 12:41 am

Last edited by mankrip on Sun Aug 17, 2014 7:28 am, edited 1 time in total.
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: _wateralpha and other worldspawn keys proposal

Postby qbism » Sat Aug 16, 2014 1:40 am

per-texture exceptions in worldspawn-
wateralpha 0.33
slimealpha 0.50
lavaalpha 1.00
texalpha *watermud 0.66
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests