Dreeka
November 21, 2010, 11:32am
1
Hello,
I am working on a game, and I would like to create a small glowing ball for it.
This is my first project in Unity, and I can’t finish the game without it.
I would like it to look similar to this:
http://www.wishafriend.com/pf/thumbs/glowingball.jpg
I am using the free version of Unity.
Thansk,
Dreeka
Hi,
I have to put a glow effect on a sphere with UNITY 3.
I 've try this solution, but it doesn’t work ! http://www.unifycommunity.com/wiki/index.php?title=XRay
Someone can help me ?
Many thanks.
The shader X-Ray doesn’t work on Unity 3.
Someone have another idea ?
Many thanks
Here is what I’m doing :
Creat a new SHADER under UNITY
Copy/Past this code :
Shader “XRay” {
Properties {
_Color (“Tint (RGB)”, Color) = (1,1,1,1)
_RampTex (“Facing Ratio Ramp (RGB)”, 2D) = “white” {}
}
SubShader {
ZWrite Off
Tags { “Queue” = “Transparent” }
Blend One One
Pass {
CGPROGRAM
#pragma vertex vert
#include “UnityCG.cginc”
struct v2f {
V2F_POS_FOG;
float4 uv : TEXCOORD0;
};
v2f vert (appdata_base v) {
v2f o;
PositionFog( v.vertex, o.pos, o.fog );
float3 viewDir = normalize(ObjSpaceViewDir(v.vertex));
o.uv = float4( dot(viewDir,v.normal), 0.5, 0.0, 1.0 );
return o;
}
ENDCG
SetTexture [_RampTex] {constantColor[_Color] combine texture * constant}
}
}
Fallback Off
}
Assign this shader to a new MATERIAL
Apply this new MATERIAL to an object
Press PLAY
There is now glowing effect on my new object …
Hope you can help me !
Many thanks
Ok it works now.
Thanks for your information.
But I think it doesn’t look like what I’m looking for.
If you have some idea, let me know !
Many thanks
Have you tried the glow image effect ?
Yes I have already try this solution.
But the problem is that the glow effect is apply to all my scene.
I need to apply the glow effect to specific objects.
Many thanks for your help !
That’s perfectly possible. Read the “Details” section of that page to learn how.
I’m sorry but I don’t understand how to solve what I’m looking for.
Can you give more information step by step ?
Yes I’m using the PRO version.
The glow effect is exatly what I’m looking for, but I want to add this effect to a specific object in my scene.
I’m lost for this point, so if you can explain me …
What is the specific problem you are having with setting up the glow effect? The manual page I linked explains it pretty well.
My problem is that when I put the glow effect on my camera all the objects have glow effect.
I want to have this glow effect on specifics objets whose are in my scene.
Hope you can explain me how to do that step by step.
English is not my first language, so that’s why it is a little bit difficult to understand … but I do my best !
My problem is that when I put the glow effect on my camera all the objects have glow effect.
I want to have this glow effect on specifics objets whose are in my scene.
Hope you can explain me how to do that step by step.
English is not my first language, so that’s why it is a little bit difficult to understand … but I do my best !
You can do it with render textures and replacement shaders.
Flashbang explained it on their technology blog, though a bit light on details. It allows for per-object, mutli-colored glow while still allowing for transparency.
http://technology.blurst.com/
As it’s the holy grail for glow, and probably the most asked for shader request over the years, I’m very surprised no shader guru has come up with an example project using the technique.