Jump to content

Atlas Texturing, Draw Calls, and Performance


nick.ace
 Share

Recommended Posts

So I was reading a something from a post on one of Unity's forums (I'm not interested in the engine, but some of the discussions there are helpful), and atlas texturing seems to be a big thing there. I had no idea that one large texture that combined multiple small textures could improve performance substantially.

 

Anyway, how does Leadwerks draw textures under the hood? Does it go through all draw calls like Unity (and thus atlas texturing is important)? Also, are textures dynamically freed when the last instance of a material is hidden from view?

 

Thanks in advance for any feedback! I'm trying to determine how to best achieve certain levels of performance in the long run.

Link to comment
Share on other sites

Thanks for the link gamecreator! What I was really wondering wasn't so much about megatextures as it was about using many small textures in one big texture. What I mean is that if you have a few small props with individual UVs and separate textures, then I think you would get better performance if you combine them into one texture. If you Google search "atlas textures" you should see what I'm talking about.

Link to comment
Share on other sites

The artist can create a number of 3D props that use the same material, placing the textures from all the props on one texture. If they map the texture coords appropriately then it's a fairly trivial optimization.

 

Since props using the same material get batched together it will save on internal material switching. Reducing draw calls in Unity is a quick and easy level optimization, especially for mobile devices. In for desktops I'm not sure it's such a great return on effort if you're only talking about a few instances. But in principle (and in practice) it works.

  • Upvote 2

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Some mobile graphics hardware suffers from extreme limitations on texture switching. PC hardware doesn't have the same limitations, so you don't have to mess around with things like this.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Thanks for the explanation. Anyway, I guess that would make sense since Unity also has a big mobile department. I guess I'll probably concentrate less on atlassing, but as Flexman said, for smaller objects I suppose it would be good just to reduce the number of draw calls.

Link to comment
Share on other sites

We also use instance rendering for repeating geometry, so the number of draw calls isn't much of an issue. In most cases, if you have 100 identical objects, they will be rendered in a single draw call, thanks to OpenGL 4.

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...