What kinds of "lights" ...
by TalRasha · in General Discussion · 04/08/2002 (1:39 pm) · 72 replies
are in the v12 engine ?
.. i set some of the lights in my testmap, but i can^t see light in the Engine!
.. i set some of the lights in my testmap, but i can^t see light in the Engine!
About the author
#42
holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/
can be found through the Community Links at:
www.garagegames.com/docs/torque/
I have tried to make it fairly generic for QuArK, WC, and GTK mappers. But when it comes to direct mapping issues I use QuArK. And, I will post the lighting as a resource when its more complete.
---------------------------------------
I have just gotten Torque into the "official" release of QuArk, so down the road there won't be a "quark4torque". Anyone can get the latest "official" snapshot of QuArk from: www.planetquake.com/quark/
Or the previous "quark4torque" at: holodeck.st.usm.edu/vrcomputing/vrc_t/scenebuilding_files.shtml
---------------------------------------
@Ace
The portals have no effect on the use of the seven lighting types. That is, the lights will work with or without portals, inside or outside the structure. So, it appears there is a config problem with WC or Hammer. Could you post a snippet from your map file of the target entity--it seems that map2dif doesn't like the way its described in the map file. On the other hand, the add-on I created for QuArK is based on the WorldCraft.fgd. But let me look anyway :)
Here is what a spotlight and target looks like in a map generated by QuArK; following the // are just comments created by QuArK as part of its treeview index (makes it easy to find).
Note that the target has two non-class specifics: "origin" and "name" followed by their arguments. The "name" argument matches the argument for the "target" specific in the light_spot entity above.
04/26/2002 (9:13 am)
This tutorial link:holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/
can be found through the Community Links at:
www.garagegames.com/docs/torque/
I have tried to make it fairly generic for QuArK, WC, and GTK mappers. But when it comes to direct mapping issues I use QuArK. And, I will post the lighting as a resource when its more complete.
---------------------------------------
I have just gotten Torque into the "official" release of QuArk, so down the road there won't be a "quark4torque". Anyone can get the latest "official" snapshot of QuArk from: www.planetquake.com/quark/
Or the previous "quark4torque" at: holodeck.st.usm.edu/vrcomputing/vrc_t/scenebuilding_files.shtml
---------------------------------------
@Ace
The portals have no effect on the use of the seven lighting types. That is, the lights will work with or without portals, inside or outside the structure. So, it appears there is a config problem with WC or Hammer. Could you post a snippet from your map file of the target entity--it seems that map2dif doesn't like the way its described in the map file. On the other hand, the add-on I created for QuArK is based on the WorldCraft.fgd. But let me look anyway :)
Here is what a spotlight and target looks like in a map generated by QuArK; following the // are just comments created by QuArK as part of its treeview index (makes it easy to find).
// Entity 1
// lights:g[2] -> light_spot:e[1]
{
"classname" "light_spot"
"origin" "-88 -216 4"
"color" "255 255 255"
"alarm_type" "0"
"falloff1" "10"
"falloff2" "200"
"distance1" "10"
"distance2" "200"
"target" "TL3"
}
// Entity 2
// lights:g[2] -> target:e[2]
{
"classname" "target"
"origin" "-92 -248 -52"
"name" "TL3"
}Note that the target has two non-class specifics: "origin" and "name" followed by their arguments. The "name" argument matches the argument for the "target" specific in the light_spot entity above.
#43
Should I post my map/dif files?
04/26/2002 (10:05 am)
I don't get it... the map file generated by Hammer looks pretty good, I don't see any problem with it:{
"classname" "target"
"name" "target01"
"targetname" "target01"
"origin" "752 -192 -352"
}
{
"classname" "light_spot"
"color" "253 191 77"
"falloff1" "10"
"falloff2" "100"
"distance1" "10"
"distance2" "100"
"target" "target01"
"origin" "936 -232 -48"
}But there is NO spotlight in my building in the engine...!?? Isn't anybody else working with Hammer?Should I post my map/dif files?
#44
// Entity 5
// light_spot:e[37]
{
"classname" "light_spot"
"origin" "-2 4 476"
"color" "255 255 255"
"alarm_type" "0"
"falloff1" "10"
"falloff2" "200"
"distance1" "10"
"distance2" "200"
"target" "TL3"
}
04/26/2002 (10:25 am)
heres what i get in the .map file// Entity 5
// light_spot:e[37]
{
"classname" "light_spot"
"origin" "-2 4 476"
"color" "255 255 255"
"alarm_type" "0"
"falloff1" "10"
"falloff2" "200"
"distance1" "10"
"distance2" "200"
"target" "TL3"
}
#45
I've tried another map, added a spotlight and exported it ... it generates the following entries in the .map file:
04/26/2002 (10:58 am)
Ace, you should post the entry for your "target" entity, too...I've tried another map, added a spotlight and exported it ... it generates the following entries in the .map file:
{
"classname" "light_spot"
"color" "255 255 255"
"falloff1" "10"
"falloff2" "100"
"distance1" "10"
"distance2" "100"
"target" "TL3"
"origin" "288 -96 88"
}
{
"classname" "target"
"name" "TL3"
"origin" "224 -96 -8"
}The export window reports the following:** Executing...
** Command: F:\ToRK\torque\tools\map2dif.exe
** Parameters: f:\tork\torque\example\
fps\data\INTERI~1\tork\bunker1.map
Successfully opened map file: f:\tork\torque\example\fps\data\
INTERI~1\tork\bunker1.map
Parsing mapfile...
*** More than one WAD file assigned to this map
*** The map may not load correctly
done.
Creating BSP...done.
Marking active zones...done
Creating surfaces...done.
Lightmaps: Normal...Alarm...done.
Resorting and Packing LightMaps...done.
STATISTICS
- Total brushes: 27
+ structural: 26
+ detail: 0
+ portal: 1
- Number of zones: 2
- Number of surfaces: 161
** *** WARNING WARNING WARNING *** **
*** ** WARNING WARNING WARNING ** ***
Errors exists in this interior. Please use the debug rendering modes
to find and correct the following problems:
* Ambiguous brushes: 0
* Orphaned Polygons: 8
*** ** WARNING WARNING WARNING ** ***
** *** WARNING WARNING WARNING *** **
Exporting to runtime...done.
Writing Resource: persist..(f:/tork/torque/example/fps/data/
INTERI~1/tork/bunker1.dif)
Done.Checking the map for errors in Hammer reports the error posted above:This object has a 'target' value that isn't matched by a 'targetname' value in another object.Maybe the problem is that Hammer internally expects the property "targetname" instead of "name"?
#46
These are what map2dif is "expecting". Again, these are what I used in the QuArK add-on with no problem. Check the fgd being used by WC or Hammer for consistency here.
P.S. I just installed Hammer and configured it with the Torque.fgd. Made a quick map with a light_spot and target. Here is what the map result is:
@Stefan: Note there is no "target_name" key. It would seem that you don't have Hammer configured properly.
04/26/2002 (12:56 pm)
In the Torque.fgd is the following:name(target_source) : "Name" target(target_destination): "Target"
These are what map2dif is "expecting". Again, these are what I used in the QuArK add-on with no problem. Check the fgd being used by WC or Hammer for consistency here.
P.S. I just installed Hammer and configured it with the Torque.fgd. Made a quick map with a light_spot and target. Here is what the map result is:
{
"classname" "target"
"name" "TL3"
"origin" "-38 -314 0"
}
{
"classname" "light_spot"
"color" "255 255 255"
"falloff1" "10"
"falloff2" "100"
"distance1" "10"
"distance2" "100"
"target" "TL3"
"origin" "-512 0 -320"
}@Stefan: Note there is no "target_name" key. It would seem that you don't have Hammer configured properly.
#47
RE: Alarm setting...
That's for when the building is powered down-- In Tribes2 it would be when a generator was destroyed, it might turn all the lights to red, flashing, etc. It can be one or the other, but not both (contrary to the "normal and alarm" setting). For example, you might have a green omni set at "normal", and a red/black pulse set at "alarm".
I don't know how it relates to Torque, per sey, but in T2 it's related to 'powerCount'.
04/26/2002 (2:26 pm)
I've got Hammer--I'll give it a try, too. RE: Alarm setting...
That's for when the building is powered down-- In Tribes2 it would be when a generator was destroyed, it might turn all the lights to red, flashing, etc. It can be one or the other, but not both (contrary to the "normal and alarm" setting). For example, you might have a green omni set at "normal", and a red/black pulse set at "alarm".
I don't know how it relates to Torque, per sey, but in T2 it's related to 'powerCount'.
#48
04/26/2002 (3:12 pm)
Yeah, just don't know if the power count is active in Torque. That would be nice!
#49
Your .map snippit looks exactly like mine...
Here's my torque.fgd snippit:
I don't get it... :-(
04/26/2002 (3:37 pm)
Desmond, does your spotlight work then in Hammer??Your .map snippit looks exactly like mine...
Here's my torque.fgd snippit:
@BaseClass = Targetname [ name(target_source) : "Name" ] @BaseClass = Target [ target(target_destination) : "Target" ]Should be okay, too...?
I don't get it... :-(
#50
i dont have a torque.fdg or what ever its called do i need one (or where is it maybe i just cant find it)
04/26/2002 (4:09 pm)
i already posted my whole export report above (im sure i just dont understand how to set the light up for exporting)i dont have a torque.fdg or what ever its called do i need one (or where is it maybe i just cant find it)
#51
There is a capitalization error somewhere in the tribes.fgd. The spots are looking for a targetName rather than a targetname. I do apologize I don't have the exact spot (no pun intended)of the error. What I did was just used "replace" and changed all the instances of "Name" to lower case. That took care of the problem, though I will admit I don't know if it caused another. Other than scripting T2, I haven't programmed since QuickBASIC. :-( LOL
I'd definately recommend in Hammer to use the "show connections" option. This will put a spider-web thin line between your spot and target. While testing, I had a red, green, and blue light hitting the same target and it did fine.
Hope this fixes it for you. :)
Good luck!
04/26/2002 (4:54 pm)
Good news! You guys aren't crazy! (well, maybe this was driving you there ;) ). There is a capitalization error somewhere in the tribes.fgd. The spots are looking for a targetName rather than a targetname. I do apologize I don't have the exact spot (no pun intended)of the error. What I did was just used "replace" and changed all the instances of "Name" to lower case. That took care of the problem, though I will admit I don't know if it caused another. Other than scripting T2, I haven't programmed since QuickBASIC. :-( LOL
I'd definately recommend in Hammer to use the "show connections" option. This will put a spider-web thin line between your spot and target. While testing, I had a red, green, and blue light hitting the same target and it did fine.
Hope this fixes it for you. :)
Good luck!
#52
could you please send me your torque.fgd file??
It doesn't work changing the "Name" to "name"...
It still doesn't show any connections and there is still no spotlight... :-(
Thanks!!
04/27/2002 (12:33 am)
Eric-could you please send me your torque.fgd file??
It doesn't work changing the "Name" to "name"...
It still doesn't show any connections and there is still no spotlight... :-(
Thanks!!
#53
btw: can someone make a testmap with all (working) lights?
04/27/2002 (1:41 am)
then i need the (new)torque.fgd , too. (please send it to TalRasha@gmx.de)btw: can someone make a testmap with all (working) lights?
#54
The thing with the connections, does that work in WorldCraft 3.33 too? If so, how can I do this?
thanks!
Matthew
04/27/2002 (4:24 am)
could you sent me this .fgd file too? droll@proofedcodes.chThe thing with the connections, does that work in WorldCraft 3.33 too? If so, how can I do this?
thanks!
Matthew
#55
Here's how I got it to work. "bullseye" is the name I chose for the target.
Create light_spot entitity with the target as "bullseye". The light_emitter_spot doesn't work, although lines will show up.
Create new target entity. name = "bullseye". Hit the smartedit button, then 'add'. Create a new key called 'targetname' with a value of "bullseye".
On the menu, go to: VIEW--->SHOW CONNECTIONS and click it--a checkmark should appear. If it's all done correctly, there will be a line between the two entities.
Some notes: Caps DON'T matter. There will be a new error if you check the map. "Unused values" or something close to that. Do NOT hit fix--just leave it.
I would bet it IS in the tribes.fgd--if someone more familliar with it could look. Have no idea why it works for QuArK, though!
And finally: I just woke up and haven't had any java--but this should do the trick.
04/27/2002 (5:10 am)
Well guys, I apologize... I forgot to delete something when I tested the cap. thing.Here's how I got it to work. "bullseye" is the name I chose for the target.
Create light_spot entitity with the target as "bullseye". The light_emitter_spot doesn't work, although lines will show up.
Create new target entity. name = "bullseye". Hit the smartedit button, then 'add'. Create a new key called 'targetname' with a value of "bullseye".
On the menu, go to: VIEW--->SHOW CONNECTIONS and click it--a checkmark should appear. If it's all done correctly, there will be a line between the two entities.
Some notes: Caps DON'T matter. There will be a new error if you check the map. "Unused values" or something close to that. Do NOT hit fix--just leave it.
I would bet it IS in the tribes.fgd--if someone more familliar with it could look. Have no idea why it works for QuArK, though!
And finally: I just woke up and haven't had any java--but this should do the trick.
#56
the only thing is, you need some object BEHIND the target for the light to actually SHINE on, and the light must be recognizable on this object's texture...!
So, e.g. take a simple block-crate like object, texture it with some bright metal texture, then give your spotlight a red color, create a target entity inbetween the light and the crate and there you go! The light shines on the crate!
But it makes sense to add the "targetname" property anyway, because only then Hammer recognizes the link between the objects and shows the connection (if selected in the menu)!
So there really seems to be a bug in WC/Hammer, but the lights seem to work, anyhow...!
04/27/2002 (5:41 am)
Well, it seems that it worked all the time... you don't even need to put the "targetname" property in...the only thing is, you need some object BEHIND the target for the light to actually SHINE on, and the light must be recognizable on this object's texture...!
So, e.g. take a simple block-crate like object, texture it with some bright metal texture, then give your spotlight a red color, create a target entity inbetween the light and the crate and there you go! The light shines on the crate!
But it makes sense to add the "targetname" property anyway, because only then Hammer recognizes the link between the objects and shows the connection (if selected in the menu)!
So there really seems to be a bug in WC/Hammer, but the lights seem to work, anyhow...!
#57
All that matters is that it's working, right? ;) It'll be nice to have the spots.
Has anyone tried making a spot go through a translucent object, like stained glass? I was curious if the colors or shape of the light changes when it hits the target area. I doubt it, but ya never know...
04/27/2002 (5:56 am)
LOL... funny. :) Good job, Stefan.All that matters is that it's working, right? ;) It'll be nice to have the spots.
Has anyone tried making a spot go through a translucent object, like stained glass? I was curious if the colors or shape of the light changes when it hits the target area. I doubt it, but ya never know...
#58
So I took a translucent window/glass object created in 3DSMax (see this thread to get the files) and positioned it into the window of my Hammer DIF ...
but the spotlight doesn't seem to change its color or anything...
By the way, could everybody post some screenies of his/her spotlights, I'm curious to see how they look in your maps... And does anybody know how to get glass/windows directly in Hammer/QuArK/whatever?
Thanks!! :-)
04/27/2002 (6:52 am)
I've tried to let it shine through stained glass... but the glass was included in the TGE world editor (cause I can't get transparent objects in Hammer, all my glass PNGs are green and solid there ...?).So I took a translucent window/glass object created in 3DSMax (see this thread to get the files) and positioned it into the window of my Hammer DIF ...
but the spotlight doesn't seem to change its color or anything...
By the way, could everybody post some screenies of his/her spotlights, I'm curious to see how they look in your maps... And does anybody know how to get glass/windows directly in Hammer/QuArK/whatever?
Thanks!! :-)
#59
http://www.planetquake.com/noescape/dev1/ss1.jpg
04/27/2002 (7:15 am)
for quark use the null.jpg for windows,in the link below i have made panels in visible with the null.jpg ,makes for some cool observation windows in my space map,,,where the player is standing you can see in or out but you cant go throughhttp://www.planetquake.com/noescape/dev1/ss1.jpg
#60
I had planed on making a map with all the lights so I'll post that when I'm done if that will help anyone.
04/27/2002 (9:14 am)
There are a couple threads here and here about making transparent/translucent textures work with interiors. It never really looked right for me though, so I'm just using static shapes for windows. Besides not being the easiest things in the world to place they work pretty good. Plus they look really cool using the environment map for reflections. I had planed on making a map with all the lights so I'll post that when I'm done if that will help anyone.
Torque Owner Ace
here is my quark dos console after the export ( i just dont get it)
_____________________ Export220Map/Build High Detail DIF _____________________
F:\torque_maps\torque\tmpQuArK> "F:\torque_maps\torque\tmpQuArK\map2dif_DEBUG.ex
e" -v -h -o ./maps -t ./textures ./maps/spacehub.map
Successfully opened map file: ./maps/spacehub.map
Parsing mapfile...done.
Creating BSP...done.
Marking active zones...done
Creating surfaces...done.
Lightmaps: Normal... ! Target entity not found: 'TL3'Alarm...done.
Resorting and Packing LightMaps...done.
STATISTICS
- Total brushes: 48
+ structural: 48
+ detail: 0
+ portal: 0
- Number of zones: 1
- Number of surfaces: 283
Exporting to runtime...done.
Writing Resource: persist..(./maps/spacehub.dif) Done.
/maps/spacehub.bsp: ignored
/maps/spacehub.lin: ignored
Files stored in F:\torque_maps\torque\tmpQuArK\
Operation finished.
thanks