[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/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 - [Engine Standard] Water Alpha

[Engine Standard] Water Alpha

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

Moderator: InsideQC Admins

[Engine Standard] Water Alpha

Postby mh » Wed Aug 18, 2010 10:02 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby leileilol » Wed Aug 18, 2010 10:05 pm

leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby mh » Wed Aug 18, 2010 10:17 pm

Hard-coded texture names in the engine. Surfs with textures beginning with *rtex078 or *lowlight get r_wateralpha, the rest don't.

I would hope nobody suggests taking that up as a standard... :evil:
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby dreadlorde » Wed Aug 18, 2010 10:43 pm

Lava is not transparent. Slime and teleporters could be transparent, depends on the mapper.
User avatar
dreadlorde
 
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am

Postby Baker » Wed Aug 18, 2010 11:07 pm

Lava, slime and teleporters ideally shouldn't be transparent. But, well, they are! :(

r_wateralpha shouldn't ideally have settings. It should be on or off. And something like the automatic water transparency code should be used to detect if it exists. Then again, it does have settings. :(

I personally don't think r_shadows should have settings, either they are on or they are off. And some particular setting should be "the one".

I guess what I am saying is that Quake is going to be Quake, but a mod or total conversion can make whatever rules it wants.

Adding to the mix: fog in deathmatch maps = no ... unless you are going to do it in software too, otherwise you are putting GL users at an unfair disadvantage. That being said, everyone is probably going to turn fog off --- plus bots do not see fog.

Complicated post, yes? Valid concerns? yes. Kurok doesn't use alpha entities but rather Tomaz alpha textures. Which are superior --- just try to make a door that is glass with a solid metal non-alpha texture for the metal parts of the door = you can't = alpha is all or nothing, either the entity is alpha'd or not. :( But using Tomaz alpha textures, you can.

A big tangled ball of a mess.

Part of my message above: unless the map compiler is enforcing that lava is not transparent, an engine that takes advantage of the compiler making it transparent isn't guilty of a crime. This can matter in multiplayer.
Last edited by Baker on Wed Aug 18, 2010 11:14 pm, edited 1 time in total.
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

Postby leileilol » Wed Aug 18, 2010 11:12 pm

leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby mh » Wed Aug 18, 2010 11:57 pm

User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Spike » Thu Aug 19, 2010 12:05 am

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mankrip » Thu Aug 19, 2010 2:54 am

There are mods that sets the r_wateralpha cvar based on the value of a "wateralpha" or "r_wateralpha" field in the worldspawn entity.

IIRC, I've added engine-side support for this in Makaqu, so it will work for any maps that contains either of these fields, even if the progs.dat doesn't support them.

Also, I've made it to read these fields as strings, to make sure that a value of zero is possible, since "0" != "". If the string is null, the cvar is left unchanged.

IIRC, I've also added the same kind of support for setting sv_gravity.

Now, some fun facts. Usually, "water alpha" is simply weighted-mean color blending, but there are a lot of out there. In Makaqu, I've just implemented a more dynamic algorithm that reduces the loss of color fidelity when compared to the weighted-mean alphamap.lmp included in its latest releases, by dinamically calculating the weight of the alpha blending for each color combination, based on the tone of each color. So, no single alpha blending for the whole surface here.

Things like these makes me have the opinion that alpha blending should be defined first by its mode (which is given by the algorithm) and then by its intensity (which in some cases may be scaled by the r_wateralpha cvar, or by something else, such as entity fields). And then, there's also thickness-based alpha blending, which could (and probably should) replace r_wateralpha in engines that supports it.

Lava should definitely be opaque.

Slime in Quake is actually an undefined kind of toxic waste, which, specially in custom maps, may be meant to be either opaque or translucent. However, it's somewhat safe to agree that it's more dense than water, and therefore should be at least less translucent than it.

Quake's default portals shouldn't be translucent, but there are a number of custom maps that uses different textures for their portals. Anyway, making all of them opaque is a safer bet, since some custom maps doesn't have any geometry behind their portal surfaces.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Postby r00k » Thu Aug 19, 2010 3:55 am

For me water transparency is set with a minimum of r_wateralpha, then based on the distance of the pov to water surface determines the opaqueness.
Same with shadows, further away the less pronounced they get. But this is just my independent standpoint. r_wateralpha should only affect SURF_DRAWTURB, if someone wants to make an entity that looks like water then let .alpha determine it's level of transparency.
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Postby mankrip » Thu Aug 19, 2010 4:42 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

Postby Sajt » Thu Aug 19, 2010 7:03 am

F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby goldenboy » Thu Aug 19, 2010 3:29 pm

User avatar
goldenboy
 
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel

Postby mankrip » Thu Aug 19, 2010 4:25 pm

I think this discussion is not about forcing (the lack of) certain features on anyone, but about establishing sane defaults for those certain features.

[edit] Yeah, there's the multiplayer cheating aspect of it...
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Postby Spike » Thu Aug 19, 2010 4:42 pm

QuakeWorld has a serverinfo key which acts as a wateralpha cap. By default (missing) it means fully opaque. As a result, noone uses wateralpha, because they can't. At least its fair for the software users, but I don't know of anyone that still uses sw rendering.
Something that bypasses that default would be nice to QuakeWorld players, at least.
Last edited by Spike on Thu Aug 19, 2010 4:52 pm, edited 1 time in total.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest