[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/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 water surfaces

lit water surfaces

Discuss the construction of maps and the tools to create maps for 3D games.

Moderator: InsideQC Admins

lit water surfaces

Postby taniwha » Mon Jan 07, 2013 1:28 pm

Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Re: lit water surfaces

Postby leileilol » Mon Jan 07, 2013 8:48 pm

SW's wouldn't be too hard, although you'd have to ditch the turbulence for the regular spans and/or make new translucent spans.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: lit water surfaces

Postby Spike » Mon Jan 07, 2013 11:43 pm

doesn't matter whether the compiler accepts it or not when the mapping tool doesn't know to generate it.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: lit water surfaces

Postby taniwha » Tue Jan 08, 2013 2:41 am

The point of the post was to come to agreement on the feature's implementation and establish a "standard" so map tools can be appropriately modified.

If no-one has any input, I'll just go ahead and do as I see fit :) (of course, adding the necessary features to my blender map-edit addon once I get it to a usable state).
Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Re: lit water surfaces

Postby Spike » Tue Jan 08, 2013 3:26 am

okay then, how does this work with shaders?
shaders that don't specify a lightmap texture will never be lightmapped, while shaders that do will always be lightmapped.
that, combined with editor support, is why I'd prefer qbsp to do it all on the name (either directly or by parsing shader files like q3map2 already does).
that said, forcing .alpha stuff is already annoying enough.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: lit water surfaces

Postby taniwha » Tue Jan 08, 2013 4:00 am

My intention is only to control the state of TEX_SPECIAL. light uses TEX_SPECIAL to disable lightmap generation. The engine's only use of TEX_SPECIAL is to disable the bad extents check. Lightmap availability is determined by the value of dface->lightofs (-1 -> NULL, else lightdata + lightofs). With lightmap data available, the shader would be free to choose whether to render with lightmaps or without. !lightmap == !choice.

So, how it affects shaders: it gives shaders the choice of whether or not a surface should be lit, at the penalty of restricting the size of the surface. Strategic bsp cuts should take care of that, though.
Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Re: lit water surfaces

Postby mankrip » Fri Oct 17, 2014 10:29 am

It seems this wasn't implemented, at least on the light tool.

The better way would be to implement it in the light compiler, and not in the BSP compiler, so we could easily recompile the lights of already-compiled maps.

I'm going through the in-engine compiler route. The engine will compile the lightmaps of the turbulent surfaces only, so it should take a fraction of the time that a full recompile would take.

Most of the work has been done yesterday. The only part of the light compiler code left to port to the engine is the trace.c file.

An interesting side effect of this in-engine approach is that it will leave the rest of the lightmaps intact, so the rest of the map's surfaces will not be affected.
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 water surfaces

Postby rebb » Fri Oct 17, 2014 5:01 pm

Would it be worth wrapping this in an additional file, akin to the concept of LIT files, but containing lightmapping data and information about which surfaces the data belongs to ?

That way it wouldn't be necessary to compile it into the BSP file, avoiding the danger of non-supporting engines possibly choking on "special-lit" maps.
Instead engines with support could simply check if a "special-lit" file exists of the same name when loading the map and apply the data accordingly.

It would also allow adding such "special-lit" files to existing maps without touching the rest of the lighting ( -onlyspecial switch in light compilers ? ).
rebb
 
Posts: 3
Joined: Tue Aug 28, 2012 9:18 pm

Re: lit water surfaces

Postby mankrip » Fri Oct 17, 2014 5:18 pm

Cascading LIT files, you mean.

I don't think that's necessary. The vanilla software renderer ignores the lightmap data on such surfaces, and I bet the GL renderer does the same, so there's no risk.

My approach doesn't modify the BSP files — the compiled lightmaps are stored directly in the RAM, so they're compiled every time the map is loaded, and they're never exported.

It wouldn't be hard to combine them with the rest of the lightmaps and export everything into a new LIT file, but I think the correct approach would be to modify the light compiler tools instead.
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 water surfaces

Postby rebb » Fri Oct 17, 2014 6:23 pm

Very similar to LIT files, but additionally it would contain information about which face(s) the lightmaps belong to etc.

Afaik, LIT files only contain raw lightmap colors without any information about which surface the data belongs to, but since it has the same basic layout as the non-RGB lightmap data in the BSP, the engines can just bend some pointers and read it correctly from LIT.

All that would have to be done in whatever compiles the lightmaps of course.

Just food for thought anyway, looking forward to what you are cooking up !
rebb
 
Posts: 3
Joined: Tue Aug 28, 2012 9:18 pm

Re: lit water surfaces

Postby mankrip » Sun Oct 19, 2014 5:11 pm

It's being harder than expected. It causes stack overflows if run right after the BSP model has been loaded, and the differences in data structures from the light compiler to the engine renderer makes the porting work quite messy. And tracing the distances in 3D space is a mess of its own — SV_RecursiveHullCheck can't be used so early, and the trace.c code makes the stack overflow even earlier.

This needs to be severely optimized.
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 water surfaces

Postby mankrip » Sat Nov 01, 2014 10:04 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


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest