[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/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 - Lit liquids

Lit liquids

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

Moderator: InsideQC Admins

Lit liquids

Postby mankrip » Fri Sep 16, 2016 2:56 am

How hard would it be to implement support for lit liquids in hardware-accelerated engines? In software rendering it's easy, but software-rendered engines will never be the main target for any mapper nowadays.
Image

I am really not aware of the technical difficulties, since I've never tried to learn how hardware-accelerated engines works. All that's needed is to draw both the lighting and the liquids in a single pass, using turbulent projection for the liquid texture and regular projection for the lighting, and combining them together before blending them into the framebuffer.

Support in mapping tools is almost there. The latest TyrUtils needs liquid brushes to be compiled as func_detail with _dirt -1, but hopefully this won't be needed anymore in the next versions.

I remember Spike saying that FTEQW also supports this, but several other engines would also need this feature.
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: Lit liquids

Postby Spike » Fri Sep 16, 2016 2:40 pm

it depends on the implementation.
FTE just uses glsl for water, so its just a case of providing it with a second texture+texcoords that it can sample from just like any other lit surface.
Without glsl, you just need to use multitexture to combine(modulate will do it, which saves trying to use register-combiners - this is separate from glBlendFunc) the two textures before it hits the screen (that's the glBlendFunc part). again two sets of texture coords. In vanilla its really no different from other lit surfaces, just with some per-vertex texture coord modifications.
On the other hand, quakespasm's crazy render-to-texture implementation is crazy, but it should be fine to just sample from that warped texture in exactly the same way as any unlit surface.

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

Re: Lit liquids

Postby ericw » Fri Sep 16, 2016 5:53 pm

Just made a commit to tyrutils-ericw so lit liquids never receive dirtmapping
ericw
 
Posts: 92
Joined: Sat Jan 18, 2014 2:11 am

Re: Lit liquids

Postby Baker » Fri Sep 16, 2016 10:09 pm

@mk --- working with the software renderer is hard. OpenGL is easy.

You could use this FitzQuake 0.85 that compiles by just pressing F5 () . You just open the project and click Build and you are in business instantly.

Has a project file for multiple IDEs (vc6, free Visual Studio 2008 ( | ), CodeBlocks+MinGw ().

Rendering code for the .bsp is nearly the same as Quakespasm.

You might be able to stir up the masses with a demonstration in an engine that the Func crowd is familiar with where they could play with it.

/One thought ... I'm not often right about these things. :mrgreen:
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: Lit liquids

Postby toneddu2000 » Sat Sep 17, 2016 7:37 pm

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Lit liquids

Postby Baker » Sun Sep 18, 2016 8:51 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: Lit liquids

Postby toneddu2000 » Mon Sep 19, 2016 11:28 am

Are you the author of FitzQuake engine? If so, wow, compliments! It's very well written (I can't consider myself a real programmer but I can now understand good code structure)! :biggrin:
- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Lit liquids

Postby Baker » Wed Sep 21, 2016 4:21 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: Lit liquids

Postby toneddu2000 » Wed Sep 21, 2016 7:16 am

- my first commercial game, made with FTEQW game engine
toneddu2000
 
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Lit liquids

Postby Baker » Fri Sep 23, 2016 6:21 am

@mk

You like .lit water.

Why not recompile start, e1m1 through e1m8, with lit water and throw in a zip.

Then do a release @ func of called "Lit water shareware episode"

Works with FTEQW (link to current engine executable since current version is hard to find, and now FTEQW is pretty classic feeling when you are playing the game) and DarkPlaces.

Then people could play with it.

Who has seen it in action? You. Spike. Maybe ericw. And no one else in the known universe.

Maybe if people experienced it ....
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


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest