x


Is it possible to create a torus-/ring-shaped light? If so, how?

As the title says. I've been searching Google, but I can't get my head around it. Thanks in advance!

more ▼

asked Jun 03 '12 at 12:59 PM

Thevet gravatar image

Thevet
32 1 1 2

What is your goal? How large relative to the scene do you want the light? You can create a torus and give it an "emit" texture. This won't cast any new light but it will "appear" that the torus is a source of light. You can then place a point light in the center of the torus to actually cast a light. This will be a "close" notion.

Jun 03 '12 at 01:07 PM kolban

I'm looking to create a ring of light inside a very dark scene that keeps expanding around the player, but also travels across any mesh it touches. Prototype 2's ping function is a good represenation of what I'm trying to achieve. I've been advised to use lighting, but if you have any other suggestions, please tell. Sorry for the unclear question.

Jun 03 '12 at 04:34 PM Thevet
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

It sounds like what you want is not "A LIGHT FITTING" (like "a chandelier")

What you want is like "SOME LIGHT FALLING ON STUFF"

In other words if I pointed a spotlight on a floor, that would be a "circle of light" on the floor -- what you want is a "donut of light"

Is that correct?

If so, I have your answer. You have to learn about "Projectors"

If you look at blob shadows, that is exactly what a projector is.

In your project, look around for the free standard assets that unity gives you.

Add a projector, blob shadow. In fact, ther eis indeed one that is a "shadow" (it's dark) and there is one that is a "light blob" .... which is exactly what you are asking for, I believe.

the only difference is you want a particular shape (a donut) rather than just a circle.

From here, you will have to do the work to figure out how to make it your own custom shape! I hope, that helps!


FTR earlier answer,

Just use a "self-illuminated shader"

http://unity3d.com/support/documentation/Components/Built-in%20Shader%20Guide.html http://unity3d.com/support/documentation/Components/shader-SelfIllumFamily

more ▼

answered Jun 03 '12 at 04:43 PM

Fattie gravatar image

Fattie
19.2k 58 87 148

Then looking into projectors it is. Thank you very much.

Jun 03 '12 at 04:51 PM Thevet

Nice catch, none of us understood what he was trying to do ^^

Actually, for light sources, there is already a Unity feature dedicated to this, called "Light Cookie". It's an alpha texture that's applied directly to the light source, so there's no need to fiddle around with Projectors: http://unity3d.com/support/documentation/Components/class-Light.html

Jun 03 '12 at 06:48 PM Wolfram
(comments are locked)
10|3000 characters needed characters left

If you don't need the light to move in the scene, make a mesh torus, give it a light emitting material and bake it with the lightmapper. If you do need the light to change in the scene, give it a point light in the middle. An area based light is too complicated to run at runtime (at the very least without some complicated shader-fu)

more ▼

answered Jun 03 '12 at 01:29 PM

Mortoc gravatar image

Mortoc
915 2 7 14

My light is supposed to expand around the player, but also travel across any mesh it touches, much like Prototype 2's ping function. Would a similar approach work for this? Sorry for the unclear question.

Jun 03 '12 at 04:36 PM Thevet
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x427
x427
x53
x18
x4

asked: Jun 03 '12 at 12:59 PM

Seen: 696 times

Last Updated: Sep 19 '12 at 04:50 AM