Author Topic: Create Atlas by Texture Packer with "rotation" sprite ?  (Read 31872 times)

PoN

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 111
    • View Profile
Create Atlas by Texture Packer with "rotation" sprite ?
« on: October 08, 2012, 10:33:45 PM »
Pls ,Tell me how can i do that, create atlas by NGUI Atlas Maker and use "rotation" feature of Texture Packer ? thx
Worked on Doc&DogAge Of Fury 3D. Actually working on WarMach.

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #1 on: October 08, 2012, 11:54:15 PM »
I think it doesn't support it yet.

jprice

  • Guest
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #2 on: October 09, 2012, 01:32:47 PM »
Yeah, in NGUIJson.LoadSpriteData, there is a comment:

            // TODO: Account for rotated sprites

NGUI currently imports the rotated sprite's UVs correctly; it doesn't rotate the sprite correctly when it is created, though.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #3 on: October 10, 2012, 06:25:41 AM »
This is a request feature then :)

ArenMook is this something really hard to do ? Don't we just have to rotate the sprite ?
This will be something really great !

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #4 on: October 10, 2012, 09:44:45 AM »
Hard? Nah. But this feature is requested once in a blue moon (the last time was in February I think?), so I didn't look into it.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #5 on: October 10, 2012, 09:46:24 AM »
Héhé, well I'm thinking about switching every atlas generation with TexturePacker so that would be great

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #6 on: October 10, 2012, 09:48:24 AM »
Send me an atlas that has a rotated sprite in it then. Do that on the 12th though, as I don't return until then.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #7 on: October 10, 2012, 09:59:43 AM »
I've just sent you an email, that you'll find on the 12th ;)

Thanks !

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #8 on: October 18, 2012, 05:41:30 AM »
Hi,

Just a reminder, should I send you another email ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #9 on: October 18, 2012, 02:26:18 PM »
No, I have it saved. Just haven't gotten around to it yet.

_joe_

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #10 on: October 25, 2012, 10:58:53 AM »
I would also like to see this feature, Texture packer has the MaxRects Algorithm which place 20% more sprites on the same Atlas, and having NGUI to support to orientation (+90 or -90 degrees) would be a very nice addition.

Best

PixelEnvision

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 35
    • View Profile
    • Pixel Envision
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #11 on: October 25, 2012, 05:33:45 PM »
+1 for that feature...
Pixel Envision - Creating fun apps for iOS & Android

Twitter / Facebook / YouTube

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #12 on: October 25, 2012, 08:53:51 PM »
+1

Eskema

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 12
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #13 on: October 30, 2012, 09:37:38 AM »
I have to cry like the rest :P +1 for this feature

Ferazel

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 150
    • View Profile
Re: Create Atlas by Texture Packer with "rotation" sprite ?
« Reply #14 on: October 30, 2012, 12:50:27 PM »
+1 for this feature.
Especially, with NGUI rolling your own texture packer you could use that to rotate the sprites for the optimal placement on the sprite atlas, and/or import the rotated sprites from TexturePacker output. I understand if it doesn't get done as this would probably impact a significant number of widgets to maintain the offset and rotational value of the sprites and then do and undo that transform when performing calculations.