Fairy lighting

  • #1, by ren-schneeFriday, 11. October 2019, 15:12 8 months ago
    Hello there guys,

    i'm a starter in here and i'm trying to get into shader lightning, but feel a bit overwhelmd by now. I got a room, that's only lit by a few lightbulbs, so i try to understand how i could get a basic lightning, from shader, GLSL or something. What do i have to look for in generell? We tried to paint it, but that's not really it.


    Newbie

    7 Posts


  • #2, by SimonSFriday, 11. October 2019, 21:50 8 months ago
    Well first of all, you should point out where you want to go. Lighting works in 3D so the shader calculates the screen as a plane. This is probably not what you want. The other option is to add depth info to your scene. I already built some example code for that, see here: https://www.visionaire-studio.net/forum/thread/question-abou...

    Thread Captain

    1312 Posts

  • #3, by ren-schneeSaturday, 12. October 2019, 21:07 8 months ago
    Hey Simon, your link posted in this thread is down.

    I'm just using a few painted, 2d backgrounds, foregrounds etc and i'm not sure if i could just pin a 3d light on a few points, so it looks like my 2d lamp-pictures are lit the scene.

    Greetings

    Newbie

    7 Posts

  • #4, by SimonSSaturday, 12. October 2019, 21:11 8 months ago
    If these are static lamps using shaders would be overkill. That should be precomposed.

    Reuploaded it here:

    Thread Captain

    1312 Posts

  • #5, by ren-schneeSaturday, 12. October 2019, 21:22 8 months ago
    Could i change the character and the normalmap with any other, or do i have to change something in the code to get it to work in a diffrent scene? This is all a bit new to me and i'm just going to experiment with the code presentet in the template.

    Newbie

    7 Posts

  • #6, by SimonSSaturday, 12. October 2019, 21:26 8 months ago
    The normal map is essentially info about how the surface is oriented. A light coming from the left will only light surfaces directed to the left. The code is only an example and would need work to be used with more scenes and objects.

    Thread Captain

    1312 Posts

Write post