Strange lighting

Strange lighting

Re: Strange lighting Posted by Le Chief on Thu May 15th 2008 at 5:14am
Le Chief
2605 posts
Posted 2008-05-15 5:14am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Hey

A while back, when I was working on the Sewer map (hl1), I had encountered a strange problem. The compile times where getting really long (+14 hours) and I also noticed that some objects had very strange shadows. I later found out the problem, there is a bug in zhlt 3.4 that made entity shadows (if you turn them on) take a very long time to compile and they turned out very strange in game.

I am seeing the exact same error in my latest source map, here is a picture:

User posted image

As you can see, the shadows are wrong, and I saw this exact same problem in half-life 1, same style shadows. And I am certain that this is causing my 6hr 40min RAD compile time (which is pretty bad at this stage). So has anybody seen this before and know how to fix it.

BTW, I have a light_environment, 2 static (normal) lights and a shadow controller.
Aaron's Stuff
Re: Strange lighting Posted by reaper47 on Thu May 15th 2008 at 8:59am
reaper47
2827 posts
Posted 2008-05-15 8:59am
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
You have to invert your z-axis/pitch setting for the shadow_controller (like -80 instead of 80), otherwise it's upside down and dynamic entity-shadows go up instead of downwards, like in your picture. If you get any other problems (like them going through walls) you can disable entity shadows as well in the properties.
Why snark works.
Re: Strange lighting Posted by omegaslayer on Fri May 16th 2008 at 4:13am
omegaslayer
2481 posts
Posted 2008-05-16 4:13am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
looks at forum hes under yup im in the HL2 editing board... So why are you using ZHLT for HL2 stuff?

Also in general - Compile times should take at max 4 hours on a rig with 1.5GB ram (running window's XP at 2.4 GHZ processor). Anything more means you have a:
1) sloppy map thats breaking up way too much
2) a major lighing error in your map
3) If vis takes longer than an hour, then you have a vis problem that leads lighting issues.
4) if Bsp takes longer than 10 seconds to start finish, you have a major bsp issue that needs fixing.

Post your log arron.
Posting And You
Re: Strange lighting Posted by Le Chief on Fri May 16th 2008 at 4:48am
Le Chief
2605 posts
Posted 2008-05-16 4:48am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
reaper47 said:
You have to invert your z-axis/pitch setting for the shadow_controller (like -80 instead of 80), otherwise it's upside down and dynamic entity-shadows go up instead of downwards, like in your picture.
So will this fix the long (and abnormal) compile time aswell?
omegaslayer said:
So why are you using ZHLT for HL2 stuff?
I'm not, I'm just telling the folks that the exact same thing (huge compile times, same weird style shadows) happened in a half-life 1 map of mine.

edit: the compile log was so long that it couldn't all fit in this post. Download it here
Aaron's Stuff
Re: Strange lighting Posted by omegaslayer on Fri May 16th 2008 at 5:45am
omegaslayer
2481 posts
Posted 2008-05-16 5:45am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
It looks like your compiling the map over and over again...or are you appending to the log? Well in any case id check to see if you have a leak. I noticed on a few of the runs you were leaking. This is the main cause of anything acting haywire in HL2.
Posting And You
Re: Strange lighting Posted by Le Chief on Fri May 16th 2008 at 5:48am
Le Chief
2605 posts
Posted 2008-05-16 5:48am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Holy crap, I think that is every compile I have ever done for the map. I don't have a leak because hammer is not generating a pointfile for me.
Aaron's Stuff
Re: Strange lighting Posted by reaper47 on Fri May 16th 2008 at 10:47am
reaper47
2827 posts
Posted 2008-05-16 10:47am
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
All fine, no leaks etc.

Your compile takes so long because of vis. Run vis in fast mode for quick checks, it reduces compile times to seconds. Nothing evil about that IMO. But you might want to look for possible func_detail optimizations.

Do you know this optimization tutorial? I'd read that through at least once, to get a feel for the Source engine.

I bet you could make some stairs/etc func_details and speed up vis (even without running "fast" vis) to below 10 minutes.
Why snark works.
Re: Strange lighting Posted by omegaslayer on Fri May 16th 2008 at 7:37pm
omegaslayer
2481 posts
Posted 2008-05-16 7:37pm
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Vis should take no longer than 2 min (even then thats a VERY over complicated map). Yes running vis on fast gets a dirty job done, but you end up drawing the whole level. Only use it for quick checks (but even then I always leave Vis on full and cordon an area of the map I wish to test). Source != Quake engine. Source complains more about complicated geometry. In general when you turn every entity off in the visgroups you should see relatively square/simple rooms. Thats how I gauge the efficiency of a map.
Posting And You
Re: Strange lighting Posted by Captain P on Fri May 16th 2008 at 7:50pm
Captain P
1370 posts
Posted 2008-05-16 7:50pm
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
In general when you turn every entity off in the visgroups you should see relatively square/simple rooms. Thats how I gauge the efficiency of a map.
Good tip indeed. Look at it like hlvis does, heh. :smile:
Create-ivity - a game development blog
Re: Strange lighting Posted by Le Chief on Fri May 16th 2008 at 11:59pm
Le Chief
2605 posts
Posted 2008-05-16 11:59pm
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Oh s**t, its actually vis causing this problem, not rad :O. I think there must be a design issue in my map than because I remember early on, when the map wasn't to different to what it is now, vis took about 10 seconds, and now its huge.

Reaper47, thats a nice tutorial, I'm just browsing around it right now, I'll certainly read that later today, but from what I've looked at so far, it seems that optimization for source has similar to optimization for hl1.

I'll start making various things func_detail asap.
omegaslayer said:
In general when you turn every entity off in the visgroups you should see relatively square/simple rooms. Thats how I gauge the efficiency of a map.
Thats a good way of putting it.

Anyway, thanks to all of you for your help :smile: .
Aaron's Stuff