Jump to content
Sign in to follow this  
meshcarver

Texture efficency question...

Recommended Posts

Hi all,

Just a simpe question, which would be preferable for efficeny/speed:

For a single object would it be better to have x1 2048 Or x2 1024s..?

Cheers guys,

Marc

Share this post


Link to post
Share on other sites

Well, for one, a 2048^2 texture is not 2 times larger than a 1024^2, it is 4 times larger. If you wanted a texture that was twice as large, it would be 2048 x 1024. In that case, it would be better to have just the one texture, not two. At the end of the day, for these projects, the texture set up that's easiest on you is the best one. Having many things on one map can get cumbersome.

Share this post


Link to post
Share on other sites

Thanks Max,

Aye, I did mean 1024/2048, my apologies!

Well, good to know its best to try to get all texture info on one sheet where it makes sense anyway.

Thanks for your answer man!

Marc

Share this post


Link to post
Share on other sites

Every time you put in another texture / material combination on a model you introduce a new 'section' on the model which necessitates a new direct x draw call. Direct x draw calls seem like they are one of the most important factors for performance. That said, I don't think the difference between 1 and 2 would be much to worry about.

Share this post


Link to post
Share on other sites

Thanks again man,

It must be quite awkward then for doing a large builging with about 5 or say 6 textures that have various materials too..?

Share this post


Link to post
Share on other sites

Yeah, if you have different materials, you may as well have a different texture as well... or, there's less reason not to. Or, you can try to fake different material properties through clever use of the maps already present in your shader: diffuse, spec, gloss, normal, etc. There's also the multimaterial shader, though, that I think blends two materials together with a alpha blending map that does everything on one draw call.

Share this post


Link to post
Share on other sites

Aye, I've read about that multimat somewhere...

Do you think its worth it to create say three metal mats for example, sort of generic ones, and try to stick to only these three where possible?

So as to reduce the amount of mats building up across the range of buildings/assets?

Edited by meanmachine1

Share this post


Link to post
Share on other sites

Well, keeping the texture count low will reduce the art workload. To be honest, I would do what you think is right for your first building and see if anything is reusable later. Each new kind of object in a scene means at least one new draw call anyways.

Share this post


Link to post
Share on other sites

Silly question but say if i have a log cabin that uses three textures, could i model another variant on that log cabin and have it use the same textures to save drawcalls, if you see what i mean?

So its just the polys that are different?

In effect, say I've five log cabins all with different layouts, but they all use the same three textures?

Obviously id be wanting to place them individually too...

Thank you for your replies man

Share this post


Link to post
Share on other sites

That's what I meant when I said different kind of object. I guess I didn't word it as clearly as I could have...

What I meant by 'kind of object' is the exact same object. So if you have several instances of the exact same object, then maybe ArmA can produce them in the same draw calls, as I understand it... if and only if ArmA has geometry instancing. So the possibilities as I understand them is if ArmA has instancing, then you can have several of the same exact model with no differences in the same draw calls, and if not, then every section in every object (or proxy) requires a new draw call.

Edited by Max Power

Share this post


Link to post
Share on other sites

Multimaterial is definitely the way to go when creating buildings.

It will simply allow you much much greater detail (px/m) without having eleventy billion _CO + _NOHQ + _AS maps

Ideally you will only require one multimat per building, consisting of:

  • _MC (Generic randomness, make sure to put some of _AS into this for better looks)
  • _MASK (Basically the texture saying where what has to go)
  • _AS (Ambient Shadow)

The rest of the textures used in the multimap (positioned and mixed with the help _MASK) can either be stored in your PBO and be reused for others, or directly taken from ca\structures\data\.

Here you can find a tutorial explaining the usage of the multi material.

And all in all this will only make use of a single section.

Share this post


Link to post
Share on other sites

Thanks for you answers guys.

I like the look of the multimat, but looking at the tut, it seems it has to be mapped 1 to 1 ..?

Is that correct?

If so, then the resolution is not going to be to good?

