strange lighting effect on my curved tunnels

strange lighting effect on my curved tunnels

Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Sat Jan 22nd 2005 at 1:35am
motionblurrr
44 posts
Posted 2005-01-22 1:35am
44 posts 14 snarkmarks Registered: Dec 7th 2004
Take a look at this picture first of all...

User posted image

See the brush above the open section of the tunnel? Why does it have those hard edges on the light map? The tunnel walls and this brush are in the same smoothing group but it gets this weird lighting effect.

Any idea what is causing that? FYI, I can remove all the static_props and it still has the funky lighting so it's not a shadow caused by the models. I'm also fairly certain it's not caused by the opening on the right.
Re: strange lighting effect on my curved tunnels Posted by Nickelplate on Sat Jan 22nd 2005 at 1:55am
Nickelplate
2770 posts
Posted 2005-01-22 1:55am
2770 posts 346 snarkmarks Registered: Nov 23rd 2004 Occupation: Prince of Pleasure Location: US
i hope it's not too much trouble but you'll have to delete that one brush and remake it. BTW what's smoothing groups, precious?
Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Sat Jan 22nd 2005 at 2:01am
motionblurrr
44 posts
Posted 2005-01-22 2:01am
44 posts 14 snarkmarks Registered: Dec 7th 2004
I dunno about deleting it and recreating it... it does this all over on my map in the tunnels.

Smooth groups tell the lighting engine that the faces of the brushes should have smooth transistions of light between them. Have you ever seen a 3d model that's flat shaded vs smooth shaded? It makes it look like it's got a lot more geometry to it than it really does....

something like the difference between these two pics:

User posted image

User posted image
Re: strange lighting effect on my curved tunnels Posted by Joe-Bob on Sat Jan 22nd 2005 at 2:03am
Joe-Bob
180 posts
Posted 2005-01-22 2:03am
Joe-Bob
member
180 posts 77 snarkmarks Registered: Dec 3rd 2004
what's smoothing groups, precious?
Smoothing groups

Honestly, I think that the smoothing groups may be what's messing you up.

In this pic:

User posted image

Are #1 and #2 smoothed together? If so, they may be taking
precedence over the other faces and giving you that nasty contrast.

Play around with with smoothing groups, and you might end up needing to place a dim light near there to balance everything out.
Re: strange lighting effect on my curved tunnels Posted by ReNo on Sat Jan 22nd 2005 at 2:14am
ReNo
5457 posts
Posted 2005-01-22 2:14am
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
Smoothing groups are new to hammer 4, and they let you assign groups
for faces to be a part of and those faces should have their lightmaps
smoothed out so as to provide a better illusion of smooth curves.

I've had a lot of trouble with this issue in Echo but as I was pushing
for a deadline I kinda ignored it. Looking at the problem again, I
think I've figured it out (though I'm too lazy to test before I blurt
it out).

For a smoothing group to "blend" two lightmaps together, they most
likely need to share an edge. All up your curved sections this is
probably true, but once you hit the problematic brush I'm guessing that
the bottom face extends past the curved ceiling so its edges are not
touching the edges of the curves. Here is a s**tty picture that might make it a little clearer what I'm trying to say...

User posted image

I'm guessing that the red dotted line marks your brush. If so, then try clipping that top brush into
sections, so that the visible section of it meets at an edge with the
curved bit.

No idea if that is clear or not, hope I've explained it well enough and I hope it fixes the problem...for your sake and mine :smile:
Re: strange lighting effect on my curved tunnels Posted by cloudsofthought on Sat Jan 22nd 2005 at 3:13am
cloudsofthought
20 posts
Posted 2005-01-22 3:13am
20 posts 2 snarkmarks Registered: Dec 27th 2004 Location: USA
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
"For a smoothing group to "blend" two lightmaps together, they most likely need to share an edge."

[/quote]
Yep. :smile:
To be smoothed correctly, faces must meet these restrictions:
  • Must share a common edge.
  • Lightmaps of the faces must be aligned to one another.
  • The lightmap scale must be small enough that at least one lightmap luxel is small enough to fit on each face.
  • Must be in the same Smoothing Group.
edit: So, correct me if I'm wrong, but it seems you must assign a new group to every second brush face. Example: bottom left face: smoothing group 1, middle left face: 1 & 2, upper left face: 2 & 3, top middle: 3 & 4, upper right: 4 & 5, etc etc.

