Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ehudros

Pages: [1]
1
Support / Re: Platform specific atlas optimizations
« on: April 08, 2014, 11:54:48 am »
Awesome, commenting out line 116 (proxy.maxTextureSize = (int)(proxy.maxTextureSize * scale)) did the trick.
I think it's worth adding this is as default in 2dtk, or at least allowing users to do this through the sprite collection editor as the performance gains may be significant.

2
Support / Platform specific atlas optimizations
« on: April 08, 2014, 10:16:39 am »
Hi,
We're using multiple platforms in our sprite collections and it seems like 2d toolkit can do a better job optimizing them.
Currently, if you have a 4x sprite collection that requires two atlas textures (due to the 2048 size limit), the 2x and 1x platforms will also use more than one atlas texture although they can actually fit all sprites in just one atlas.
This can end up saving draw calls as in 2x and 1x platforms less atlases are required.

Is there any way to hack tk2dSpriteCollecitonPlatformBuilder to work this way?

Thanks! :)

3
Yep, commenting out line 120 (proxy.globalScale = 1.0f / scale;) did the trick.
Thanks!

4
I've edited my post above with an issue I've encountrred when using 2x/1x assets. Any idea what could be causing that?

5
Gave rescaling through the editor a try (4x -> 2x) and it looked just fine. I've changed tk2dSpriteCollectionPlatformBuilder.cs so it will use the original files and scale them down for 2x:
line 58: string platformTexture = FindFileInPath(directory, filename, ext, extensions); (basically force it to use the original  file and remove the @2x that was added)

line 97: added proxy.globalTextureRescale = scale;

Do these changes make sense? Is there anything you think I might have broken in the process?

EDIT - I've changed the current platform in the 2dtk preferences menu from 4x to 2x and everything now looks zoomed in by a factor of 2 (both in the editor and when I play it). If I switch to 1x it's zoomed in by a factor of 4. I'm using a 2dtk camera set to "fit visible" with a native resolution of 2048x1536 and preview set to 1024x768. The scene only looks right when I use the 4x atlas. Does it have something to do with the changes I've made or am I missing something regarding the way the 2d camera works? As far as I could understand, changing to a different atlas should affect anything other than the visual quality of assets (meaning all sprites should remain the same size).

I'm guessing this is a side effect of my tinkering? Or am I missing something with the

6
Hmm... I've used Texture Packer to downscale non vector graphics by 50 percent (2048 -> 1024, or 4x to 2x) and it is usually nearly unnoticeable.
Does that undocumented feature support such downscaling via the settings menu? How do I make use of it?
Currently I'm using the mipmaping feature with the 4x texture on devices that I'd rather use a 2x texture on (meaning anything that isn't ipad retina) but it doesn't look as crisp as I'd like it to (and know is achievable through a texture downscale).

PS - the forum returns an http 406 error if a percentage sign is used anywhere in a message (I'm guessing as part of sql injection prevention).

7
Support / White noise/lines in transparent sprite areas
« on: December 23, 2013, 02:55:47 pm »
Hi everyone,
I've created a Sprite Collection from a couple of transparent png's, and when I add them to the stage I see a lot of white lines where they should have been transparent:
http://i.imgur.com/nCghmcD.png.
This only happens when I pick "unity texture" and goes away only if I pick "png" with premultiplied alpha.
Any idea what's causing this? This doesn't happen if I simply drag the sprite to the stage and use Unity's built in Sprite Renderer.

Thanks! :)

8
Support / Generating multiple atlases for retina/non retina automatically
« on: December 23, 2013, 02:12:21 pm »
Hi everyone,
Just started evaluating 2dTK and Unity as alternative to Adobe Air/Starling and I have a couple of questions regarding atlases.
I'm used to working with multiple atlases (generated using texture packer) and choosing the correct ones in runtime. I see that 2dtk has a platforms option in the Sprite Collection settings window, but it seems to expect the source png's to be already scaled down. Is there a way I can feed it just one size of assets (the largest) and have 2dtk create 2 atlases (one with the original png size and one scaled down by half for lower res. devices)?
I haven't seen much references to multiple atlases as a performance enhancing approach - am I missing something here? Do most Unity developers not use that approach and have some kind of alternative method?

Pages: [1]