If I create a building, i normally do a texture sheet say 1024 x 1024 JUST of tilable brickwork, so to increase uv/texel density. But if i have to do same brickwork using this method, then the bricks will be more condensed, or have I misunderstood?

Share this post


Link to post
Share on other sites

Well, in the shader editor you can change the uv tiling per texture. I haven't played with the multimat myself, but it stands to reason you can use the alpha mask texture 1:1 and blend between two tiled textures, with tiling detail maps or what have you.

Share this post


Link to post
Share on other sites

...that seems a bit convoluted to get a tiling texture?

Actually i must've misunderstood it mate, ill hang fire until,i make one myself in game!

Edited by meanmachine1

Share this post


Link to post
Share on other sites

That's not 'what it takes' to get a tiling texture in game. That is 'what you can do' to tile multiple textures / materials blended together on the same polygon.

Share this post


Link to post
Share on other sites

...Ahhh, with you now man, my apologies.

In that case that actually sounds like a good solution... Im sorry but Ive just been building little assests upto now, when I start in on my first actual building, Ill probs use this method.

Thanks...

Share this post


Link to post
Share on other sites

Hi,

warming this topic up again with another question;

Say if I have a destroyed vehicle, an old rusted tank, but 3 poly versions of it for variation.

1 is intact, 2 has lost its turret and 3 has lost its turret and tracks (So, three models in all, each individual as regards placing them and .pbo wise)

Now, if they ALL use the same texture if I placed each of them within say 20 meters of each other, would that texture be a catalyst for three draw calls, or would it use only one..?

If it uses three, then I might aswell have object specific textures even when they're not visually necessary..?

I hope I've worded this correct- I'm trying to get a full understanding on this draw calls business...

cheers guys...

Share this post


Link to post
Share on other sites

Right cheers Max, so all in all in this case they might aswell have completely unique textures each...

Share this post


Link to post
Share on other sites
If it uses three, then I might aswell have object specific textures even when they're not visually necessary..?

As Max Power said, it'll do at least 3 drawcalls for the 3 different groups of polygons that represents your 3 different models irrespective of whether they carried completely different sets of textures or not. However, if you can share or reduce the number of different textures used by all three models this would be more optimal I'd imagine than say having 3 different (but similar) models and 3 different but similar sets of textures.

What i mean is... if you had say 1 model with 3 different texture 'sets' which may (or may not) end as say 3 drawcalls & you had 3 models with 1 texture 'set' also ending up as say 3 drawcalls, both these scenario's are better than having 3 models with 3 different texture 'sets' if ya get my meaning.

-Sy

Share this post


Link to post
Share on other sites

Cheers Synide,

thanks for your reply, but just to completely make sure I follow, does this diagram explain it correctly please?

http://www.flickr.com/photos/86890612@N02/8163354508/in/photostream

A is using 3 models all with their own texture

B is using the same three models but they're all using the same texture

B is better yes? Even though they're basically 3 different .pbo objects for individual placement.

Share this post


Link to post
Share on other sites

Aye man, it's just that normally when I've been involved in a game title I sort of know where I stand.

I've VERY new to this VR engine so want to hit it spot on if I can to save time in the long run, and this concept of "sections" is a new one on me.

I know it's necessary for ARMA2 to do it's impressive thing, that's in no way an issue- I would just love to have a firm grasp on this section side of things.

Anyway man, sorry for keeping going at it with these pesky posts! But I'm sure there's also a few people out there who will benefit from seeing all this info you're posting! :D

Share this post


Link to post
Share on other sites

Well, the information we're giving you is available through searching... but there's no harm in repeating it. I wouldn't obsess about shaving every last millisecond off of the render time of your wreck models. It's not like there's going to be 100 of them on screen at once. Once you have a reasonable idea of the performance requirements, the limiting factor is the ease at which you can execute your project.

I'm not sure about sections themselves (which can actually mean two things in addon making), but I know that draw calls are a dx thing so limiting your unique texture / material combos on the same object should be valuable info for whatever game engine you choose to develop for.

Share this post


Link to post
Share on other sites

Thanks again Max..!

Were I can, I'm sticking to one texture sheet per object, as per normal game engine I suppose...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×