If this is correct (and I'm not assuming it is yet, it just seems logical since they must share an edge) then it kinda sucks cause you might only be able to smooth a few things in a map before you run out of smoothing group #'s.

Anyone know? It doesn't say in the documentation.
Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Sat Jan 22nd 2005 at 3:15am
motionblurrr
44 posts
Posted 2005-01-22 3:15am
44 posts 14 snarkmarks Registered: Dec 7th 2004
I'll give it a shot.... If it's not exactly what you've said, it is certainly related... it's the only thing that makes sense.

The way I've built these tunnels is kind of funky too... they're basically square with "curve augmentation".... hehe

something like this (sorry, don't have hammer with me so I can't show a real screenshot) where all the curves are semi-trapezoid shapes...

User posted image

So where the trapezoid from the left side meets the REAL roof (the blue area) in the larger section of the tunnel, they don't share an edge (not even close, but the edge of the roof would be on the other side of the brush, closer to the wall, while the edge of the trapezoid is right there in the middle of the ceiling brush).

I'll do some clipping tonight and hopefully resolve this... crap there's a lot of these damn tunnels too... hehe
Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Sat Jan 22nd 2005 at 3:56am
motionblurrr
44 posts
Posted 2005-01-22 3:56am
44 posts 14 snarkmarks Registered: Dec 7th 2004
Doh... I just got home... check it out... totally makes sense it doesn't work. Should be easy enough to fix though.

User posted image
Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Sat Jan 22nd 2005 at 9:18am
motionblurrr
44 posts
Posted 2005-01-22 9:18am
44 posts 14 snarkmarks Registered: Dec 7th 2004
Ugh... I clipped the brush so it shares an edge on all four sides, but still it looks the same... here's a zip with the bsp and two sceenshots in it... if anyone can help, I'd really appreciate it.

http://www.digitalfrag.com/hl2dm/gasworks/smoothtest.zip
Re: strange lighting effect on my curved tunnels Posted by Leperous on Sat Jan 22nd 2005 at 10:33am
Leperous
3382 posts
Posted 2005-01-22 10:33am
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
Why don't you just bung a light there? That's what I do (along with checking my lightmap scales and texture alignment in the area are the same) :razz:
Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Sun Jan 23rd 2005 at 3:44am
motionblurrr
44 posts
Posted 2005-01-23 3:44am
44 posts 14 snarkmarks Registered: Dec 7th 2004
Some images in this post have been automatically down-sized, click on them to view the full sized versions:

http://www.digitalfrag.com/hl2dm/gasworks/tunnelsfix.jpgI've fixed my tunnels, but it was a big pain in the butt... here's what I WAS doing when it looked like crap:

I created a prefab of sorts (just copy/pasted really) for each section of the tunnels. So I had a "prefab" for a long straight sections, a "prefab" for a 90 degree turn, a "prefab" for the large areas where the big pipes are, etc... I then pieced these together over the length of tunnel to get the whole thing to have the curved top. So, as you saw, that made some funky looking light maps since the faces of all of the tunnel walls did not meet up evenly.

Here's what I did to FIX it: Created a SINGLE "prefab" for a straight section and placed it in the tunnel. I then cloned one and rotated it 90 degrees and place the rest. Then I used the clip tool wherever they met at a 90 degree angle to get them to blend into one another without overlapping.

In addition to this, rather than having these curved pieces line up with the existing square tunnel, I made sure that they extended all the way to the floor. The only reason I have the basic square tunnel that I'm slapping these curved arch peices into is because the curved peieces are all func_detail so they don't seal the level.

Last but not least, previously the two peices that met at the peak of the arch didn't have any thickness to them... what I mean is, the ceiling from the basic square tunnel was immediately above the point at which they connected and this caused a strange ripping effect at the top of the tunnel. So to fix that, I gave myself an extra verticy and made the top peices one unit thick so that the ceiling didn't rip/bleed through. Here's a screenshot of the before and after (obviously the after is also smoother, but that had nothing to do with fixing the strange lightmaps):

User posted image

Anyway I don't know if that all makes sense to anyone but basically it was due to the faces not lining up properly.
Re: strange lighting effect on my curved tunnels Posted by ReNo on Sun Jan 23rd 2005 at 1:54pm
ReNo
5457 posts
Posted 2005-01-23 1:54pm
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
Perfect, that 0 thickness thing at the top of the "bad" tunnel will
almost certainly be what is causing my lighting problems as well.
Thanks for letting us know the solution :smile:
Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Mon Jan 24th 2005 at 5:29pm
motionblurrr
44 posts
Posted 2005-01-24 5:29pm
44 posts 14 snarkmarks Registered: Dec 7th 2004
<DIV class=quote>
<DIV class=quotetitle>? quoting ReNo</DIV>
<DIV class=quotetext>Perfect, that 0 thickness thing at the top of the "bad" tunnel will almost certainly be what is causing my lighting problems as well. Thanks for letting us know the solution :smile:
</DIV></DIV>
Glad I could help! I kept thinking that I was typing all of that for nothing... :razz:
Re: strange lighting effect on my curved tunnels Posted by cloudsofthought on Tue Jan 25th 2005 at 5:49am
cloudsofthought
20 posts
Posted 2005-01-25 5:49am
20 posts 2 snarkmarks Registered: Dec 27th 2004 Location: USA
ahem... um, So am I correct on how to properly apply smoothing groups, or what?
Re: strange lighting effect on my curved tunnels Posted by motionblurrr on Tue Jan 25th 2005 at 11:18am
motionblurrr
44 posts
Posted 2005-01-25 11:18am
44 posts 14 snarkmarks Registered: Dec 7th 2004
<DIV class=quote>
<DIV class=quotetitle>? quoting cloudsofthought</DIV>
<DIV class=quotetext>ahem... um, So am I correct on how to properly apply smoothing groups, or what?</DIV></DIV>
Everything you said was correct but it seems there is still more to it. At first I tried just clipping the upper brush so that it met the curved brushes exactly on foor edges but it didn't seem to matter. It was until I made the curved brushes surround the entire area (walls and ceiling) that the problem went away.
Re: strange lighting effect on my curved tunnels Posted by cloudsofthought on Tue Jan 25th 2005 at 2:17pm
cloudsofthought
20 posts
Posted 2005-01-25 2:17pm
20 posts 2 snarkmarks Registered: Dec 27th 2004 Location: USA
Alright, thanks for the reply. Glad you figured it out.