Creating atlas from PVR file (Unity iOs)

This is the place to find out how to accomplish something specific with SM2.

Creating atlas from PVR file (Unity iOs)

Postby Lisan » Fri Apr 22, 2011 3:26 pm

Hello,

I'm new in this tool, just tried it for the first time. I have graphic file for game background (2048 x 2048), it's saved with PVRTC4 compression in PVR format (with PVRTexTool). Unity successfully improts it, but when i try to use it as static texture in PackedSprite, atlas building fails:
"InvalidCastException: Cannot cast from source type to destination type" in BuildAtlases.cs:677

If i use another texture instead of it (the same file in PNG, imported to Unity iOs with PVRTC4 setting) everything is fine, but Unity internal compressor gives rather bad image quality, that's why external tools is recommended for texture making. But how to use these files with Sprite Manager?
Lisan
 
Posts: 20
Joined: Fri Apr 22, 2011 3:14 pm

Re: Creating atlas from PVR file (Unity iOs)

Postby Brady » Fri Apr 22, 2011 10:00 pm

That's odd, based on the line number, it looks like somehow Unity's texture importer is crapping out. I suppose that could make sense, if for some reason it doesn't recognize the texture format properly or something. Probably some quirk in their importer.

At any rate, you don't want to do it this way anyway. The reason is, assuming Unity could read the source texture correctly, it would generate a new atlas with that same texture in it, using its own compression. This compression would compound upon the original compression. You want your source textures to be uncompressed since they aren't used in the final build. Instead, the atlas is what is used, so that's what you want to compress. So you'll want to build the atlas, and then run it through whatever custom compressor you want to use.

Also, an image of that size, I'm guessing you're not going to have any other images packed along with it. If so, then in that case, you don't need to build an atlas at all. Just set up your original image with a Sprite object (setting its lower-left pixel and pixel dimensions), and that's all you need to do.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Creating atlas from PVR file (Unity iOs)

Postby Lisan » Mon Apr 25, 2011 5:32 pm

Thanks!
I'm really don't need atlas at all for backgrounds, it's working fine with just Sprite class. Buy the way do you have up to date online documentation somethere?
One came with my copy seems to be outdated, cause plugin itself contains classes not documented there (SimpleSprite, SpriteText)
One more question - is there a way to perfectly align several sprites in a line? My background consists of three pieces, and i'm trying to align them without a gap in texture in between.
Lisan
 
Posts: 20
Joined: Fri Apr 22, 2011 3:14 pm

Re: Creating atlas from PVR file (Unity iOs)

Postby Brady » Mon Apr 25, 2011 7:52 pm

Regarding the documentation, the SM2 docs are up-to-date. Those classes are EZ GUI classes (EZ GUI has some classes in the Sprite Scripts folder as well).

