Dynamic shadow casting (0.95)

Post your own tutorials, guides and demos.

Post » Wed May 21, 2008 11:29 am

[quote="Attan":37kajlb3]Dammit! I'm going to buy a new graphics card as soon as i can. i really need ps2! Could someone create a non-ps version in the meantime?[/quote:37kajlb3]
Software rendering?? Dude no way it will lag as hell, thats why they invented Pixel Shaders and Vertex Shaders.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Wed May 21, 2008 12:32 pm

Doppel: Attan means a .cap not using any pixel shaders, which is still hardware accelerated.

The Light object itself doesnt require any pixel shaders, I just used them to make the lights look fancy. Here's one without any shaders:
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed May 21, 2008 1:58 pm

Oh its not Pixel Shader only? Well then he could just set "Run without PS" since its a .cap file or just delete effects.
B
4
S
2
G
4
Posts: 719
Reputation: 2,938

Post » Wed May 21, 2008 7:25 pm

I didn't find the objects that had effects, and i didn't think about the run without ps option.

Thank you very very much Ash! This is one of the most awsome features in construct so far! Is there any way to make it support multiple light sources?
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed May 21, 2008 8:03 pm

Yeah, you can just put in multiple light objects, but you won't get anything very useful unless you play around with opacity. In this example, I use two lights, each on their own layer with 33% opacity, so the only darkened areas are where neither light can reach. This doesn't use any pixel shaders.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Wed May 21, 2008 8:40 pm

Sweet! But is it possible to do with round lights like the first example?
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed May 21, 2008 10:23 pm

Sweet! But is it possible to do with round lights like the first example?

Edit.
It's wierd, when i try to do this myself it renders very wierd, but yours works fine! Her's a screenie!


And i posted the .cap too.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed May 21, 2008 10:40 pm

That .cap doesn't run on my machine unless I export it to an .exe.

Also, any chance of penumbras at some point? :D It looks like that's what's trying to get rendered there.

Edit: Restarted my comp and it runs. Oddly enough, it's running as if it has motion blur on, but it's set to off.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Wed May 21, 2008 11:14 pm

Arima: Penumbras are on the todo list, theyre a little bit trickier to code.

Attan: Untick 'Transparent' in the top layer's properties and it renders correctly. I'm not sure why the Multiply effect doesn't like transparent layers, but it should be off anyway for the multiply effect (if you view that layer on its own, it'd be transparency with a white spot on it, which is not how you achieve multiply-lighting - darkness has to be black on the lighting layer).

Shadow casting objects have to be box shaped - it can't cast shadows off custom shapes yet. So it looks a little odd when you get it rendering correctly still, but that's because the platforms aren't box shapes.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest