Hello, Is it possible to make tube shape(Floresant Lamp) light source in Unity3D. Thank you.
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.
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.
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.