1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. While the majority of active discourse on D20PRO has moved to our Discord Channels, this forum is still active and checked-in on regularly by our staff. However, for the very latest information, conversation and/or immediate support, please join us on Discord here: http://discord.gg/Ph38ckM
    Dismiss Notice

Light Source Opacity

Discussion in 'Feature Requests' started by Bloodwolf, May 24, 2016.

  1. Bloodwolf

    Bloodwolf Member

    Joined:
    Sep 8, 2014
    Messages:
    131
    Likes Received:
    5
    I would like to summit an idea for the opacity of light sources. I would like for the opacity of the closest light source to over rule the farthest. This way a fog scenario could be rendered. Basically this would allow you to make the lights less revealing at a farther distance without them combining at closer distances and blocking sight.

    So an example, because I know that the above wasn't the best descriptive, say you want visibility to be reduced, miss chance, by 10% every 10 feet. It would be nice to be able to increase the opacity for every 10 foot larger light source until you get to 100% to represent the fog effect. AS it is now as you increase the opacity for each larger light source the effects stack so that the edge is clearer and the center is more opaque.

    Hopefully I explained that good enough. It's kind of early here and I'm not fully awake yet. :D
     
  2. Robotguy

    Robotguy Member

    Joined:
    Oct 10, 2013
    Messages:
    90
    Likes Received:
    3
    Seconded. When I started with SCFOW, I tried fiddling with opacity a bit, changing inner and outer opacity, instinctively thinking that this is how it would work.
     
  3. Bloodwolf

    Bloodwolf Member

    Joined:
    Sep 8, 2014
    Messages:
    131
    Likes Received:
    5
    The new light engine in 3.6.6 will do this with just one light and using opacity. Thanks.

    The opacity controls are a but if a learning curve but after some playing around I figured them out. Love them.

    Now we just need to have a "line of sight" light source that would reveal external light sources in the field of view without revealing areas lit by the external light source not in the field of view. But that is thoughts for later builds.
     
  4. owlbear

    owlbear Administrator
    Staff Member

    Joined:
    Sep 5, 2011
    Messages:
    636
    Likes Received:
    160
    This is a fun and twisted problem. Right now "Lights" is a term we're using for "Filled radial polygons". What we want to do is create a proper logic solution which knows that a light is of a certain opacity or property -- such as bright or shadowy. A way to model with would be to give lights a numerical value of "brightness" which is for mechanics purposes.

    In D&D terms, Daylight is extremely bright so give it a 10. A candle is the dimmest of lights so give it a 1. Other lights exist between.

    Then using this scale, allow for lights to add or subtract from other light objects based on the scale value.

    Now, that's hard, but not too hard to implement from a polygon stand point. The real tricky part is how to handle the gradient or filled light blending at those locations.

    A thought I have if we use the brightness scale is to subtract brighter lights from dimmer lights when the lights overlap. Then paint the brighter lights effect. This would simulate a bright lights ability to override a dim light. Additionally, it could allow us to increase the "brightness" of a group of lights in the same grid unit; i.e. the party throws all of their torches into a pile creating effectively a camp fire (brightness 6, lets say).

    Right now this isn't being worked on. so If folks would like to discuss their thoughts, we've got time to figure out the best way to implement this!

    As to your last comment Bloodwolf, absolutely. The final feather in our proverbial cap will be when our "Casting" algorithm can handle reveals through zones at a greater distance. Right now the algorithm is good, but limited. There's definitely room for improvement here :)
     
  5. Bloodwolf

    Bloodwolf Member

    Joined:
    Sep 8, 2014
    Messages:
    131
    Likes Received:
    5
    I'm still working on my programming so a couple of things are currently beyond my knowledge level but I understand the idea of using ratings and agree. But I think if you are using a 1 to 10 scale then sunlight will need to be an 8 and not a 10. That way you can get brighter lights. Examples being divine radiance and nuclear blasts. Both can blind. So I would say a 9 would be bright enough to temporarily blind and 10 would permanently blind.

    As for my last comment I can imagine that the algorithm would be tough because it would have to recognize all the areas curgently being lit and then recognize if the "line of sight" algorithm overlapped it even if it is through a mask, actually the "line of sight" algorithm would probably be best to ignore masks. But that would require the "line of sight" algorithm to be able to recognize if a light is revealed or not. Which in turn would require the light engine to have a tag for it to see to indicate it's reveal state.

    That was as clear as mud. :)
     
  6. owlbear

    owlbear Administrator
    Staff Member

    Joined:
    Sep 5, 2011
    Messages:
    636
    Likes Received:
    160
    The worst part... I totally followed and agree. The scale example was intended just to illustration the idea. I agree we'd need to be able to dial up or down to create insane levels of illumination or delumination! (<== take that spell checker!)
     
    Bloodwolf likes this.

Share This Page