[Effect] : 2D Dynamic Lighting

Share your Construct 2 effect files

Post » Thu Feb 07, 2013 7:05 am

I am aware that I can make it. I was more wondering if it would look good or if the code would throw up all over it :)

Need to play around with this when I get the time, can't stop thinking of all kinds of neat ways to implement it.
B
17
S
4
G
5
Posts: 36
Reputation: 5,077

Post » Wed Feb 27, 2013 3:36 pm

Hi guys
First of all I have to thanks to your effect Pode, It's AWESOME !!!
But now I have facing a problem and I really need help from this lovely community.
I'm using this effect with the Moving object, and it's working fine with dynamic lighting effect. But the effect seem to be wrong when the object is rotating.
I'm sure that something wrong in my coding.
so, please ...
Thanks a lot

Below is the link to my question and the Capx file.
Online Example
Capx File
B
11
S
1
Posts: 84
Reputation: 1,462

Post » Wed Feb 27, 2013 5:25 pm

I don't get it. Do I need the non free verison of c2 to open this? It say's something about box2D, there is a pop up windows
B
18
S
4
G
1
Posts: 413
Reputation: 2,512

Post » Thu Feb 28, 2013 6:42 am

[QUOTE=Urled] I don't get it. Do I need the non free verison of c2 to open this? It say's something about box2D, there is a pop up windows[/QUOTE]
Oh, Sorry Urled that's my bad.
I have fixed the Capx file.
thanks for your attention :D
B
11
S
1
Posts: 84
Reputation: 1,462

Post » Fri Mar 01, 2013 10:27 pm

Great work & thank you! This is an awesome effect.

I'm struggling to understand how you came up with the normal vector values.

I understand the concept perfectly fine but how do you know the normal vectors for each part of the house (I need to know how to get the normal vectors so I can calculate which color to use)?! Anyone ? Thanks!LMingy2013-03-01 22:28:47
B
3
Posts: 8
Reputation: 291

Post » Fri Mar 01, 2013 10:36 pm

@newlee - the purpose of the normal map is to encode the normals - the facing vector - for each part of the image. By rotating the normal map, you're making the section of the rock that the dynamic lighting effect considers to be facing "up" (for example) move around the image, which is obviously not correct.

If your rock were perfectly spherical, you'd simply remove the NormalMap -> Set Angle to Stone.Angle degrees and be done - that way, the part of the rock that you want to be lit as the top will always be at the top. The problem is that your rock obviously isn't perfectly spherical and you're also trying to give it a texture, so I'm not sure if there is an easy solution....
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Sun Mar 03, 2013 12:50 am

Use different normal map images for different angles?
B
11
S
5
G
3
Posts: 19
Reputation: 2,969

Post » Sun Apr 21, 2013 1:55 pm

I used R0j0's example to recreate >this< demo.

This is what came out: >link<.

Can I reach with some tweeking the look like in the previous demo link?

edit: I just discovered build in bumpmapping support and got that effect working. The question is, why would I use dynamic lighting instead of the bumpmap effect? I don't exactly understand the difference.zyblade2013-04-21 15:47:45
B
24
S
9
G
2
Posts: 294
Reputation: 3,160

Post » Sun Apr 21, 2013 7:40 pm

@zyblade : in essence, the plugin is a "baked-in" normal map effect. Both work the same way, in fact.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Fri May 10, 2013 10:37 am

Thank you for this nice effect. Will it work with also animation sprites. If so how ? Do I also need to add mapping for each frames ? Did you ever try this
B
7
S
1
G
1
Posts: 76
Reputation: 904

PreviousNext

Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests