2D Toolkit Forum
2D Toolkit => Support => Topic started by: Flashist on June 30, 2013, 11:44:19 am
-
Hi!
Please, could anyone help me with adding glow effect for single object in 2dToolkit? Maybe someone may share example scene?
-
There isn't a way to do this out of the box. The solution to recommend would depend on what platform you want to do this on, how big the sprites are, or if you have room in the atlas for glow sprites, etc. There isn't one slution that will work on all situations.
-
> The solution to recommend would depend on what platform you want to do this on,
It will be great to reach as many platforms as I can Now I want to bring my app on PC, Mac, iOS, Android and maybe PS3 (I understand, that I may have problems to bring my app to all platforms, but it will be great to get 1 app for all these platforms).
> how big the sprites are
I have square with size 30x30 pixels. And want to create glow around it.
> or if you have room in the atlas for glow sprites
I'm new in Unity3d (came here from Flash development) and I don't know much about atlases and rooms =( Please, could you tell more about this solution?
Also, I can create pre-rendered image with glow effect (in Flash) and use it. But when I tried to do that I see next thing (please check attached screenshots).
P.S.: sorry for my bad bad english.
-
I'm not sure what the problem is with your glow object? Is the glow outline in the alpha channel?
-
Yes, pre-rendered image has alpha channel (please check image attached to message).
I found some solution for me: I use another shader for Sprite Collection with glow image (before: tk2d/SolidVertexColor, now: tk2d/AdditiveVertexColor).
Now image looks better than before, but glow doesn't seem equal to glow on pre-rendered image =(
-
What is it supposed to look like with the glow? I think I"m missing some details here. Can you post a pic of hwat its supposed to look like, then what it looks like with whatever setup you've got right now?
-
Sorry for delay.
Here 2 images:
1) glow_current.png - how it looks now in Unity (screenshot).
2) glow_how-need-to-be.png - combination of background and pre rendered glow image (I made combination in Photoshop). It will be great to reach full (or almost full) similarity of Unity and Photoshop images.
-
You will need a combination for this. The glow bit needs to be additive, and the solid bit, well, needs to be solid.
Split it up into two sprites, one solid one for the center bit, and then another glowy bit. The glow needs to be additive, the center bit, just normal blend vertex color will do. In your scene, place the glowy one BEHIND the the solid one. Should be a close enough effect now, and if its not bright enough, stack up 2 glowy ones...
-
Thanks for answer.