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 - habitoti

Pages: 1 [2] 3 4 ... 6
16
Support / Re: Issue with Font-Collection
« on: March 08, 2014, 04:20:49 pm »
Hi,

I've sent you the sample as a standalone Unity project...

Regards, habitoti

17
Support / Issue with Font-Collection
« on: March 07, 2014, 07:34:00 pm »
Hi,

I've put all my fonts into font collections for platform support. I found an issue here: I have a very small font (just some monospaced digits and extra characters for table listings). They are perfectly ok in the source, but some digits are ultimately cut off at the bottom in the final atlas. Further more, there are some tiny artefacts showing up in between. Please see the marked sections in the atlas.

Source font graphics from bmglyph:


Generated font collection atlas with tiny artefacts and cut-offs:


Collection padding is set to Default. Haven't seen such artefacts before, maybe onyl introduced with the latest beta? I recreated the fonts today with the latest version from yesterday installed...

Regards, habitoti

18
Support / Re: Issue in creating platform support?
« on: March 06, 2014, 06:04:16 pm »
Yup, works with the new version.  8)

For the other thing: no clue why you can't simply leave the original as it is, and copy the materials 1:1 to the new platforms, but you probably know better...  ;D

One other thing that cam to my mind, BTW: since there is already a feature for scaling the assets during atlas creation, why not offer kind of "Auto-Platforms", where you can scale down automagically from a 4x to 2x/1x platforms, also creating the required lower-res assets? Is it just because of teh anchors? I think this is in most cases not really a big issue...

Regards, habitoti

19
Support / Re: Issue in creating platform support?
« on: March 06, 2014, 06:15:20 am »
Push, since this dropped unnoticed to page 2 already  ;)

20
Support / Re: Platform support only for multiples of 2?
« on: March 05, 2014, 08:21:25 am »
I think on most Android devices textures need to be POT, respectively are made POT before transferred to VRAM, resulting in additional performance penalty, so I'd rather control upfront what kind of textures I do have. E.g. such a 1280x1280 would be converted to 2048x2048 then, though it would well fit to 1024x2048.

Having said the above, I am not even sure any longer that other platforms are just created through scaling (as I thought I saw in your code). I just have the issue of a 2048x2048 4x texture, that results in a 2048x1024 2x 50% texture, and I have no clue why it's not 1024x1024. All assets are strictly 50% of the originals, and there is a huge wastage on the 2x now, and the layout of assets inside the atlas is completely different. What could be the reason? Is dicing also scaled accordingly?

Just to mention: I am now on the supported path of just using multiple of 2 graphic assets, I dropped my intentions of going for "uneven" platforms to not run into more unsupported issues.

Thanks, habitoti

21
Support / Re: Setting (and using) correct platform
« on: March 04, 2014, 10:19:29 pm »
No, nothing...

22
Support / Re: Platform support only for multiples of 2?
« on: March 04, 2014, 07:18:41 pm »
Understood.

I think I am stuck now anyway at a point I haven't considered at first...when you create the platform data, all is just scaled (vs. creating completely new collections). That way I end up with non power of two textures for platform support...

I am now trying to start with upscaled 2560x1920 related assets for 4x and that way get a proper 50% version that is fully supported....

23
Support / Re: Setting (and using) correct platform
« on: March 04, 2014, 07:14:22 pm »
Right, but as a matter of fact, the collections that are required to display the editor data won't be purged on start...I've put in logs to show which collections are loaded after start, and these are not, but are rather already loaded and initialized during edit mode.

24
Support / Re: Setting (and using) correct platform
« on: March 04, 2014, 04:28:32 pm »
Looks like the collection is loaded into editor already with of course just considering the tk2d prefs settings, and on running, the already loaded collections are not purged and reloaded, but rather continue to be used in that setup. Not sure whether this is now the "rare" edge case you are describing above, but I believe when the platform is set in code, something like the PlatformChanged() call does (when changing prefs) would have to happen at that point in time (i.e. purging existing collections). But setting the platform has no such side-effects at all...

25
Support / Re: Platform support only for multiples of 2?
« on: March 04, 2014, 01:48:20 pm »
Just changed the scale factor for 2x in the assetPlatform setup from 2.0 to 2.5 (which is the actual relation from 1280 (2x) to 2048 (4x)) and regenerated platform data -- et voilą...everything works great now out of the box, including all stretch and rel. positioning calculations etc., w/o having to change anything else.

Really wondering why you are not leveraging such a great feature more, e.g. by introducing a freestyle platform setup in addition to the present 1,2,4x...

