Illuminated.js

Discussion and feedback on Construct 2

Post » Fri Aug 10, 2012 2:23 pm

A 2D lights and shadows rendering engine
for your HTML5 web applications and games.

http://blog.greweb.fr/2012/05/illuminated-js-2d-lights-and-shadows-rendering-engine-for-html5-applications/


What more can I say... please? :D
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Fri Aug 10, 2012 2:44 pm

This is really awesome. Bumping for interest.
B
15
S
1
G
4
Posts: 39
Reputation: 2,606

Post » Fri Aug 10, 2012 3:52 pm

The guy used Canvas to implement it. Now that C2 will support shaders from WebGL things like that will be easier to implement and much faster in runtime than if using Canvas. The demo is slow as hell btw. Unsuitable for games. But it serves as an implementation reference. Really nice implementation.

With shaders we'll get this and much more. Shaders effects possibilities are infinite.Kiyoshi2012-08-10 15:53:42
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Aug 10, 2012 7:37 pm

I really want this, but I think Ashley said that this won't be one of the effects released with r100 though :)
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Fri Aug 10, 2012 8:01 pm

I may be missing something, but it looks like you can do most of this with layer effects...
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Aug 10, 2012 9:27 pm

Yes, I think You are missing something, first of all there are no layer effects in C2... ;)
ImageImageImageImage
B
140
S
58
G
36
Posts: 2,547
Reputation: 31,170

Post » Fri Aug 10, 2012 9:41 pm

It's a cool demo, but it hasn't got a WebGL renderer, so it's not exactly drop-in - all the rendering code will have to be rewritten for it to work in WebGL mode. Might be possible by a cleverly coded plugin though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Jul 18, 2013 3:08 pm

Hello there, let's do a little necro-topic-phily !

I just saw this post, doing some research on illuminated.js and its implementations around the web, and after starting to implement some basic functions of it (finding all the lightblocker segments, corners, some low level intersection functions, ...).
At first, I tried to implement it just by using the lib, but it seemed to block in lots of area, so I started rewriting it a little more.
I had some questions on how people think it would be best :
- for choosing the lightblockers, I went with a small behavior, a little like "solid", that you just add on the objects that should block the light. I then tried to reproduce the way that Pathfinder selects its blockers (custom or solids) but it isn't entirely working for custom yet. Do you see any other ways of selecting the good light blockers ? Should there be any other type of light blockers ?
- for displaying the light effect in the end (I haven't got into this point yet), I thought about asking for a base frame (just like the sprite), and cut it according to how the light polygon will be drawn. The alpha radius will then be prepared directly in the sprite, and a multiply should then be added to the "lightCaster" sprite. I'm still having hard time finding a good way to apply the frame correctly...

As this library is now up for some times, and surely somebody tried this before me, I would like to know if anybody had any advice or thoughts on how it would be best. Of course, if and when this is good, I'm planning on releasing it on the forums.
B
17
S
7
G
4
Posts: 461
Reputation: 5,907

Post » Thu Jul 18, 2013 3:39 pm

I think that would be the best way, so any object can be a light emitter or a blocker. ;]
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Thu Jul 18, 2013 4:04 pm

I really think this is a major fault with C2. A lack of decent lighting/ shadow options.

Not sure if this is because its difficult to achieve or what.
B
45
S
15
G
9
Posts: 1,096
Reputation: 11,038

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Silverforce, Zebbi and 13 guests