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

Pages: [1]
1
Support / Re: How to color gradient a sprite?
« on: May 27, 2013, 07:53:12 pm »
OK, I know why the dicing doesn't work with clipped sprite. It's because each piece of the diced sprite can be placed anywhere in the atlas so clipping makes it extremely difficult. I get that. So, is there a way to do 4 color gradient in a clipped sprite given that I only have 4 vertices?

2
Support / Re: How to color gradient a sprite?
« on: May 27, 2013, 07:29:01 pm »
OK, so I found a way to have 4 color gradients. Basically, I set the sprite's Render Mesh to diced and then divide it according to how many colors I want. I also tried with a custom mesh, but the edges that are created are not what a want. Anyway, kinda hacky and hard-coded, but it works.

The next problem is doing this in a clipped sprite. When I create a clipped sprite from a diced image, I get no mesh in the scene... Do you know how can I solve this?

The whole mesh thing is because I want to make a gradient with 4 colors from top to bottom. Basically, I want to make the sprite on the left, look like the sprite on the right:


And the reason why I want this clipped, is because I animate the sprite as follows:


Am I on the right track by creating meshes that have multiple vertices so I can color them as a want? What about the clipping?

Thanks in advance.

3
Support / Re: Sprite Size Variation In Resolutions
« on: May 22, 2013, 07:27:59 pm »
OK, the stripping down helped me figure out the problem. Thanks for the suggestion! It turns out, I was flipping between SD and HD at Start instead of Awake. I switch the code to work at Awake and it fixed it.

4
Support / Re: How to color gradient a sprite?
« on: May 16, 2013, 03:38:50 pm »
Oh, I see. I thought this would require me writing a new shader. That seems easier! Thanks, I'll come back with my results later today.

5
Support / Re: Sprite Size Variation In Resolutions
« on: May 15, 2013, 11:30:23 pm »
Thanks for getting back to me so fast!

Currently the the anchor on the texture in the atlas is "Middle Center". Is there an overall atlas anchor I should be looking for?

The native resolution on the 2dtoolkit camera is 1024x768 and we use "Wildcard Override" set to "Auto Scale = Fit Visible".

I'm not aware of our texture being downscaled by unity on these devices. The atlas setting for "Compression = Uncompressed".

6
Support / Sprite Size Variation In Resolutions
« on: May 15, 2013, 10:35:34 pm »
Hey Guys,

I've got a thin sprite (16x500) with a gradient on it that I'm scaling by a large number on the x axis (55) to use as a scrim. It's flush with another sprite that's not being scaled at all. When I align the stretched sprite with the normal sprite in HD and then play the game it looks great, but when I switch to SD, the stretched sprite overlaps the normal sprite by a few pixels. They both have alpha channels so this overlap is obvious and not very pretty. If I align them in SD, then there's a small gap between the two in HD.

Another thing I noticed was a difference in the gap/overlap size when playing the scene on the PC versus different iOS devices.

I've tried a lot of different things to try figure out what's going on. I've tried changing the resolution of the thin sprite. I tried using a slice sprite instead of just a regular sprite that's scaled. I tried scaling the stretched sprite in different locations (sprite inspector, game object transform, atlas inspector). I've tried playing with padding, trimming, and other atlas settings. Any ideas for how I can fix this problem or what might be wrong?

Happy to provide any extra information if needed.

Any help would be appreciated,
Pek

7
Support / Re: How to color gradient a sprite?
« on: May 15, 2013, 06:40:58 pm »
Yes, I understand this will be trickier. We are trying to cut down our atlases so it will be worth it... I think. Could you maybe give me some pointers on what I should do? Anything that gets me closer to this would be great.

Thank you.

8
Support / How to color gradient a sprite?
« on: May 15, 2013, 05:12:00 pm »
Hey guys,

Is there any way to set a gradient color on a sprite instead of a single solid color? Let's say I have a circle-ish white sprite that I want to color from blue to green. How would I go about this?

Thank you in advance.

9
Support / Re: Deleting demo folder breaks 2D Toolkit
« on: February 12, 2013, 03:52:04 pm »
Hi,

Whenever I delete the demo folder that comes with 2D Toolkit, and then try to create a new Sprite, I get "Unable to create sprite as no SpriteCollections have been found".

How to reproduce (in Unity 4):
  • Import 2D Toolkit (check everything)
  • Delete the demo folder:  /TK2DROOT/tk2d_demo
  • Create a new sprite collection
  • Try to create a sprite

I tried rebuilding the index but it doesn't work. If I re-import the package (with the demo) and rebuild the index, it works again.

I'd really like to delete the demo folder. Is there a reason why I should keep it?

Thanks.

What is in the new sprite collection you create? How many sprite / fonts are there in there?

I just tried this, and I get the error if there isn't anything in the collection. No problem if I add a sprite to the collection. Maybe I'm missing something?

As nikolic says, you can simply get the source packages from in there if you don't want the demos in there to save you a bit of time.

I remember I had at least two sprites to test with. Today I opened Unity, deleted the demo folder, and nothing broke..... Oh well. I'll grab the source anyway. Thanks!

10
Support / Deleting demo folder breaks 2D Toolkit
« on: February 11, 2013, 10:22:03 pm »
Hi,

Whenever I delete the demo folder that comes with 2D Toolkit, and then try to create a new Sprite, I get "Unable to create sprite as no SpriteCollections have been found".

How to reproduce (in Unity 4):
  • Import 2D Toolkit (check everything)
  • Delete the demo folder:  /TK2DROOT/tk2d_demo
  • Create a new sprite collection
  • Try to create a sprite

I tried rebuilding the index but it doesn't work. If I re-import the package (with the demo) and rebuild the index, it works again.

I'd really like to delete the demo folder. Is there a reason why I should keep it?

Thanks.

Pages: [1]