Just struggling still with not being able to set 2x programmatically (see other thread). Just won't work though everything looks right :-( 

26
Support / Re: Setting (and using) correct platform
« on: March 04, 2014, 12:39:49 pm »
Added log to tk2dSpriteCollectionData.Init, and platform is switched already to 2x on first call. However, in contrast to using tk2d prefs, the running game does not use 2x atlasses...

27
Support / Re: Platform support only for multiples of 2?
« on: March 04, 2014, 12:01:48 pm »
Ok...your first answer above sounded like it would work out of the box  ;) (and there doesn't seem to be much missing, actually -- just the correct computation of the scale...).

Is there any doc or sample for adding other assetPlatforms?

28
Support / Re: Platform support only for multiples of 2?
« on: March 04, 2014, 11:53:43 am »
Yeah, I understand that this works overall for e.g. 2x = 50% 4x. My point is: my 2x is 62.5% of 4x. But somewhere in the process you still come up with a 50% scale now (with 4x being the initial platform). So only if I apply an additional explicit scale of .8 for each sprite, they will come up correctly. This is of course not a feasible option.

Can you tell me where the applied base scale is computed? It seems it needs to be adjusted for non multiples of 2.

Regards, habitoti

29
Support / The fifth way of looking up platform assets ;-)
« on: March 04, 2014, 07:52:11 am »
Hi,

I would like to suggest a fifth way of looking up graphics assets for platform support. I am actually using it, so maybe it's useful for others (and if you take it into standard coding, I wouldn't have to carry it over on each update ;-).

I have hundreds of assets organized in atlasses. I don't like to put them flat into a single folder, so I have quite a big and deep subfolder structure. For platform support, I don't want to clutter that with additional lowres files, but rather have other folders with the complete same hierarchy next the to it, carrying the lower resolutions still organized in the same deep hierarchy. So my structure for the native platform looks something like this:

Code: [Select]
Assets/Graphics/4x/fld1/fld2/asset1.png
Assets/Graphics/4x/fld1/fld2/asset2.png
Assets/Graphics/4x/fld3/asset4.png
...
   

For 2x I simply use PhotoResizer from Mac Appstore that can generate hundreds of arbitrarily scaled versions in seconds, retaining the complete hierarchy. So I create this for scaled down assets:

Code: [Select]
Assets/Graphics/2x/fld1/fld2/asset1.png
Assets/Graphics/2x/fld1/fld2/asset2.png
Assets/Graphics/2x/fld3/asset4.png
...
   

Then my fifth way of looking up simply selects the proper full hierarchy for the given platform (and it will not harm any previously existing lookup principles, since they would be found first for proper setups):

Code: [Select]
// Fifth path: assume that source graphics are in a structure that has a root of /nx/ (n: 1,2,4)
// this will be replaced by desired platform. This way you can structure all artwork in arbitrary
// folder structures below that root
if (platformTexture.Length == 0) {
// locate current platform
string altDirectory = directory.Replace("/4x/", "/" + platformName + "/");
altDirectory = altDirectory.Replace("/2x/", "/" + platformName + "/");
altDirectory = altDirectory.Replace("/1x/", "/" + platformName + "/");
if (System.IO.Directory.Exists(altDirectory)) {
platformTexture = FindFileInPath(altDirectory, filename, ext, extensions);
}
}

So if you think this would be useful for others, just pick that piece of code and add it to the existing 4 ways of looking up platform assets. It works in either "direction", no matter what your source platform is.

Regards, habitoti

30
Support / Re: Platform support only for multiples of 2?
« on: March 04, 2014, 06:15:48 am »
Can you shed some light on what parameters are affected exactly when switching platforms?
  • Does Unit/meters change? (e.g. from 100 to 50 when having a 50% 2x res.?) -- and BTW: where can I read that param?
  • Is the native res in tk2d camera adopted?
  • Any other magic applied?

I am asking because I am using some stretching on background assets to fit all aspect ratios that is based on the above, which works great on my initial platform, and not so great with another platform now with smaller assets, so I assume there is more being changed in the background which I need to consider in my calculations...

The mentioned support for a 1280px width platform would mean a scale of 0.625 when coming from iPad Retina resolution (2048). My assets are now shown a bit too big on 2x, but if I scale them explicitly down by 0.8, they end up correctly. 0.625 x 0.8 = 0.5 -- so I assume you are making a fixed 50% assumption somewhere in your platform magic which would prevent to use it properly in the described way (though I believe this is THE most common and wanted usecase when transferring form iOS to Android, and looking through other threads a lot of people would like to do that...)

Thanks, habitoti

Pages: 1 [2] 3 4 ... 6