[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 - .lit2 format - request for feedback

.lit2 format - request for feedback

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

Moderator: InsideQC Admins

Re: .lit2 format - request for feedback

Postby mh » Wed May 20, 2015 11:20 pm

Most of this is @ericw

I suggested including texturemins as well as extents, which may have gotten lost in the noise. That would bring a struct to an equally odd 17 bytes (assuming short). It's hard to see where one byte could be saved (or what else could be used to usefully pad the struct) since everything else is either trivially calculated, dependent on run-time stuff, or not relevant to lighting. The only thing I can reasonably think of is a 3-byte compressed normal, but that can also be taken from surf->plane (and flipped for planeback), and is something that most people won't even use.

Either way, it's looking more like "accept the implementation annoyance on technical grounds" is going to be the lesser evil.

Anyway, the reason for also including texturemins is that it's value is dependent on the same "dot (v, s->texinfo->vecs[j]) + s->texinfo->vecs[j][3]" as produces weird results with extents. I'm not sure if this is even a problem with texturemins, or if it's only extents that need to be corrected. That aside, including texturemins would allow an implementation to skip over CalcSurfaceExtents entirely, which may give a slightly faster map load (something I think is worth trading a little extra disk space for). My research engine also calculates surface bounds in CalcSurfaceExtents, but I can push that to polygon building time just as easy.

My other comments about extents in my previous post were an implementation fault on my part, so you can ignore them.

Bug: offsets needs to be int, not unsigned int, because -1 is a valid offset (indicating that the surf doesn't have any lightmaps).

I've been following the func_msgboard discussion, but since most of it is mapping oriented I haven't really participated.
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: .lit2 format - request for feedback

Postby Spike » Thu May 21, 2015 12:26 am

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

Re: .lit2 format - request for feedback

Postby Baker » Thu May 21, 2015 3:18 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: .lit2 format - request for feedback

Postby mh » Thu May 21, 2015 7:59 am

A hand-coded bicubic filter in a fragment shader works well for smoothing out stair-steps, it's probably the best you're going to get outside of just using higher resolution source data.

It's slower than regular texture lookups.

Because multiple lightmaps are packed into a single texture they tend to bleed into each other at the edges of surfaces.

And it suffers from the same fundamental problem as any kind of upsampling. With digital data, once something is lost it's gone for ever. So while you can smooth out blockiness, you're not going to be able to restore fine detail. Stuff like this:

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

Re: .lit2 format - request for feedback

Postby mankrip » Thu May 21, 2015 5:59 pm

I downloaded the current source and binaries and will try to implement the lightmapped turbulent surfaces. I just hope my setup consisting of an old version of Code:: Blocks + MSVC Toolkit 2003 & MASM will be able to compile 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

Re: .lit2 format - request for feedback

Postby mankrip » Fri May 22, 2015 4:09 pm

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: .lit2 format - request for feedback

Postby ericw » Fri May 22, 2015 10:29 pm

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

Re: .lit2 format - request for feedback

Postby mankrip » Sun May 24, 2015 9:04 pm

:) Thanks, I'll try 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

Re: .lit2 format - request for feedback

Postby mankrip » Tue May 26, 2015 10:57 am

I was looking through the tyrutils source code, and then "Wait, what's that?".

:oops: Its qbsp's -splitspecial option does what I need. It's overkill since it will also split sky surfaces, but that's not a big problem; what matters is that it does the job.

:oops: I'm sorry for kinda hijacking this thread with this. And I didn't have anything to contribute to it, but I trust you guys will make the right decisions.

When the .lit2 specs are finalized I'll try to implement 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

Previous

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests