lighting glitch in cave corridor

In my cave map the torch in the bottom right hand corner doesn't want to light up - it's almost like the cave floor is behaving as a wall & blocking the torch light. I've double-checked the light source, wall, and floor placement order and they're kosher.

I'm also seeing stray light rays and shadows instead of smooth pools of light surrounding the torches.

Any ideas what I'm doing wrong?

Comments

  • I added a Wall Shadow, Point Light Finalize to my LIGHTS sheet and that's improved things tremendously, although I'm still seeing light passing through my cave walls.
  • Just a quick answer before breakfast:
    It seems like the sheet with the point light finalize is over the one with point light setup.
    Try moving your lights sheet below your walls sheet.
  • jslaytonjslayton Moderator, ProFantasy Mapmaker
    The Wall Shadow system relies on lights (sources of lights) and occluders (blockers of light) to do its job. Occluders are entities on a sheet that contains a Wall Shadow, Point Light Setup effect. Each sheet with a Wall Shadow, Point Light Setup effect adds a little bit more information to a simple internal 3D model of the world. A final sheet with a Wall Shadow, Point Light Finalize effect uses that 3D model and the list of lights to determine what's lit and what isn't lit. The 3D model is then cleared back to a flat plane to get ready for any future Wall Shadow, Point Light Setup effects. Any Wall Shadow, Point Light Setup effects on sheets after a Wall Shadow, Point Light Finalize in the draw order are treated as starting a new 3D model.

    What looks to be happening here is that your finalize operation is happening before your setup operation, meaning that there's not any occluders defined when the finalize operation happens. Try moving the Wall Shadow, Point Light Finalize effect from your LIGHTS sheet to your SYMBOLS SHEET (or, better yet, define a new sheet at the very bottom and put it there).
  • Robert FeyerharmRobert Feyerharm Newcomer
    edited February 2020
    Thanks guys for the advice . . . tried several options but I'm still seeing light rays leaking into the cave walls.

    I did reposition the lower right torch in my original cave map, removed *all* Wall Shadow effects from the LIGHTS sheet, and it's looking a little better. I think there's always going to be a few shadow patches on the floor due to the irregular nature of the cave walls.

    I also came across this post by JMunsonII which I may investigate: http://forum.profantasy.com/comments.php?DiscussionID=7022&page=1#Item_0
  • jslaytonjslayton Moderator, ProFantasy Mapmaker
    edited February 2020
    Try moving the Wall Shadow, Point Light Setup effect before any other effects on the sheet (to the top of the list).

    What's likely happening here is that the other effects on the sheet are causing changes to the geometry that appear as light blockers (for example, if a Glow effect is before Wall Shadow, Point Light Setup in the list of effects on a sheet, then the changes pixels from the glow will be interpreted as blocking the light).

    If your occluders are a single pixel wide (e.g. an unfilled polygon), it's possible that the rays cast from the light source might be skipping between cracks on some lines that aren't perfectly horizontal or vertical. Occluders should be at least two pixels wide to prevent light leakage.

    The Wall Shadow, Point Light system is a bit finicky because it's implemented as sheet effects without any connection to how the drawing is made internally. Unfortunately, what that means is that anyone who wants to set up drawings using point lights needs to understand how the lighting system works and ensure that the fiddly bits are in all of the right places in order for things to work correctly. For the most part, dungeon templates with lights have everything set up correctly and studying how they are arranged can be useful.
  • Thanks jslayton, very helpful!

    I've also found, upon zooming in on my light sources/torches, that even very small niches & corners in the walls can produce a shadow effect.

    This is especially pronounced when I'm drawing fractal cave walls. If I instead choose the Sketch drawing method, the cave walls are a little smoother and I see fewer "shadow rays" streaking across my cave walls.
  • jslaytonjslayton Moderator, ProFantasy Mapmaker
    There's a good chance that the many tiny little lines of your wall outline when drawn with the fractal tool are allowing more cracks than with the relatively smoother results from the sketch command. One way that you can thicken the strokes along walls is to use a glow effect with a Strength of 100%, a Blur Radius of 0.25, Effects Units of Percent of View Width and pick a color that you like. Put that effect before the Point Light Setup effect to thicken the drawing before using it as a light blocker (things will have a slight offset, but it's usually less of an issue than leaks).
  • Robert FeyerharmRobert Feyerharm Newcomer
    edited February 2020
    Good tip!

    I've also found that placing the light source some distance from the cave wall, rather than in the center of the torch flame itself, provides smoother illumination with fewer shadow rays. You don't notice that the light source isn't exactly on the torch.
Sign In or Register to comment.