Hello Guest

Author Topic: Simple sprite without atlas build?  (Read 11540 times)

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Simple sprite without atlas build?
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Simple sprite without atlas build?
« Reply #1 on: June 25, 2012, 10:27:46 am »
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

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Simple sprite without atlas build?
« Reply #2 on: June 25, 2012, 01:45:18 pm »
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.
« Last Edit: June 25, 2012, 02:16:21 pm by J. Park »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Simple sprite without atlas build?
« Reply #3 on: June 25, 2012, 02:36:56 pm »
You'll have to register your copy of 2D Toolkit - its in the private support forum.

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Simple sprite without atlas build?
« Reply #4 on: June 25, 2012, 03:14:50 pm »
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....

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Simple sprite without atlas build?
« Reply #5 on: June 25, 2012, 03:19:15 pm »
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?

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Simple sprite without atlas build?
« Reply #6 on: June 26, 2012, 12:49:54 am »
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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Simple sprite without atlas build?
« Reply #7 on: June 26, 2012, 08:29:52 am »
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...

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Simple sprite without atlas build?
« Reply #8 on: June 26, 2012, 10:15:06 am »
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..

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Simple sprite without atlas build?
« Reply #9 on: June 26, 2012, 07:41:12 pm »
I've added it to the TODO.

J. Park

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Simple sprite without atlas build?
« Reply #10 on: June 28, 2012, 12:18:03 am »
It's great! Thank you.