Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: steddyman on November 05, 2012, 04:18:58 PM

Title: Tiled texture has black line gaps
Post by: steddyman on November 05, 2012, 04:18:58 PM
I created a 200 x 200 pixel texture in Photoshop using one of the patterns included (also 200x200).  I exported the file as a PNG and then I have imported it into NGUI and I am trying to use it for a tiled sprite background.  The pattern I am using is repeatable.

However, for some reason as soon as the vertical size goes above 200 pixels, I get a black line before the sprite is drawn again as can be seen the the attached photo.

I thought Tiled Sprites were supposed to just create a seamless texture?  There is no black lines in the PNG I created even when zoomed all the way in.
Title: Re: Tiled texture has black line gaps
Post by: ArenMook on November 06, 2012, 04:47:36 AM
Well, first of all your original image is not tileable. You can see the edges easily. Taking a tileable photoshop texture and exporting a 200x200 slice of it doesn't guarantee that it's tileable. Try adding an offset filter to Photoshop of 100 by 100 pixels, and you will see what I mean.

Other than that, also select the sprite and give it a 1 pixel border. This will eliminate the lines on NGUI's side.
Title: Re: Tiled texture has black line gaps
Post by: steddyman on November 06, 2012, 10:25:31 AM
Hi

The 1 pixel border on the sprite in the atlas has fixed the black lines. 

Actually this is one of the in-built Photoshop patterns that is used for filing arbitary areas.  With the black lines removed, it is now tiling fine.

Many thanks.
Title: Re: Tiled texture has black line gaps
Post by: bomberest on July 05, 2013, 06:03:23 AM
Atlas texture: texture type: Texure -> Atlas texture: texture type: GUI