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

Author Topic: SFML Light System - Let There Be Light  (Read 257900 times)

0 Members and 6 Guests are viewing this topic.

8p4hxc2

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #135 on: June 17, 2012, 12:42:09 am »
hi and thanks for this awesome library !!!!

Can you give us the source code of the sample? It could be helpfull since the doc is not up to date.

Thanks !!!

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #136 on: June 17, 2012, 04:46:29 am »
Of course! I uploaded it to Source Forge, you should be able to find it in the "Files" section. It is a .cpp called "Example".
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

8p4hxc2

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #137 on: June 17, 2012, 09:49:32 am »
there is only the 4 .zip, but there is 5 items, maybe a right problem?!

8p4hxc2

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #138 on: June 18, 2012, 07:03:39 pm »
it's ok now thx a lot !

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #139 on: June 19, 2012, 11:24:35 pm »
Hi there again!

I know I should've asked it sooner, but... I think you have noticed the similiarity of the names between your library and my game. I want to ask: is it okay for you if I keep the name for my game (which I plan to release commercially), or should I change it?

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #140 on: June 20, 2012, 03:23:35 am »
Yes, I noticed. You can use it if you like, I don't mind.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #141 on: June 20, 2012, 05:39:51 pm »
Many thanks :)

jmcmorris

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #142 on: June 23, 2012, 12:10:05 am »
I am once again looking into lighting for my project.

lolz123, did hull transparency make it's way into LTBL? If so then how does it work? What I'm hoping to do is something along the lines of Terraria where each layer of the ground partially blocks the light. http://terraria.org/media.html.

The tricky part seems to be having the ground cast shadows as well as partially block the light. So I want it to act as a hull but not completely. I'm going to continue researching this but I was just checking to see if you have any suggestions on how I should go about doing this.

Thanks! :)

lolz123

  • Sr. Member
  • ****
  • Posts: 260
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #143 on: June 23, 2012, 03:43:05 pm »
It's in there, but not quite working yet. It has some blending issues. However, you don't really need it for the effect you see in Terraria. It would actually be way to processing intensive to have a single hull for every one of those tiny tiles. Terraria doesn't even have shadows, it just lights up grids depending on the distance from the surface and the sides. If you want both the effect in Terraria as well as shadows, you can set the shadows to not fill the hulls (using renderLightOverHull), and then just darken the tiles yourself. Then, you can group lots of tiles into larger hulls to increase performance.
Have you heard about the new Cray super computer?  It’s so fast, it executes an infinite loop in 6 seconds.

jmcmorris

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #144 on: June 23, 2012, 08:34:47 pm »
Thanks for the reply. I did consider using renderLightOverHull and I know how I would darken the tiles with the ambient light (sun). I was thinking that the problem then would be darkening/lighting the tiles with dynamic light. Thinking about it more, I believe I would just need to do tile lighting calculations myself.

If I did things this way then I believe I would only need to have hulls for the surface facing tiles. I think I would only keep hulls around that are nearby the player to further optimize things.

Thanks for the thoughts lolz123. :)

DJuego

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #145 on: July 29, 2012, 04:33:14 am »
Lolz123, Do you consider to expand -Let There Be Light- to other post-effects like Fog of War (FOW), blur, illusory or sickest vision, ...?

If not, would you consider to create a separate library?  ;D

* I want to say a explicit|true Fog of War.  Perhaps a very generic|basic FOW encapsulated in a library. (Hard, soft, translucent fog)

And... a new -Let There Be light- release in the inmediate future, perhaps? :P

DJ

P.S: My English is crap, I know.  >:(

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #146 on: July 29, 2012, 08:57:44 pm »
Lolz123 I have a very big thing to ask you.

As you may know i support a cross platform engine, with mobile support etc.
I wanted to use your library along with it, but it will only be possible if you separate the render from logic, so i can easily extend and write a GLES renderer.

Is that something possible for you to do? You would see your work in iOS, android etc :P

kurasu1415

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: SFML Light System - Let There Be Light
« Reply #147 on: July 29, 2012, 11:38:31 pm »
Are using the CPU or the GPU to render the shadows?

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #148 on: July 30, 2012, 12:39:21 am »
All cpu so far if im not mistaken.

jmcmorris

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
Re: SFML Light System - Let There Be Light
« Reply #149 on: July 30, 2012, 12:40:55 am »
Yeah, all of the shadows are calculated on CPU. The only shader that is used is for light attenuation.