Author Topic: What does this mean in the UIAtlas documentation?  (Read 3632 times)

steddyman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
What does this mean in the UIAtlas documentation?
« on: November 21, 2012, 10:42:27 AM »
"You can organize sprites into groups by creating more than one atlas. As long as the atlases share the same material, their widgets will still end up in the same draw call."

How can one material point to multiple different textures?

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #1 on: November 21, 2012, 12:23:19 PM »
This is the definition of an atlas.

On a single texture (an atlas), you pack different textures, and this atlas is linked to a single material.
There's also a config file that keeps track of the position of each textures in the atlas.

So when you want to render a sprite, you know what UV coordinates you have to pass to the mesh.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #2 on: November 21, 2012, 05:20:07 PM »
You point to a sub-part of a texture with an atlas, so it's still just one texture being used, just only part of it at once.

steddyman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #3 on: November 22, 2012, 04:01:38 AM »
Sorry, that isn't what the documentation states.

I know an atlas is multiple textures combined into an Atlas, that is there entire purpose.

The statement on the UIAtlas page states you can have multiple Atlases (not textures) share the same material.

Here is the link, look at the tips:
http://www.tasharen.com/?page_id=120

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #4 on: November 22, 2012, 04:16:48 AM »
Ah, hmm, that doesn't make sense. If you're using a different atlas, it will be a different draw call the way it is now. Not sure you can share the material/drawcall like that?

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #5 on: November 22, 2012, 04:21:10 AM »
"You can organize sprites into groups by creating more than one atlas. As long as the atlases share the same material, their widgets will still end up in the same draw call."

He is saying that one atlas = one material here.
It's just that you can organize your sprites in different atlas, for example :
GameAtlas (with 20 sprites in it)
MenuAtlas (with 50 sprites in it)

And each of these atlases have a single material (GameAtlasMaterial and MenuAtlasMaterial).
The widgets you create using the GameAtlas will have the same draw call (draw call #1) and the widgets you create using the MenuAtlas will have the same draw call too (draw call #2).

steddyman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #6 on: November 22, 2012, 06:25:48 AM »
Really?

I don't think there is any way you can read this to mean that:

'As long as the atlases share the same material'.... how can Altases ever share the same material?

Who wrote that on the website, was it Aren?  If so, could you please comment Aren or update the website if it means the above?
« Last Edit: November 22, 2012, 06:27:27 AM by steddyman »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #7 on: November 22, 2012, 10:46:55 PM »
There is no need to do this anymore. It was marginally useful for manually-created atlases with a lot of sprites before the sprite selection window was added. Now... I'll just remove that line.

steddyman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: What does this mean in the UIAtlas documentation?
« Reply #8 on: November 23, 2012, 03:47:44 AM »
Thanks for the clarification