Concerns with the Light/Shadow so far

Discussion and feedback on Construct 2

Post » Fri Sep 05, 2014 4:31 pm

@UberLou ,

You can emulate falloff distance with a falloff sprite and blending modes. Not ideal but it can happen. See this attached example.

LightFalloff.capx

Also, check my flash light example in this topic for a similar case: the-new-span-class-posthilit-lighting-span-amp-shadowing-system_p786241?#p786241
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Fri Sep 05, 2014 5:38 pm

UberLou wrote:2) Directional Light. I would like a light to mimic light from the sun, so that all shadows go in the same direction.

I'm not 100% positive that this will work, but I think that if you place the light really really (really) far away, you'll get something like a directional light.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Fri Sep 05, 2014 6:35 pm

Oh, yes, I forgot to mention that I' am also in favor of a directional light.

Although I can confirm that @Fimbul is correct in his/her thinking. A far away ShadowLight source will cast virtually parallel shadows. Those shadows will be very long though, but you can compensate that by increasing the ShadowLight's Height parameter (the higher the value the more vertical is the light source), and by decreasing the ShadoeCaster's Height parameter (this is the behavior that is added to each sprite that casts shadows).
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Fri Sep 05, 2014 8:58 pm

@Fimbul I originally tried that and it does kind of work. Though like you said, you have to place the light way far outside the layout, which is kind of messy and also makes me wonder if its very resource intensive to have to calculate a light that far away. Not sure on that...Thanks though!

@eli0s Thanks for the capx! I'll try that out tonight.
B
80
S
52
G
42
Posts: 370
Reputation: 26,330

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Baidu [Spider] and 9 guests