[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 - All map textures into a single atlas texture ?

All map textures into a single atlas texture ?

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

Moderator: InsideQC Admins

All map textures into a single atlas texture ?

Postby frag.machine » Fri Dec 14, 2012 3:49 am

Does anyone already tried this ? Is this even feasible at least in modern hardware ? more importantly, would it be worth the effort (in terms of performance gain) to justify all the required changes to the texture uploading and switching ? I was thinking about something similar to the lightmap atlas texture, only containing regular textures (plus respective mipmaps). I imagine that modern hardware, being able to handle 1024x1024 (and higher) textures would easily accommodate a good bunch of them in a few atlas, reducing the OpenGL state switch greatly. Opinions ?
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: All map textures into a single atlas texture ?

Postby ceriux » Fri Dec 14, 2012 3:53 am

i think it would be hard to properly align all of the textures at least for me in worldcraft/hammer it would take a ton of extra time. but i think it would be a cool experiment.

maybe easier done with that .map exporter i found for max. thats if it exports textures+alignment as well.
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: All map textures into a single atlas texture ?

Postby taniwha » Fri Dec 14, 2012 4:38 am

Well, I did it for lightmaps in QF's glsl renderer. I tossed all of the lightmaps into a 2kx2k texture (I have suitable sub-texture allocation code). Turns out e1m3 takes ~8% of the texture, so actual textures should fit for standard quake maps. As to the gains: the less you change state, the better.

However, there is one serious problem to doing an atlas texture: repeating textures. You would need to do fancy trickery in your shaders to work around the lack of hardware repeat.
Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Re: All map textures into a single atlas texture ?

Postby frag.machine » Fri Dec 14, 2012 12:47 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: All map textures into a single atlas texture ?

Postby frag.machine » Fri Dec 14, 2012 12:52 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: All map textures into a single atlas texture ?

Postby Spike » Fri Dec 14, 2012 3:45 pm

you would gain from being able to throw all surfaces onto the screen with the bsp tree ordering, meaning early-z optimisations would drastically reduce overdraw (assuming you do the same with lightmaps too). you'd also gain from a few less texture changes.
you can use texture arrays or perhaps 3d textures as a way around the wrapping issue, but that requires that each texture has the exact same dimensions.
you could chop up surfaces easily enough to cope with texture repeats. its not really that different from clipped decals, it is more geometry though, but you'll barely notice that. You would need a few pixels around the edge of the texture to handle mipmapped repeats however.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: All map textures into a single atlas texture ?

Postby mh » Fri Dec 14, 2012 11:47 pm

This is basically what software Quake does (and - when you think about it - it's not a million miles away from megatexture). Probably not a huge performance gain though, there's more to be had from more intelligent drawing of MDLs (and using such a method would give you big problems with external textures).
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: All map textures into a single atlas texture ?

Postby leileilol » Sat Dec 15, 2012 6:45 pm

A player atlas would be cool. Having all the 16 clients managed onto one texture page, with partial texture updates for color/skin changes much like the treatment of dynamic lights.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: All map textures into a single atlas texture ?

Postby Spike » Sat Dec 15, 2012 7:45 pm

surely its better to not need a separate texture for every player?
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: All map textures into a single atlas texture ?

Postby frag.machine » Sat Dec 15, 2012 8:55 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Re: All map textures into a single atlas texture ?

Postby mh » Sun Dec 16, 2012 12:27 am

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

Re: All map textures into a single atlas texture ?

Postby ceriux » Sun Dec 16, 2012 2:12 am

how would modders work with something like this?
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: All map textures into a single atlas texture ?

Postby taniwha » Sun Dec 16, 2012 5:55 am

Ideally, they wouldn't, as it would all happen behind the scenes and thus not even know it's happening.
Leave others their otherness.
http://quakeforge.net/
taniwha
 
Posts: 399
Joined: Thu Jan 14, 2010 7:11 am

Re: All map textures into a single atlas texture ?

Postby ceriux » Sun Dec 16, 2012 9:14 am

oh cool! id like to see if something like this were worth while.
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest