Hello Guest

Author Topic: Is it possible to force atlas0 using original spritesheet?  (Read 4450 times)

kencckw

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Is it possible to force atlas0 using original spritesheet?
« on: June 10, 2015, 02:20:32 pm »
I have 3 layers which I need to lerp in runtime using shader. However, some of the atlas0 rearrange the position so I cannot lerp textures together.
Is it possible to force atlas0 using original spritesheet?
Any good methods to achieve multiple layer?
I just found Linked Sprite Collections. I created linked collection but I don;t know how to use it.

My settings of spritecollection:
Trimming,rotation,remove duplicates off

Thank you
« Last Edit: June 11, 2015, 09:21:44 am by kencckw »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Is it possible to force atlas0 using original spritesheet?
« Reply #1 on: June 12, 2015, 11:09:32 am »
Hi,

No. tk2d doesn't support that. Linked collections will create 2 textures that are in sync though if you follow the instructions properly. You will then be able to use the 2 atlases as you need them.

kencckw

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Is it possible to force atlas0 using original spritesheet?
« Reply #2 on: June 12, 2015, 01:26:51 pm »
Thank you.
I follow the instructions from
http://www.unikronsoftware.com/2dtoolkit/doc/2.5/advanced/linked_sprite_collections.html

My step:
1. Put base.png and base_n.png in the root asset folder
2. Create a sprite collection in the root asset folder
3. disable trimming, disable rotation, disable remove duplicate
4. Type _n into Linked Collections and press add button
5. Click commit button

Linked folder is generated in the root asset folder and no error in the console.
However, the atlas are not in sync. I uploaded 2 atlas and I really need helps.  https://www.sendspace.com/file/m0ae5n
The original png files are in sync so I can use shader to combine 2 texture together.

I also consider to rearrange _n texture by my hand but it is too much work which I cannot handle.
« Last Edit: June 12, 2015, 01:32:31 pm by kencckw »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Is it possible to force atlas0 using original spritesheet?
« Reply #3 on: June 12, 2015, 02:08:07 pm »
Send me a repro, I don't know what the source images are like.
Also, What version of tk2d are you using?

kencckw

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Is it possible to force atlas0 using original spritesheet?
« Reply #4 on: June 12, 2015, 02:48:26 pm »
Thank you.
You remind me.
I just update my version to 2.5.3 and it work fine. ;D


kencckw

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Is it possible to force atlas0 using original spritesheet?
« Reply #5 on: June 12, 2015, 04:10:46 pm »
I just find why it does not work in 2.5.0.
Remove duplicates function does not work in 2.5.0.

In 2.5.3, you must turn off remove duplicates. Otherwise, it will not work.
« Last Edit: June 12, 2015, 04:12:21 pm by kencckw »