This makes sense if your characters have a rather HD resolution or you have a lot of characters like eastern languages.Īnother new feature that was added to the sprite packer is the pixel extruding feature. I haven't tried kerning support yet in Starling myself but I have a hunch that it will work just fine □įor very big bitmap font input bitmaps I rewrote the whole bitmap font parsing part so that it supports multiple rows should you input bitmaps that exceed 8191 in width or height. I will update the documentation page soon with all the added dynamic variables for the output syntax. Kerning first=165 second=188 amount=-1īut of course this can be fully customized. It will store this information in the *.fnt format like this: ![]() This screenshot shows the green rays hitting the bitmap silhouette.īy averaging each side's rays lengths into a volume unit I can then determine the optical kerning as in volume that fits between character pairs.įor each of those kerning pairs it will determine a kerning offset on top of the regular kerning distance. The 3rd variable is the kerning rays value which determines how many rays should be cast for each bitmap character. If 2 characters don't seem to kern at all in your preview window you can add them in this list separated by a space character. I have about 500+ kerning pairs added as a default which I got from a typography website. In the settings panel you can define whether you want to build the kerning pairs. I am actually quite proud of how this now works with its all automated optical kerning with quite nice results. You still have to parse the color and alpha channel, merge it into a RAW bitmapdata and then upload it to the GPU. I still can't believe that this thing exists but it's reality.įor Bitmap Font set txtAutoSpaceValues=false + set some yes its just about reducing the filesize, not the GPU memory. I think there is a bug that brakes stacked sprites(I've contacted author about it) so you need to manually fix this. ![]() To use SpritePacker with Starling use this fileFormatLoop: Extract SWF - flash animations into textures and xml.Bitmap Font - create beautiful Photoshop fonts and pack them as fnt data.Extract Tiles - cuts screen into map tiles.Extract Sprites - magic extractor of those ripped sprite sheets.Pack Sprites - crops transparency, smart power of two.I guess the biggest thing for me that the Unity packer doesn't do is output modifiable Mesh assets.Ĭheers, let me know if you want some more input on the current sprite systems.Basically it's has functionality of TexturePackerPro + lots more + it's free. Unity is now and will likely always be not as fine-grained as that because that's not really the goal heh I've walked that line with Unity team before going as far as assisting in improving features via beta list and private work with the mobile team. This method is great for all sorts of things - but most of all it gives a good gateway into custom-coding whatever you need. In my case, I added a "Attach Shadow Mesh" option which prepends (draw-order safe) and rotates the sprite mesh 90 degrees and vertex color's it so it loses all color information and turns half opaque. It is very easy to tightly integrate TexturePacker's CLI mode to batch process hundreds of existing project files and prepare them for Unity-ization.Īdditionally, it is easy to append features to this importer than Unity Sprites simply cannot accomplish. Hopefully Unit圓D's built in texture packer will offer similar results for Unity Indie eventually, but even for pro features it offers no support for existing sprite sheets being imported without a great deal of labor. ![]() I wrote the original source for this package because I had a massive number of Cocos2D projects and other already-prepped assets show up with sprite sheets that needed converting into Unity (Unity 2.x so iOS 1.5 and Unity 3 eventually). I put it all inside another "Editor" Folder and all is good.Īlso I downloaded the current github repository but I frankly do not know how to make an unitypackage out of that? Are you missing a using directive or an assembly reference?Įdit: ok, figured it out. ![]() Are you missing a using directive or an assembly reference?Īssets/TexturePacker/Plugins/TexturePacker.cs(162,24): error CS0246: The type or namespace name `SpriteMetaData' could not be found. Are you missing a using directive or an assembly reference?Īssets/TexturePacker/Plugins/TexturePacker.cs(217,28): error CS0246: The type or namespace name `SpriteMetaData' could not be found. I'm using the script from post#1, its working fine in editor but I'm getting errors on build:Īssets/TexturePacker/Plugins/TexturePacker.cs(15,7): error CS0246: The type or namespace name `UnityEditor' could not be found.
0 Comments
Leave a Reply. |