Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: mori on July 26, 2013, 05:47:01 pm

Title: Waht is better for performace
Post by: mori on July 26, 2013, 05:47:01 pm
A lot af separate materials with small (32*32 for example) textures,
or one big 1024*1024 atlas?

Now i havent found a way to atlas a big texture, i don't know how to
mark area for using it in material.
Title: Re: Waht is better for performace
Post by: cameni on July 28, 2013, 05:50:00 am
Separate textures cause extra calls so it's usually better to atlas them. I'm not sure how does it work with atlasing different materials into one texture though, that's a question for angrypig. In any case, you don't mark anything in the material, it's addressed only by the uv coordinates in meshes.
Title: Re: Waht is better for performace
Post by: mori on July 28, 2013, 05:53:00 am
Separate textures cause extra calls so it's usually better to atlas them. I'm not sure how does it work with atlasing different materials into one texture though, that's a question for angrypig. In any case, you don't mark anything in the material, it's addressed only by the uv coordinates in meshes.

problem with that approach is that you cant tile.
Title: Re: Waht is better for performace
Post by: cameni on July 28, 2013, 05:55:57 am
Sure, if you need tiling you can't use atlasing - no hw supports that, it's not specific to OT.
Title: Re: Waht is better for performace
Post by: mori on July 28, 2013, 06:33:27 am
So what to do?
The more im thinking about it the more uncertain i become.
You need tiling, for sure. But tiling means more drawcalls.
Should i avoid tiling at any costs? And use atlas? But then the resolution
of a texture is eather very bad, or high vram usage because of texture size.

Here is two examples.
Folder with the house i made
(http://i.imgur.com/YIFNw4a.png)

1,54 megabytes
for everything
textures vary from 16*16 to 512*512


Standard house provided with anteworld
(http://i.imgur.com/hnFyIQL.png)

15 megabytes, textures from 512 up to 2048 x 2048

no tiling used, and textures are tiled and wrapped before baking,
and a lot of redundant space because of that.


so it's 2 different approaches, which one to chose.
Maybe my tryings to save memory is just not needed, maybe outerra
can handle such large textures with fractal algorithms or something.




Title: Re: Waht is better for performace
Post by: cameni on July 28, 2013, 06:43:28 am
It's not such a big problem, definitely not needed to avoid tiling. It's a balance between the texture size and texture switching calls. In OT the texture size is usually a bigger problem, because of the large world scale and many objects needed to populate it. In that regard, small tiled textures are better.

What the renderer actually does is that it takes as many textures as it can and binds them into available texture slots. On Nvidia there are lots of them (like 192 or something), on ATI/AMD there are fewer (like 32). Some of texture slots are used by the shaders, so not all of that can be used.
Now if all the textures of a model can't be batched, it needs another set of calls, which impose a small penalty.

So in general - atlas the textures that are not tiled, make the tiled textures small, optimize for memory consumption.
Title: Re: Waht is better for performace
Post by: mori on July 28, 2013, 06:50:19 am
^^^^^^^^^^^^^^^^^^^^^^^^^^^
must go straight to wiki

Also i get how to optimize what i do.
I need to group nontiled texures by material.
So it means one atlas for all windows (because they share same properties across all windows)
one for metals one for simple diffuse, and so on.
This way i will achieve best results.

Also i know this is off-topic but please add support for overlay texture for baked ao.
Please.  :'(
Title: Re: Waht is better for performace
Post by: ZeosPantera on July 28, 2013, 11:34:19 pm
yes
Title: Re: Waht is better for performace
Post by: krz9000 on July 29, 2013, 11:11:48 am
id prefer deferred rendering with lightmaps and ssao :P
Title: Re: Waht is better for performace
Post by: Chaoz on July 29, 2013, 12:50:15 pm
and i'd like a pony...
Title: Re: Waht is better for performace
Post by: Jagerbomber on July 29, 2013, 06:20:13 pm
<insert MLP image>