Jump to content

Lua lighting for florescent lights..


Chiblue
 Share

Recommended Posts

I have a model that represents 3 florescent lights tubes strung in a line, I want to use then to light my scene but do not know how to script my Lua for the object to make them appear to light the area like florescent tubes.

 

Can anyone make a suggestion, I have tried to use all types of lights in LE but cannot get the look and feel I want, a point light is the closest but I want in affect a point light the length of the tube?

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

You can look at the cage light. It has glowing material and a point light added via script.

That's exactly how I did it in this scene:

 

post-51-079706400 1288642460_thumb.jpg

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

That's what you said wasn't working for you? You said 1 pointlight wasn't giving you what you wanted, but that's what they are saying they are doing. Now you are confusing me <_<

 

And it is not, I just did this and it basically gives me what I had with the point light, I thought maybe I am missing something... sorry... I am still getting the point light reflection from the ceiling... this is what I do not want... see attached..

 

In the image notice the point light on the ceiling, I want this to look like the light splatter from the tube not a point...

post-263-061764000 1288660010_thumb.jpg

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

I went back and looked at mine and I in fact used spotlights (which are also cheaper to render) but I have a full reflector fitting around my florescent tubes which prevents any light from being cast upwards and reflecting off the ceiling; even if I were using point lights. Mac's suggestion sounds the most plausible given your situation.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

I played around with using multiple point lights on the object model, after many different scenarios, what I found to be the best all round look that I wanted was to use a point light and position it a short distance beneath the light model, and have no lights attached to the model, this allows me to move the light up and down to get the glow I wanted.. I also change the light model not to cast shadows, so that the point light gave a glow on the ceiling.

 

I also tried to add the point light to the objects lua script and set a parameter so that I could position the light within the settings for the model, but I could not get this to work, I seems that the light position can only be set during initialization of the model class not afterward, unless anyone else has done this and can provide a point light script to show how to do it?

 

thanks for all the suggestion..

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Short of making your own shader that's about as much as you can do I think.

 

The book ShaderX5 covers something like this in the (small) section named "A Simple Area Light Model for GPUs by Aick in der Au". He implements a Blinn and Phong lighting equation for rectangular area lights. Probably too much for what you want but I mention it in case you're really serious.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Thanks, I will take a look at that Book, I am interested in shaders and the only shader infomration I have is form the Open GL bible.

 

I did play around trying to create a shader for this, but I do not know how to apply that shader to a scene in Editor, I believe someone said earlier or in a different post, that the lights are hard coded within the Editor so we cannot easily add new lights. We can only create variations of the basic lights available.

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...