Two Questions
by Jeff Gran · in · 04/19/2005 (1:06 am) · 12 replies
1) Can the sun be used to directly illuminate DTS objects (i.e. cause them to self-shadow or pseudo-self shadow...I'm still a little unclear on how this works)?
2) The shadows on the terrain are darker than the shadows on the dif in this screenshot. The sun is the only light in the scene. I have changed the texture on the terrain, but the terrain's half of the shadow is always darker no matter how light the texture is. Is there any way to offset one or the other shadow-type's parameters to fix this?

Thank you.
2) The shadows on the terrain are darker than the shadows on the dif in this screenshot. The sun is the only light in the scene. I have changed the texture on the terrain, but the terrain's half of the shadow is always darker no matter how light the texture is. Is there any way to offset one or the other shadow-type's parameters to fix this?

Thank you.
#2
Hi Jeff,
I think FruitBat is correct when setting up my lighting I usually replace all of my textures with the same solid color texture, then I can easily compare the light colors and intensities. Also check to make sure that your interior map file's ambient lighting value in the WorldSpawn is set to '0 0 0 0', otherwise map2dif will add ambient lighting to your interior.
There are way of simulating DTS to DTS shadows on TSStatics using 'light linking' (see the Modeler's Guide), but this technique only works on TSStatics and very simple shadows from Lighting Pack light objects.
Let me know if this helps!
-John
04/19/2005 (10:11 am)
Thanks FruitBat, that's a very cool description.Hi Jeff,
I think FruitBat is correct when setting up my lighting I usually replace all of my textures with the same solid color texture, then I can easily compare the light colors and intensities. Also check to make sure that your interior map file's ambient lighting value in the WorldSpawn is set to '0 0 0 0', otherwise map2dif will add ambient lighting to your interior.
There are way of simulating DTS to DTS shadows on TSStatics using 'light linking' (see the Modeler's Guide), but this technique only works on TSStatics and very simple shadows from Lighting Pack light objects.
Let me know if this helps!
-John
#3
FruitBat: I scoffed at your "A and B are the same colour" and had to experiment in Photoshop to prove to myself that you're right, and you are. It's amazing!
I didn't know about the ambient light setting on the Worldspawn. I have a feeling that might be my culprit. I'll have to check it out tonight.
About the DTS objects.. maybe I wasn't clear on what I meant. Right now I have the Sun as the only light in my scene, and I would like to keep it that way (it is an outdoor scene). The only "problem" I have with the light right now is that the TSStatics in my scene are all evenly lit all the way around, instead of light on the side facing the sun and dark on the side facing away. I can get this "direct light" effect by using a USL coming from the same angle as the sun, but using a spotlight distorts the direction of the rays. Is there a USL that uses "directional light" raycasting instead of "spot light" or "point light" style? I couldn't find one.
04/19/2005 (11:08 am)
Thanks for the replies!FruitBat: I scoffed at your "A and B are the same colour" and had to experiment in Photoshop to prove to myself that you're right, and you are. It's amazing!
I didn't know about the ambient light setting on the Worldspawn. I have a feeling that might be my culprit. I'll have to check it out tonight.
About the DTS objects.. maybe I wasn't clear on what I meant. Right now I have the Sun as the only light in my scene, and I would like to keep it that way (it is an outdoor scene). The only "problem" I have with the light right now is that the TSStatics in my scene are all evenly lit all the way around, instead of light on the side facing the sun and dark on the side facing away. I can get this "direct light" effect by using a USL coming from the same angle as the sun, but using a spotlight distorts the direction of the rays. Is there a USL that uses "directional light" raycasting instead of "spot light" or "point light" style? I couldn't find one.
#4
Woops, I misunderstood the question. :) Open the mission editor, select the TSStatic object, select the lighting roll-out, and check the receiveSunLight checkbox, this sets up the sun as a light source.
-John
04/19/2005 (12:30 pm)
Hi Jeff,Woops, I misunderstood the question. :) Open the mission editor, select the TSStatic object, select the lighting roll-out, and check the receiveSunLight checkbox, this sets up the sun as a light source.
-John
#5
I'm thinking I could cut custom holes in my DIF for the trees as a workaround. There's already a square base (that needs to be aligned!) on the shape to fill the hole with..
Or maybe I should cut that DIF out altoghether..now it's causing two problems. I wish I could paint detail textures on different parts of the terrain.
04/19/2005 (11:57 pm)
Thanks again for the quick reply, John. So I did some more testing just now and here is what I found. All of the DTSs have receiveSunLight on. The trees that you can see the base of in the picture above were not being lit when in contact with the interior below, even with receiveLMLighting unchecked. When I deleted that interior and the trees were then "planted" directly on the terrain, they were lit as they should have been and as the Modeler's Guide describes. Is this expected behavior?I'm thinking I could cut custom holes in my DIF for the trees as a workaround. There's already a square base (that needs to be aligned!) on the shape to fill the hole with..
Or maybe I should cut that DIF out altoghether..now it's causing two problems. I wish I could paint detail textures on different parts of the terrain.
#6
To:
I just retested all of the static lighting options (based on the chart in the Modeler's Guide) with this code and they all work properly on both interiors and the terrain.
Let me know if this helps!
-John
04/20/2005 (1:25 am)
Ouch, that's a bug. You can fix it by going into sgTSStatic.cc and changing lines 177 and 178 from:if((mLightingInfo.mLightSource == LightingInfo::Terrain) &&
(sgTSStaticData.sgReceiveSunLight) && (!fullcustomambient))To:
if((sgTSStaticData.sgReceiveSunLight) && (!fullcustomambient))
I just retested all of the static lighting options (based on the chart in the Modeler's Guide) with this code and they all work properly on both interiors and the terrain.
Let me know if this helps!
-John
#7
04/20/2005 (12:54 pm)
Thanks! I'll direct my programmer-type-guy to this thread and have him patch it up.
#8
I've looked for the code you show above but I do not have the file sgTSStatic.cc.
Please help. I've been at this for days. All I want is a shadow! :P
David
04/22/2005 (7:38 am)
I do not have the lighting pack, and all I want to do is add a basic shadow to my satic objects. I must assume that if you can get a player to cast a shadow while moving that it shouldn't be difficult to get a shadow from a static object. My scene is also outdoors.I've looked for the code you show above but I do not have the file sgTSStatic.cc.
Please help. I've been at this for days. All I want is a shadow! :P
David
#9
You do not have the sgTSStatic.cc file because you do not Synapse Gaming Lighting Pack, which is what this forum is for. Also, you should probably start another thread for your issue instead of hijacking this one.
04/22/2005 (8:01 am)
@DavidYou do not have the sgTSStatic.cc file because you do not Synapse Gaming Lighting Pack, which is what this forum is for. Also, you should probably start another thread for your issue instead of hijacking this one.
#10
Lighten up Todd. Nobody's hijacking anything. This is what forums are for, and this was related to the problem I was having, so take your wild hair somewhere else.
-David
04/22/2005 (8:42 am)
OK, so I get the lighting pack, then static objects will cast shadows.Lighten up Todd. Nobody's hijacking anything. This is what forums are for, and this was related to the problem I was having, so take your wild hair somewhere else.
-David
#11
"OK, so I get the lighting pack, then static objects will cast shadows."
Yes, you need the Lighting Pack if you want static objects to cast static shadows. Make sure the objects are TSStatics and that they have convex collision meshes, then the objects will start casting shadows onto interiors and the terrain.
-John
04/22/2005 (11:27 am)
Hi David,"OK, so I get the lighting pack, then static objects will cast shadows."
Yes, you need the Lighting Pack if you want static objects to cast static shadows. Make sure the objects are TSStatics and that they have convex collision meshes, then the objects will start casting shadows onto interiors and the terrain.
-John
#12
hola :p
-Joseph
04/22/2005 (11:44 am)
Jeff, good to see you got the lighting pack in the game at last... bet it looks much better now!hola :p
-Joseph
Torque Owner FruitBatInShades