fluorescent lamp tube using T3D lighting?
by Gibby · in Torque 3D Professional · 06/25/2014 (7:26 pm) · 28 replies
Greets all...
Wondering if anyone out there has a datablock/starting point for a T3D light object that emulates a long tubular fluorescent lamp...
...I've already added the glow map to the model's texture, but I need a light source coming from it. Think spooky, empty parking lot lamps...
Wondering if anyone out there has a datablock/starting point for a T3D light object that emulates a long tubular fluorescent lamp...
...I've already added the glow map to the model's texture, but I need a light source coming from it. Think spooky, empty parking lot lamps...
#2
That's what I've done and it's convincing from a distance but as you get close it doesn't seem to conform to the long shape of the flourescent tube - you can tell the light comes from a single point...
06/26/2014 (7:50 am)
@Steve: Quote:... er ... add a pointlight ... ?
That's what I've done and it's convincing from a distance but as you get close it doesn't seem to conform to the long shape of the flourescent tube - you can tell the light comes from a single point...
#3
06/26/2014 (8:54 am)
Two point lights?
#4
I can offer little alternative if I understand correctly what you want. to achieve the light beam forms a cone shape or kind you need to place the light source in a concave dish solid body which casts a shadow, so you cut off the rays that will be cut in the wall of the solid body and the light will be shed only where it is not and it will look naturally.
06/26/2014 (8:58 am)
@GibbyI can offer little alternative if I understand correctly what you want. to achieve the light beam forms a cone shape or kind you need to place the light source in a concave dish solid body which casts a shadow, so you cut off the rays that will be cut in the wall of the solid body and the light will be shed only where it is not and it will look naturally.
#5
I'm using two point lights to try to simulate a flourescent tube - unfortunately the tube is modeled only as a texture on a flat plane, so 'cutting off the rays' won't work...
06/27/2014 (2:23 pm)
@Olexi:I'm using two point lights to try to simulate a flourescent tube - unfortunately the tube is modeled only as a texture on a flat plane, so 'cutting off the rays' won't work...
#6
06/27/2014 (9:41 pm)
have you tried adding emissive to the tubes material?
#8
Overall there are a few options but frankly what it comes down to is the lighting system could use some work for different shape lights. I dabbled with it a little recently but just didn't have time to really get in to it.
06/28/2014 (10:40 am)
If you're having issues with the light "leaking", you could always use a 3D texture mask for it. The only drawback to this is the lamp housing won't be lit at all anymore. Although for that, you could always just put the lighting in to the texture for the housing. Or you could use some very small radius point lights for that.Overall there are a few options but frankly what it comes down to is the lighting system could use some work for different shape lights. I dabbled with it a little recently but just didn't have time to really get in to it.
#9
I'm with Jacob here, the lighting system needs some love.
06/28/2014 (11:30 am)
Nice gun - need some wind for that smoke/steam - light poles look pretty good but you're right, the face of the light housing shouldn't be lighted by the "light tubes" like that.I'm with Jacob here, the lighting system needs some love.
#10
...hehehe I'm scripting a procedural/random environment system and have it disabled for now. I do have all the night/day lighing in my levels automated, just adding in random rain/wind/clouds...
07/01/2014 (2:56 pm)
@Richard:Quote:need some wind for that smoke/steam
...hehehe I'm scripting a procedural/random environment system and have it disabled for now. I do have all the night/day lighing in my levels automated, just adding in random rain/wind/clouds...
#12
07/02/2014 (8:35 pm)
@Olexiy: Yes!
#13
Note: Be sure to set the alpha transparency and transparency settings to select opposite "Add" or "AddAlpha", so that through the beam it was possible to see the rest of objec scene.
07/03/2014 (7:53 am)
I realized this effect by combining a concave shape of the light beam as a separate object in the model of the lamppost, that is - the light beam itself is the concave inward normals mesh on it attached material most simple without textures, but it is configured the transparency and yellow color with grow flag is marked. So on the objec lamppost separate materaal and his beam of light on the other. In this case both are one and the same object in the scene. Then I added the most ordinary light point.Note: Be sure to set the alpha transparency and transparency settings to select opposite "Add" or "AddAlpha", so that through the beam it was possible to see the rest of objec scene.
#14
07/03/2014 (8:28 am)
In fact it is crude hack and does not look nice when a beam of light enters the object, the beam of light gets very bright, but maybe you could do it for a long time messing with the settings to find a solution of the material, I just create one fast all together for 3 minutes in order to give a demo and the idea, but you can try transform my demo in something more beautiful.
#15
07/03/2014 (8:37 am)
hmm ... I tried to make light beam mesh normals on the outside and in my opinion turned out not so bad.
#16
07/04/2014 (12:39 am)
@Olexiy: Clever! I'll give that a try - I'll simply need to add a setMeshHidden in there somewhere when the sun comes up...
#17
07/04/2014 (6:06 am)
Alternatively, you can simply replace the material is completely transparent and invisible and casts no shadows.
#18
08/19/2014 (2:00 am)
As an easier solution; did you try using a cookie?// tubelight
%light = new SpotLight()
{
cookie = "art/gui/tubelight.png";
...
#19
08/19/2014 (8:09 am)
@Nils. I'm curious to try your method, but I do not understand what is a cookie? and how to use it? what it does, and how the processes of the mechanism ???
#20

So in case of the tube light, @Gibby could add 2 light sources. One is a pointlight below the tube mesh that lights up the objects that are close. The other one is a spotlight that will illuminate the ground surface. Create a cookie (black) with the shape of a tube (white) and give it really diffuse edges (blur) The light that shines down will get the shape of a tube and the lightbeam expands when it's further away from the light source. Finish it off with a glow effect on the tube mesh and make the material emissive.
To add a cookie to a spotlight add the line with "cookie" in the mission file -> your spotlight. Make sure it points to the correct file.
Edit: Or use the editor to add a cookie (Advanced Lighting rollout). And I didn't meant you can simulate volume light with this. Sorry if this is confusing!
08/19/2014 (8:55 am)
A cookie can be represented as a sheet you can slide in front of a spotlight and project this on the surface where the light ends. In T3D black will block light, and white will let it pass through.
So in case of the tube light, @Gibby could add 2 light sources. One is a pointlight below the tube mesh that lights up the objects that are close. The other one is a spotlight that will illuminate the ground surface. Create a cookie (black) with the shape of a tube (white) and give it really diffuse edges (blur) The light that shines down will get the shape of a tube and the lightbeam expands when it's further away from the light source. Finish it off with a glow effect on the tube mesh and make the material emissive.
To add a cookie to a spotlight add the line with "cookie" in the mission file -> your spotlight. Make sure it points to the correct file.
new SpotLight()
{
cookie = "art/gui/tubelight.png";
}Edit: Or use the editor to add a cookie (Advanced Lighting rollout). And I didn't meant you can simulate volume light with this. Sorry if this is confusing!

Do I understand correctly you want to achieve this effect?
Associate Steve Acaster
[YorkshireRifles.com]