Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Let There Be Light 2  (Read 132256 times)

0 Members and 1 Guest are viewing this topic.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Let There Be Light 2
« on: November 29, 2014, 10:59:36 pm »
Hello everyone,

As I mentioned in the original LTBL thread, I am currently (finally) remaking LTBL with clean code, more features, higher performance, and greater ease of use. It now uses only SFML as a dependency.

New features include:
- Directional lights
- Codeless light types
- Antumbras
- Superior performance
- Transparency

Follow the repository here: https://github.com/222464/LTBL2

Demo available here: https://drive.google.com/file/d/0B2btNvgW7MHUQ0JfQTQ4ZndmNHc/view?usp=sharing



Here is an example of antumbra rendering so far (this was impossible in the original LTBL):

« Last Edit: May 03, 2015, 10:26:35 pm by lolz123 »
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

p5ych0

  • Guest
Re: Let There Be Light 2
« Reply #1 on: November 30, 2014, 12:24:42 am »
Looks great so far! Keep up the good work. :)

Jabberwocky

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Let There Be Light 2
« Reply #2 on: November 30, 2014, 12:42:07 am »
Looks great!
What is a Codeless light type?  Is that a data-driven light, such as how you can load a hull from file in LTBL1?

Jabberwocky

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Let There Be Light 2
« Reply #3 on: November 30, 2014, 03:16:34 am »
Lolz, what are your thoughts on combining LTBL with a sprite per-pixel lighting shader (normal map), such as seen here:  http://en.sfml-dev.org/forums/index.php?topic=16830.0

I can think of a few approaches.
1.  LTBL only renders modulative shadows instead of additive lighting, and you render your sprites with a light shader.
2.  LTBL renders exactly as it does now, the composition texture is applied to the ground / background texture to render shadows, and all other sprites are rendered with a light shader.
3.  LTBL embeds light-direction data in the composition texture, and then the light shader can sample this composition texture to calculate the per-pixel lighting.

Thoughts?
« Last Edit: November 30, 2014, 03:19:16 am by Jabberwocky »

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Let There Be Light 2
« Reply #4 on: November 30, 2014, 03:30:01 am »
Jabberwocky,

I have thought of doing that actually, specifically the last approach you suggested. I will add it, it shouldn't be too hard.

The codeless light types allow you to make things like spotlights and light beams and such without using code. It only requires texture work now. There are 2 kinds of emitters: Point and directional. From these you can make all the lights in the original LTBL quite easily and more.

Any other features you would like to see? I might actually run a kickstarter for this, depending on how many features I end up adding.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Let There Be Light 2
« Reply #5 on: November 30, 2014, 06:29:45 am »
Progress shot of the day:



I used fallahn's tmx (Tiled) loader to load the map.
The tile set is from here: http://opengameart.org/content/platformer-tiles-4
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Let There Be Light 2
« Reply #6 on: November 30, 2014, 08:41:38 am »
That's a very appealing demo you've got there!  :D

Looking forward to toying with it.
« Last Edit: November 30, 2014, 09:00:49 am by Hiura »
SFML / OS X developer

DJuego

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: Let There Be Light 2
« Reply #7 on: November 30, 2014, 03:13:04 pm »
I do not have words to describe the happiness that inspire this news for me. Thank you, lolz123!

DJuego

dabbertorres

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • website/blog
Re: Let There Be Light 2
« Reply #8 on: November 30, 2014, 05:44:40 pm »
Holy hell man, that looks beautiful.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: Let There Be Light 2
« Reply #9 on: November 30, 2014, 06:47:34 pm »
Just wondering if anyone is or has worked on a C# port of this wonderful lighting system? :)
I have many ideas but need the help of others to find way to make use of them.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Let There Be Light 2
« Reply #10 on: November 30, 2014, 07:17:47 pm »
It's neither finished nor released yet, how would someone work on a C# port already? :D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Jabberwocky

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Let There Be Light 2
« Reply #11 on: November 30, 2014, 10:54:05 pm »
Jabberwocky,

I have thought of doing that actually, specifically the last approach you suggested. I will add it, it shouldn't be too hard.

Cool.
Would you need multiple composition textures to support multiple lights?

Any other features you would like to see? I might actually run a kickstarter for this, depending on how many features I end up adding.

My best guess, you are going to have 2 kinds of users:
1.  Users who want per-pixel lighting with normal maps.
2.  Users who don't.

I am (1), and I would happy contribute to a kickstarter for a project that supported this. 

In case you need to generate some normal maps to test this functionality, I believe both CrazyBump and PixPlant have 30-day free trials.  Or you may just be able to find some free sample art from a google search.  Let me know if I can help with any of that.

In case you decide not to run a kickstarter, I'd still be happy to contribute a donation directly, just let me know.
« Last Edit: November 30, 2014, 11:08:28 pm by Jabberwocky »

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: Let There Be Light 2
« Reply #12 on: November 30, 2014, 11:56:01 pm »
Quote
In case you need to generate some normal maps to test this functionality, I believe both CrazyBump and PixPlant have 30-day free trials.  Or you may just be able to find some free sample art from a google search.  Let me know if I can help with any of that.

Don't worry about that  ;) I have my own self-made normal map generator. I used it for my 3D engine. Also Gimp has a plugin for it as well, and it is quite good.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Let There Be Light 2
« Reply #13 on: December 01, 2014, 04:09:37 pm »
This is great! For the game I've just started I was disappointed that LTBL wasn't updated, but here it is now. Thanks a lot for the hard work.
Current Projects:
Technoport

Verra

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Let There Be Light 2
« Reply #14 on: December 02, 2014, 01:20:22 am »
And God said, “Let there be light,” and there was light. God saw that the light was good, and he separated the light from the darkness. And our lord lolz123 spoke and he said, "Have a soley SFML dependent version of LTBL. I will cast out the evil dependencies and your programs will be blessed."

But seriously I've been waiting for this for a long time. Awesome work dude.