Light - omni type?
by Tobias Niva · in Artist Corner · 04/18/2007 (9:47 pm) · 13 replies
Feeling quite stupid here, but after a while searching I can't still find out how....
...I make a light in TGE?
I'm fiddleing around in the editor, moulded some terrain, adjusted the sun, imported a *.dts (made in Max) and also a sipmle structure/building (*.dif).
Now I was going to add a simple light (bulb type) in that building...but can't find any lights in the editors gui....
Or am I forced to make maps/levels in another tool (than Max>TGE) and add lights in there?
/Toby
...I make a light in TGE?
I'm fiddleing around in the editor, moulded some terrain, adjusted the sun, imported a *.dts (made in Max) and also a sipmle structure/building (*.dif).
Now I was going to add a simple light (bulb type) in that building...but can't find any lights in the editors gui....
Or am I forced to make maps/levels in another tool (than Max>TGE) and add lights in there?
/Toby
About the author
Graphics Artist @ www.gimbalgames.se
#2
04/19/2007 (4:53 pm)
Its easier than that. In the World Editor Creator, under Mission Objects -> Environment -> sgLightObject. Then just choose a datablock and you're set. Only mount a light if you want it to move or be dynamic. Check out the Torque Developer Network (TDN) for more information.
#3
Can't access TDN since I'm just playing around with a demo, trying to decide if TGE is the engine for me.
Read about C4 at a forum, and I like the part about C4 not beeing restricted to BSP-structures...and can import any Max-mesh I want, without having to adjust it to be BSP compatible (only convex shapes what I understand).
Since I'm going to make a "single player adventure" rather than a "heavy multiplayer map"...I prefer the freedom of beeing able to make more detailed meshes for structure/buildings.
Got off topic here....sorry.
Ross: So, if I just want to light my world/dif's (and lightmap them) the only thing I need to do is what you describe?
And if I want the light to affect dts's and cast shadow from those, I need to mount the light in order to make it dynamic?
04/19/2007 (5:53 pm)
Thanx.Can't access TDN since I'm just playing around with a demo, trying to decide if TGE is the engine for me.
Read about C4 at a forum, and I like the part about C4 not beeing restricted to BSP-structures...and can import any Max-mesh I want, without having to adjust it to be BSP compatible (only convex shapes what I understand).
Since I'm going to make a "single player adventure" rather than a "heavy multiplayer map"...I prefer the freedom of beeing able to make more detailed meshes for structure/buildings.
Got off topic here....sorry.
Ross: So, if I just want to light my world/dif's (and lightmap them) the only thing I need to do is what you describe?
And if I want the light to affect dts's and cast shadow from those, I need to mount the light in order to make it dynamic?
#4
I can mention that I took a copy of the "tutorial.base" folder as a starting point for my scene/map/game.
But I can't figire out what's wrong, 'cause the light
04/19/2007 (6:55 pm)
Hmm...I tried to add a sgLightObject into my scene...but I don't get any datablocks in the droplist on creation. I can name it but it won't show any datablocks. :/I can mention that I took a copy of the "tutorial.base" folder as a starting point for my scene/map/game.
But I can't figire out what's wrong, 'cause the light
#5
Tutorial.base does not have this, but starter.fps does.
04/19/2007 (7:41 pm)
Easy fix. Shove this script in the OnServerCreated() function usually found in game.csexec("common/server/lightingSystem.cs");Tutorial.base does not have this, but starter.fps does.
#6
I added a sgLightObject > named it testLight > chose sgDefaultLightDataBlock as datablock when in inspector-mode...
And yes, I have light in my scene - but a VERY faint one.
Now what?!
I see a lot of parameters under the tab "Dynamic Fields" in the inspector...but NOTHING seems to affect my lighting?!
To add to my confusion, I haven't got grip of the Light Editor. Do I even have to get into that in order just to get my light stronger?!?
Maybe I'm really stupid...but this feels very hard for such a simple thing as adding a light inside a building...
Sorry for sounding like this, but I'm a graphics designer, and I'm REALLY not used to doing too much tech stuff in order to do such a simple thing...
04/19/2007 (10:10 pm)
This is just too damn "un-intuitive"... *sigh*I added a sgLightObject > named it testLight > chose sgDefaultLightDataBlock as datablock when in inspector-mode...
And yes, I have light in my scene - but a VERY faint one.
Now what?!
I see a lot of parameters under the tab "Dynamic Fields" in the inspector...but NOTHING seems to affect my lighting?!
To add to my confusion, I haven't got grip of the Light Editor. Do I even have to get into that in order just to get my light stronger?!?
Maybe I'm really stupid...but this feels very hard for such a simple thing as adding a light inside a building...
Sorry for sounding like this, but I'm a graphics designer, and I'm REALLY not used to doing too much tech stuff in order to do such a simple thing...
#7
(You have to hit F11 first, I think). But the changes will take effect in real time.
It's not one of the stronger parts of the toolkit.
05/04/2007 (12:39 am)
Hit F12 to get the light editor. It's a bit buggy but it does, eventually, allow you to save your changes.(You have to hit F11 first, I think). But the changes will take effect in real time.
It's not one of the stronger parts of the toolkit.
#8
Torque uses an object/datablock model - datablocks contain static data that tell objects how to behave, and objects are assigned a datablock. This allows objects to easily share the same properties (using the same datablock).
The Light Editor creates datablocks. The Objects Creator creates mission objects (you can create lights under the object tree: Mission Objects -> environment -> sgLightObject). When you create a light the Object Creator will pop up a dialog asking for the object name and the datablock to use. You can either assign a light object an existing datablock or create a new one using the Light Editor.
From TDN:
Lee,
What kind of problems are you seeing? Also what version of TGE/TLK?
Make sure you have the light datablock you'd like to save selected in the Light Editor - it only saves the current datablock (this avoids saving changes to other datablocks you might not want to keep).
05/04/2007 (1:08 am)
Hi Tobias,Torque uses an object/datablock model - datablocks contain static data that tell objects how to behave, and objects are assigned a datablock. This allows objects to easily share the same properties (using the same datablock).
The Light Editor creates datablocks. The Objects Creator creates mission objects (you can create lights under the object tree: Mission Objects -> environment -> sgLightObject). When you create a light the Object Creator will pop up a dialog asking for the object name and the datablock to use. You can either assign a light object an existing datablock or create a new one using the Light Editor.
From TDN:
Quote:
Torque Lighting System lights consist of two components; the light datablock and the light object. In Torque's object/datablock architecture, datablocks contain static data, which is shared among multiple objects. This makes configuring and updating multiple objects extremely easy, as changes to the datablock affect all objects that reference it.
Following this model light datablocks contain common lighting information, such as color, intensity, and type (omni/spotlight), which is shared between multiple light objects. Light objects are the physical light locations placed in the scene, which provide the actual illumination.
Lee,
What kind of problems are you seeing? Also what version of TGE/TLK?
Make sure you have the light datablock you'd like to save selected in the Light Editor - it only saves the current datablock (this avoids saving changes to other datablocks you might not want to keep).
#9
I know Apparatus was working on a guide to help, but I have not heard of him recently.
05/04/2007 (2:09 am)
Honestly John, having been granted access to TLK since I own TGE 1.5, I think the TDN doc is a bit short.I know Apparatus was working on a guide to help, but I have not heard of him recently.
#10
05/04/2007 (8:46 am)
What areas are you having trouble with, what do you think is missing? The feedback will help us build better docs next time around.
#11
I've just spent a half hour trying to reproduce my troubles, and naturally it's working just fine. I'm wondering if my problems may have had something to do with some bizarre stuff I was doing some time ago (accidentally spawning a second server process!).
I'll bookmark this thread and post reproduceable steps if it happens again.
05/04/2007 (2:38 pm)
Sorry for the delay, I decided to get some sleep before responding in hopes of being thorough and coherent.I've just spent a half hour trying to reproduce my troubles, and naturally it's working just fine. I'm wondering if my problems may have had something to do with some bizarre stuff I was doing some time ago (accidentally spawning a second server process!).
I'll bookmark this thread and post reproduceable steps if it happens again.
#12
Also, wouldn't it be wise to be able to define, light locations in an interior program such as QuArk or Constructor (though I really have to give the latest one, time it requires).
And finally a question/suggestion:
Intensity of lights is defined in the light datablock, isn't there a way we can then have a per object intensity (based upon the max intensity defined in the datablock)?
I wanted to post this for a while and always delayed.
Thanks for your time John.
07/09/2007 (4:52 am)
John:Quote:Only mount a light if you want it to move or be dynamic.This is missing for example. :)
Also, wouldn't it be wise to be able to define, light locations in an interior program such as QuArk or Constructor (though I really have to give the latest one, time it requires).
And finally a question/suggestion:
Intensity of lights is defined in the light datablock, isn't there a way we can then have a per object intensity (based upon the max intensity defined in the datablock)?
I wanted to post this for a while and always delayed.
Thanks for your time John.
#13
Lighting defined in the datablock is a preference I suppose. I find it easier to have all of the information localized in one place for common lights to share, while others will find it to be a hassle having to create new datablocks for just one light. The light editor does allow you to clone light datablocks, however, if it is any consolation.
07/09/2007 (10:34 am)
You can define lights in interior creators, Map2Dif will then calculate lighting and bake the lighting into the interior. Although this may have been removed or changed recently, not positive.Lighting defined in the datablock is a preference I suppose. I find it easier to have all of the information localized in one place for common lights to share, while others will find it to be a hassle having to create new datablocks for just one light. The light editor does allow you to clone light datablocks, however, if it is any consolation.
Torque 3D Owner Ron Nelson
Also adding the omni light helped for lighting the faces of the lamp I placed the bulb into. Tha way it looks like the lamp is recieving light too.