- Home /
Tube like light source
Hello, Is it possible to make tube shape(Floresant Lamp) light source in Unity3D. Thank you.
Answer by superpig · Apr 24, 2011 at 10:29 PM
If you're using lightmapping: Yes, just set up your tube mesh and use an emissive (self-illuminating) shader on it. Set the Emission (Lightmapper) property of the material to something greater than 0. (Note that this might only work in Unity Pro - I don't know how much is available in Unity Indie).
For dynamic stuff: Not really. It's common to just place one or more point lights next to your tube. You could also try using a spotlight with a cookie texture, to 'box' the light to the right outgoing shape.
Another way could be to use a orthographic projector to project a light-texture but that's not the same as a "real" light. http://unity3d.com/support/documentation/ScriptReference/Projector.html
Superpig, I dont have professional version of Unity, But my friend followed up your instruction. But we could not get success..Is something missed? if it possible could you put a project? It would usefull for other user mess with this. Thank you.
Object turn to bright object but it does not illu$$anonymous$$ate the neighbour objects
Also, if you tried the emission settings in Unity Pro, make sure that you've set up and baked the lightmaps! You won't see any visible changes until you've done that. $$anonymous$$ore info in the manual here: http://unity3d.com/support/documentation/$$anonymous$$anual/Lightmapping.html
Answer by Eric5h5 · Apr 24, 2011 at 11:35 PM
You can use multiple point lights to simulate this, reducing the intensity of each one proportional to the total number. For example, if you use 5 lights in a row to simulate a single light where the intensity should be 1.0, then have the intensity of each individual light be 0.2. This is, of course, more resource-intensive than using a single light. Using deferred rendering may mitigate this to some extent, since the cost depends on the number of pixels lit rather than the total number of lights. You should also make sure you set the quality settings to use an appropriately high number of pixel lights.
Answer by Honorsoft · Jan 31, 2021 at 12:55 PM
It's 2021, but I haven't found any/many posts about "tube lighting" in Unity, so I will post here. I will keep looking, but I haven't found anything yet about making a long light source in Unity (2018-2019), such as you would see along a laser beam as it passes objects. I have read posts of others attempting such an effect and they mention "spotty" lighting because they have to use a series of poit lights instead of a beam. Does anyone have any advice, insight or suggestions? I prefer Unity 2019 LTS and below version answers, thanks in advance.
Your answer
Follow this Question
Related Questions
The wrong light in the room when used Precomputed Realtime GI. Unity 2017 0 Answers
How to fix weird baking noise and lines ? 0 Answers
How does Beast lightmapper determine the number of lightmaps it generates? 1 Answer
Problem with emissive materials/ lighting after Collab 0 Answers
Baking lightmaps within 3dsmax for a Unity scene that has duplicate meshes 2 Answers