Lighting - a little ranting and a little tutoring.

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

=GG= Mr Moe

FNG / Fresh Meat
Mar 16, 2006
9,794
890
0
55
Newton, NJ
Thanks. I can adjust those BSP surfaces to look good where shadows are, and then save by raising the other non-shadow surfaces.

How about terrain? I can get nice shadows on the sides of buildings, say from a tree, but between the tree and the building.... no shadow on the ground. It just looks weird being empty inbetween. Could I have goofed up a setting somewhere in my terraininfo? Is there somesort of lightmap for the terrain I can use?
 

UncleDrax

FNG / Fresh Meat
Oct 13, 2005
1,494
60
0
Florida, USA
www.endoftheworldfor.us
Thanks. I can adjust those BSP surfaces to look good where shadows are, and then save by raising the other non-shadow surfaces.

How about terrain? I can get nice shadows on the sides of buildings, say from a tree, but between the tree and the building.... no shadow on the ground. It just looks weird being empty inbetween. Could I have goofed up a setting somewhere in my terraininfo? Is there somesort of lightmap for the terrain I can use?

Only way to get good looking shadows on terrain is by using projectors.

Check out: http://udn.epicgames.com/Two/ProjectorsTutorial.html
 

=GG= Mr Moe

FNG / Fresh Meat
Mar 16, 2006
9,794
890
0
55
Newton, NJ
Been playing around with projectors, but I am having a couple of problems. I am using a tree casting a shadow on terrain and the side of a building. (The side of the building will currently use the BSP surface lightmap, and not the projector....)

In the editor, I can get the projector shadow to layout correctly except despite all my settings, it still portrays on the (BSP) wall although I have it set not too. It lays out on the terrain just fine. The shadow cast using the BSP wall lightmap is just fine.

In game, there is no hint of a shadow whatsoever from the projector on the terrain. The shadow cast using the BSP lightmap is just fine.

So, first problem I need to solve is to get the shadow from the projector to even show up in game.

-----------------

It is probably some settings I have used, although I have played around with quite a few options. LightDirection and LightDistance are a couple I might be having problems with, although no matter what I set those to, it appears to make no difference in the editor.

The tutorials I have found (and thanks for the links) are helpful to an extent, but they are either incomplete or they reference a different version of the engine with several different settings altogether.
 

=GG= Mr Moe

FNG / Fresh Meat
Mar 16, 2006
9,794
890
0
55
Newton, NJ
OK, restarting the editor fixed the problem of the shadow being displayed on the BSP wall surface... in the editor. It is no longer there.

However, I still do not have the projector shadow in game on the terrain, nor over a static mesh rock I have in the area, and of course, that is what really matters :D
 

Shurek

FNG / Fresh Meat
May 21, 2006
857
13
0
www.darkesthourgame.com
And you checked this stuff:

bool bProjectStaticMesh When True, the projector will project onto Static Meshes (the FOV must be set greater than 0 for this to work, as well)

bool bProjectTerrain When True, the projector will project onto terrain. It seems that projecting onto terrain cuts the brightness of the projection way down.

int FOV Sets the angle of the projection trapezoid's sides. Please note that projectors with FOV = 0 will not project on static meshes. For laser crosshairs and similar effects use FOV = 1 instead.

You might also just want to copy and paste the tree projectors from Bondarevo right into your map.
 
Last edited:

=GG= Mr Moe

FNG / Fresh Meat
Mar 16, 2006
9,794
890
0
55
Newton, NJ
Yes to all of those. :(

I won't copy and paste, but I will take a look at their settings to see what is the same and what is different.

Thanks for responding.
 

Murphy

FNG / Fresh Meat
Nov 22, 2005
7,068
743
0
34
liandri.darkbb.com
Shouldn't there be a number of settings ala "bProjectOnBSP/StaticMesh/Terrain/etc."? At least that's how it works in UT2004. Maybe ProjectOnTerrain is False?
There is also an option in almost every placable actor's properties called AcceptProjectors or something like that and it has to be set to true to allow projectors to project on them. I'm not sure if this has an effect on the terrain even if the option is there in the TerrainInfo, but it's worth a try.
 
Last edited:

=GG= Mr Moe

FNG / Fresh Meat
Mar 16, 2006
9,794
890
0
55
Newton, NJ
OK, I was thinking too hard. I had all my settings correct, but for some reason I thought (incorrectly of course) that I should be using a "ShadowProjector" instead of a simple "Projector" to create shadows. How silly of me :p
 

=GG= Mr Moe

FNG / Fresh Meat
Mar 16, 2006
9,794
890
0
55
Newton, NJ
OK, they are working nicely now. But before I go crazy with a ton of projectors, are they something that really makes the map take a performance hit? :confused: :D
 

Nestor Makhno

FNG / Fresh Meat
Feb 25, 2006
5,758
1,118
0
56
Penryn, Cornwall
The only way to determine that is to give the map a run-through and type 'stat all' in the console. You will then see a whole host of stats, including a bunch of stats for projectors telling you render time in milliseconds.

Stat all is the most important tool for optimisation (aside, arguably, from the f6 key for testing net optimisation on a server).
 

=GG= Mr Moe

FNG / Fresh Meat
Mar 16, 2006
9,794
890
0
55
Newton, NJ
What exactly is the best way to read that, specifically in this case, for projectors?

Example, I can get rendering time in the projector section of .03 Render ms to .2 Render ms average looking at the same area. Usually it is hovering less that .1 Render ms.

I am assuming lower is better, and in general, adding more projectors doesn't really seem to increase the time, at least not that I have noticed. Does anyone have any guideline that they use when reading these stats?

Thanks!
 

worluk

FNG / Fresh Meat
Nov 21, 2005
2,226
85
0
What exactly is the best way to read that, specifically in this case, for projectors?

Example, I can get rendering time in the projector section of .03 Render ms to .2 Render ms average looking at the same area. Usually it is hovering less that .1 Render ms.

I am assuming lower is better, and in general, adding more projectors doesn't really seem to increase the time, at least not that I have noticed. Does anyone have any guideline that they use when reading these stats?

Thanks!

On a sidenote, unless you prefer a matrix like screen, use stat render for that kind of stuff.

As for the timings, well, the longer all projectors need to render the longer it takes a frame to be completed causing a lower number of frames per second.
Same goes basically for every timing display there.
 

jeffduquette

FNG / Fresh Meat
Feb 19, 2008
339
1
0
For posterity -- how do you turn "stat all" off again?

I turned it on during a game to see what was what on a map, but couldnt get it to turn off again.

thnx