2D Toolkit Forum
2D Toolkit => Support => Topic started by: J. Park on June 25, 2012, 04:05:32 am
-
Is there a way to use simple sprite without atlas build for a large size texture background?
I want to display background with a large texture without atlas building just like "Sprite" in SpriteManager2 or "Simple Texture" in NGUI.
-
Hi,
Check out the runtime sprite colection sample here -
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,340.0.html
It will let you create a sprite collection (and select subregions too, if necessary).
unikron
-
I can't access that page
Here is error message...
An Error Has Occurred!
The topic or board you are looking for appears to be either missing or off limits to you.
-------------------------------------
Additionally, creating atlas in runtime is not what I want.
Background should be displayed in design time.
Doesn't 2DToolKit have that kind of component? (for simply displaying only 1 texture independently)
Building large texture into atlas is space inefficient.
-
You'll have to register your copy of 2D Toolkit - its in the private support forum.
-
I have tested sample scene.
As mentioned above, it is not related to my question.
I just want to display a single texture not combined in SpriteCollection....
-
That example creates a runtime sprite collection containing exactly one sprite, which happens to contain the full image stored in that png. In the end, what you get is a sprite which consists of the entire image, constructed at runtime.
Isn't that what you are requesting, or do I misunderstand your request?
-
Sorry for my poor English..
Here I attached sample scene using "UITexture" component in free version of NGUI.
It doesn't need atlas. It can display 1 texture directly without atlas.
SpriteManager2 or EZGUI also have that kind of components.
-
No, there isn't any support to do this directly. The difference between 2D Toolkit and all these other GUI systems is everything is precomputed in 2D Toolkit, and because of that the runtime is very very light. The runtime doesn't know anything about alignments, or texture sizes, or indeed even polygon counts, it simply takes the precomputed data and displays it.
Because of that, it isn't that straightforward to simply display an image like this, as it would mean dragging in a whole load of logic which doesn't exist in the runtime code.
Maybe I could add another sprite collection mode where it takes the texture and uses it and doesn't generate an atlas...
-
OK. Thank you for reply.
It would be very useful if another sprite collection mode (you mentioned) is implemented, especially for large size background texture.
I'll look forward to it..
-
I've added it to the TODO.
-
It's great! Thank you.