Regarding moving sprites, there are a few ways I guess. The most obvious is if your sprites are sized to nice, round numbers, you can just manually enter in the transform coordinates for each in those increments. Another is to take the size of your sprite, and enter that size into your snap settings (Edit->Snap Settings...) and then when you drag the sprite, hold down the command button (for PC, I'm not sure, it might be Ctrl), and the object will move in those increments as you drag its transform handle.

Finally, there is a free alignment tool on the Asset Store. I've haven't used it yet, but it might do what you're wanting, but I can't be sure since I haven't tried it out yet. Looks pretty useful though.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Creating atlas from PVR file (Unity iOs)

Postby Lisan » Mon Apr 25, 2011 9:52 pm

Yes, the studing of EZ GUI is my next step, that's why i get confused about these classes. :) Thanks for your help.
I tried this alignment tool, but wth no luck. I remade sprites without Pixel Prefect switched on (to make their size whole numbers), but even after calculation of correct alignment i can't align them seamless.
Maybe it's because of compression, i will experiment tomorrow with uncompressed parts, or maybe with some overlaping on the sides..
And if i even get good alignment, after i click on Pixel Perfect to get correct size, this alignment is broken. :(
Lisan
 
Posts: 20
Joined: Fri Apr 22, 2011 3:14 pm

Re: Creating atlas from PVR file (Unity iOs)

Postby Lisan » Tue Apr 26, 2011 8:12 pm

I managed to align them perfectly after i turned compression off and set filter mode to Point, this way the parts became single picture without seams. But. All this was made without Pixel Perfect mode, and i need it. When i switch Pixel Perfect on, the parts change their size and position and no more fitted together, and their new size (like 512.328574) preventing me from just calculating new transform, because with these numbers precision is not enough to align them perfectly. Is there any other ideas how to do it? I will appreciate any help.
Lisan
 
Posts: 20
Joined: Fri Apr 22, 2011 3:14 pm

Re: Creating atlas from PVR file (Unity iOs)

Postby Brady » Tue Apr 26, 2011 8:28 pm

If you are using an orthographic camera, you can set the orthographic size to 1/2 the game viewport size and that will result in ever 1 unity of world space corresponding to 1 pixel on screen. Since sprites are all made up of whole pixels, this should result in nice, round, numbers.

If you are using a perspective camera, then here's another thing to try:
If you're positioning them at runtime, you can find the sprite's edge by using its .TopLeft and .BottomRight properties. These will return the distance of that corner/edge from the sprite's transform center (in other words, the distance in local space). So that tells you how far the next sprite will have to be moved over to fit right at the edge of the first sprite. That, combined with the position of the second sprite's opposite edge should be all the information you need to position it as desired.

Another thing that pertains to seeing seams is the issue described here:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx

Basically, if you are using an orthgraphic camera and therefore things are positioned in whole pixels, you may want to offset all the positioned by 0.5 so that they are in the "middle" of each pixel, to avoid rounding issues by the renderer.
Brady
 
Posts: 5361
Joined: Tue Jul 06, 2010 11:33 pm

Re: Creating atlas from PVR file (Unity iOs)

Postby Lisan » Thu Apr 28, 2011 8:55 am

Thank you very much, that's was quite usefull!
Lisan
 
Posts: 20
Joined: Fri Apr 22, 2011 3:14 pm

Sjcg123

Postby Sjcg123 » Wed Jan 25, 2017 7:20 am

Michael Kors Outlet
fitflops sale uk
Michael Kors Handbags Discount
Ugg Classic Tall
Chaussure Nike Air Max Pas Cher
longchamp bags on sale
ugg boots outlet online
canada goose jacket outlet
Nike Factory Store
pandora outlet store
Yeezy Boost Sale Online
Jordan Future
Nike Store
ugg store
womens nike air max
Ugg Pas Cher Femme
23 is back
Uggs Pas Cher Soldes
Pandora Beads And Charms
retro jordans for cheap
Ugg Button
Cheap Stone Island Jackets
zapatillas nike baratas
zapatos de futbol nike
Veste Moncler Pas Cher
Air Jordan News
Original Ugg Boots
prada outlet
religion store
nfl store
Ugg boots Sale
Vans Black Sneakers
moncler jacket sale
Coach Bags On Sale
Bottes Ugg Femme Pas Cher
Ugg Pas Cher En France
Negozi Pandora
louboutin heels
Cheap Michael Kors
Nike Air Huarache For Sale
Boutique Ugg
Sportschuhe Nike
botas de futbol
Nike Air Max Cheap
nike sportschuhe
ugg boots cheap
chaussures de foot pas cher
pandora bracelet charms
Toms Shoes For Women
Uomo Hogan
Doudoune Moncler Pas Cher
tru religion jeans
Michael Kors handbag discount
ugg outlet online
Moncler Jacket Womens
adidas schoenen
ugg boots classic
Soccer Boots Outlet nike
cheap uggs
portafoglio michael kors
Nike Shoes Sale Store
Pandora Official Website
canada goose jackets on sale
canada goose sale online
Toms Outlet Online
ugg factory outlet
uggs outlet
Stone Island Outlet
new yeezy shoes
Doudoune Femme Pas Cher
nike air jordan pas cher
cheap christian louboutin
Nike Pas Cher Homme
billige nike sko
Ugg Outlet Online Store
Botte Ugg Femme
moncler coats for women
cheap air max outlet
sac coach soldes
moncler girls
reebok running shoes
Air Max For Sale
Nike Air Women
ray ban wayfarer eyeglasses
Canada Goose Official Site
Soldes Ugg
Ray ban sale online
pandora beads
ugg clearance
Nike Air Max Boutique
ugg boots for women
Boty Nike Air
Bottes Ugg Pas Cher
cheap nike air max
nike shoes
Nike Air Sneakers
nike sneakers
cheap uggs for women
official NHL jerseys
longchamp tote bag
moncler outlet
chaussure Nike homme
Nike Air Jordan 11
Sneakers Nike
Ray-Ban Official Discounted Site
hogan rebel donna
new jordan releases
new pandora charms
Michael Kors
sac a main michael kors
Timberland Outlet
Jordan Sneakers For Sale
pandora online
Air Huarache
pandora jewelry store
Doudoune Moncler Site Officiel
michael kors bags outlet
vans shoe store
adidas outlet
Adidas Originals Superstar
Lebron 13
huarache sneakers
Oakley Sunglasses Cheap
abercrombie and fitch store
Womens Ugg Boots
Orecchini Pandora
zapatillas running
chaussures nike pas cher
cheap real uggs
toms sale
Chestnut Ugg Boots
nike free
zapatilla adidas
Oakley Outlet
nike mercurial soccer cleats
Nike Online Store
Air Max Sneakers
Air Max Femme
Chaussure Nike Pas Cher
Moncler Store
nike tn pas cher
adidas kläder
Air Nike
hogan scontate
Doudoune Moncler Solde
Air Jordan Release Date
Adidas Shoes Discount Marketplace
nike air max running shoes
Nike Air Max 90
Uggs Outlet Store
Air Jordan Retro Sale
christian louboutin outlet
Jordan Store
adidas store
nike air
Pandora Store
air force one pas cher
nike air schuhe herren
converse store
Anelli Pandora
Canada Goose Outlet
Doudoune Moncler Femme Pas Cher
pandora charm bracelet sale
Kobe Shoes Nike
australia uggs outlet
coach factory outlet online
Canada Goose Outlet
chaussure basket homme
Nike Zapatos
Ugg Boots On Clearance
Ugg Noir Pas Cher
Timberland skor
Michael Kors handbag on sale
toms shoes outlet
hyperdunk 2014
Ugg Homme Pas cher
Ugg Femme Pas Cher
australia uggs outlet
Nike Pas Cher Femme
nike jordan shoes
scarpe nike
Moncler Outlet Online
The official UGG
Air Max 90
michael kors handbags on sale
goedkope nike air max
nike chaussures
pandora rings
newest lebron shoes
Nike Air 90
scarpe hogan outlet
adidas outlet stores online
air jordan
Veste Moncler Femme
Adidas Superstar
Ugg Grise Pas Cher
Jordan Schoenen
Moncler Sale
uggs for women
uggs for cheap
Canada Goose Outlet Store
Sheepskin Ugg Boots
nike schuhe günstig
nike sb stefan janoski
Yeezy Black
nike joggesko
nike sportschuhe damen
nike damenschuhe
0125Sjcg
Sjcg123
 
Posts: 326
Joined: Sun Oct 16, 2016 6:19 am

Re: Creating atlas from PVR file (Unity iOs)

Postby valentino11 » Mon May 01, 2017 6:00 am

Summer color in Coach Factory Outletthe bottom Coach Factory of my heart Coach Outlet precipitation,Lululemon Outlet I do not know Ray Ban Outlet what kind of Moncler Outlet text into Moncler Jackets the kind of Salomon Shoes heat with Longchamp Outlet the heat of Tory Burch Shoes the colorful.Coach Outlet Online Night falls, expelled the heat Christian Louboutin Shoes wave during North Face Outlet the day of Stephen Curry Shoes the invasion,Red Bottom Shoes adjust the irritability Timberland Outlet of the mood,Coach Black Friday into a cool,Prada Handbags a night given Michael Kors Outlet the warmth.Giuseppe Shoes Threats looked up,Louis Vuitton condensed Sac Longchamp the moonlight,Kate Spade Outlet in a deep ink to Michael Kors Handbags see the stars shine.Prada Outlet A long and North Face Outlet bright lightToms Outlet from the deep Air Max Pas Cher and shallow dotted with their own fields, staggered together in the air, according to Nike Outlet the viewer's mood,Kate Spade Outlet silent to Coach Outlet show a thing Coach Purses called eternal.Cheap Jordans The change of Kate Spade Outlet distance in the human Coach Outlet eye is replaced by a Coach Factory Outlet kind of flat Air Max 90 feeling,Red Bottom Shoes leaving only New Balance Outlet a bright, a kind of magnificent,North Face Jackets or a change Lebron James Shoes between the flicker.Nike Outlet The light of Asics Shoes the world,Keds Shoes the shadow of the blur,New Jordans the actual Jordan Retro 11?situation in a show off the gesture True Religion Outlet of the North Face Outlet world's self-righteous eye,ED Hardy Outlet the night because of the ray of light rendering more and North Face Outlet more heavy,Converse Outlet and the color of the night into the memory of the depths and memories accompanied.Dream to go a lot of way, wake up still in bed,Chaussures Louboutin but also a Coach Outlet beautiful process.Louboutin Heels I like to Under Armour Outlet wake up from Polo Outlet the dream Puma Outlet in the endless weekend,UGGS Outlet slowly swallowing Adidas Yeezy the sun through Coach Outlet the curtains pouring into the room,Nike Air Max illuminating the house is not smooth,Ralph Lauren Outlet a bright world Adidas Yeezy Boost in my eyes,UGGS For Women because of this Indifferent mood,Adidas Outlet and rare leisure,Adidas NMD to use a look of appreciation to Burberry Outlet see their carefully arranged room.Balcony Clivia blue Skechers Outlet green Tingxiu Ugg Boots Sale leaves the Vans Outlet crystal clear,Stephen Curry Jersey a kind of old green stack up,Valentino Shoes scattered to cast a unique scenery. Just in full bloom in the flowers,Herve Leger full of Adidas Originals flowers from Adidas Outlet the inside of the light yellow, orange,Christian Louboutin Shoes orange, light red,Toms Outlet deep red times to North Face Outlet gradually change,Kevin Durant Shoes yellow and white core New Balance Outlet by the filaments wore Guess Factory a small cluster of small clusters of yellow anthers ,Kate Spade Outlet Delicate petals people could not bear to touch.Red Bottoms The whole flower with North Face Jackets a bright color is enchanting in the leaves Coach Outlet of the cracks,Toms Outlet like the opening of the peacock,Coach Purses with a beautiful Coach Outlet Online solitary line across skechers outlet the roots, stems,Coach Factory Outlet leaves, flowers together, such as grass-like rustic, Flower-like tender and beautiful, swaying between flowers and flowers,Hollister Jeans to another style decorate our lives. Confucius to quality wins text is wild,Coach Outlet Store Online Wen Sheng North Face Outlet quality is UGG Boots Black Friday history, gentle,Nike Roshe Run and then a gentlemanCoach Outlet teach the world,Nike Roshe Run because of its unique quiet,Gucci Outlet elegant demeanor it UGG Outlet The window full of green, deep and shallow competition competing for the price, to the elegant Beats By Dr Dre curtains coupled with another color, vivid, cheerful hut, but also cheerful of the small room Skechers Shoes where no desire for me.Michael Kors Outlet The last time out of the students admitted to the University,Coach Factory Outlet the results down,Kate Spade Outlet for three years ago,Red Bottom Shoes hard but unforgettable adherence,Toms Shoes for the persistent perseverance,they brought Ferragamo Shoes flowers and Skechers Shoes I finally NFL Jerseys celebrated the Tiffany Outlet late happy moments,Marc Jacobs Outlet bright The color Cheap Jordans of the moment the scenery of North Face Jackets the living room,Prada Outlet lily fragrance North Face Outlet filled with festive Ralph Lauren Outlet atmosphere, the children are about to start a new journey, I was surrounded by this happiness.Burberry Scarf Calm and natural cool,Kate Spade Outlet hit the glory, the heart suddenly spacious many.At this time the summer heat,Hollister Clothing the wind is thin,North Face Outlet full of grass,North Face Outlet Store follow this simple Versace Belt breathing,North Face Jackets gradually realized North Face Outlet that scattered in the surrounding nature, flowers fluttering Buty Nike Air Max breeze,Nike Roshe Run the wind is soft, Tree green, all things are North Face Outlet in the presence of natural color,Louis Vuitton Outlet beautiful with.Kate Spade Outlet I look at the years into the wind indifferent,Christian Louboutin Outlet note a Xuan pen, walking mind Juan show. In the summer,True Religion Outlet people who are busy ED Hardy Outlet are sweating.Hugo Boss To this end, summer,Coach Outlet often cast aside or accused. However,Louis Vuitton Outlet in my eyes that Uggs Outlets have not Marc Jacobs Handbags seen the secular color of the eyes to UGG Bailey Button see a lovely,Michael Kors gentle,Michael Kors Outlet strong,Nike Roshe Run Pas Cher persistent summer.Summer, quietly coming and vigorous.Nike Air Max Pas Cher She came, the adults are innocent call back,The North Face Outlet and the children's naughty to find, she also brought the old people to UGG Boots Outlet survive the bear hope. In the summer of the given,Chan Luu a small to go Longchamp Pas Cher to the Oakley Sunglasses beach walk.Chanel Outlet Blowing a cool Sac Louis Vuitton sea breeze,Nike Air Max a deep shallow Louis Vuitton Pas Cher little feet Oakley Outlet printed on Kate Spade the soft sand,Air Jordan Pas Cher watching the seagulls Ray Ban Sunglasses flew in groups Pandora Bracelet that belong to their Ray Ban Outlet safe haven - home,Red Bottom Shoes watching Burberry Outlet sunset Louis Vuitton Outlet gradually fall,Salvatore Ferragamo see Hongxia gradually woven The sky,Tory Burch Outlet with no Yeezy Boost 350 longer naive hands Coach Outlet to pick up a UGG Outlets bizarre shells,North Face Outlet hopeless azure North Face Outlet sea memories of the past little bit of bitter drops.The North Face Outlet Or your home near the mountain,North Face Outlet you can go out of the house,The North Face Jackets embrace the mountains,Salomon Outlet feel the wind gently between Burberry Outlet the trees,Mont Blanc Pens in the woods under the Toms Outlet shadow of the walk.Marc Jacobs Handbags Bathed through the leaves of Louis Vuitton Belt the soft sunshine,True Religion stepped on a piece Jimmy Choo Shoes of yellow leaves, shower Kate Spade Outlet with pieces of film flying Coach Outlet the leaves fall off,Burberry Belt listen to UGG Outlet Store the sound of the rushing flow of water, and the habitat of the birds True Religion Outlet in the woods to Nike Hoodies learn Singing,Burberry Outlet mining under the colorful wild flowers Coach Outlet coupled with green bamboo Coach Outlet leaves tied with Ray Ban Sunglasses a willow into a home,North Face Outlet so that Coach Outlet home full of UGG Outlet breath of nature.
valentino11
 
Posts: 78
Joined: Sun Apr 30, 2017 12:38 pm

Next

Return to SM2 How to...

Who is online

Users browsing this forum: No registered users and 9 guests

cron