Lights And Opaque Entities

taledentaleden Join Date: 2003-04-06 Member: 15252Members, Constellation
<div class="IPBDescription">self-shadowing?</div> Has anyone else noticed that opaque entities (brush-based entities with the 'opaque' or 'opaque+embedded' ZHLT lightflag) appear to shadow themselves from point lights? If you put a 'light' or 'light_spot' entity right up next to an opaque brush entity, it'll cast a shadow, but it will also be unlit by the point entity; texlights don't seem to have this problem.

Cagey, is this a bug, or is there a reason for this?

Comments

  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    I've never thought about if they have self shadowing or not but correct self shadowing means parts of it are capable of casting shadow on it self like any "world brush".

    Casting a shadow on itself when it shouldn't is undoubtedly a bug or problem that is too difficult to fix to be worth it. Does this happen when you stick a light really close to a regular brush?
  • Sir_PepeSir_Pepe Join Date: 2002-12-15 Member: 10845Members
    Nope, the brush is just unaffected by any point lights and spotlight that should usually cast light. The dark piece of wall on the screenshot is a func_breakable with lightflags set to opaque.
  • taledentaleden Join Date: 2003-04-06 Member: 15252Members, Constellation
    edited April 2004
    Here's a little test I did. There are ten floating blocks in this room, arranged in two rows. In each row, the first block is a worldbrush and the rest are func_walls, each with a different ZHLT lightflag: normal, embedded, opaque, opaque+embedded, in that order. In the left pic, each block has a 'light' point entity floating above it; in the right pic, each block has a 'light_spot' above it, pointing down. Notice the lighting: the worldbrushes block the light from hitting the ground, and are themselves lit by the light, as they should be; the first two func_walls do not block the light from hitting the ground, and are themselves lit by the light, again as they should be. But the last two func_walls in both rows not only block the light from hitting the ground (as they should), but are also unlit by it - to look at this picture, you'd think there are no lights above the last two blocks, but I assure you there are.

    (I added outlines to each block, since the dark ones are hard to see)
  • Sir_PepeSir_Pepe Join Date: 2002-12-15 Member: 10845Members
    Mh... bump <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html//emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif' /><!--endemo-->
  • CageyCagey Ex-Unknown Worlds Programmer Join Date: 2002-11-15 Member: 8829Members, Retired Developer, NS1 Playtester, Constellation
    edited June 2004
    I'll see if there's an obvious self-lighting fix; if it's not something I track down quickly, or it looks like it's going to be a complex fix, I'm going to wait for p15 and release "p14 final" or whatever I decide to call it (stupid 2.5.3.-1.7-p14 versioning system... need to talk to a few people about just calling the next one ZHLT 3.0.0).

    EDIT: It looks like the opaque face is blocking light from hitting itself <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->, I need to change the test function return from bool to face_t* and double check that the face returned by the test doesn't match the face being lit before I consider the light blocked. <!--emo&:angry:--><img src='http://www.unknownworlds.com/forums/html//emoticons/mad.gif' border='0' style='vertical-align:middle' alt='mad.gif' /><!--endemo-->

    EDIT: fixed it <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
Sign In or Register to comment.