Shiny Rock

Post your own tutorials, guides and demos.

Post » Thu Jul 17, 2008 4:34 pm

Heh...nice little effect I achieved using a method similar to Ashleys rain demo, but magnifying the clouds on the bottom layer....I actually did this without using a single event!

Bottom Layer:
Has clouds on it, and a sprite that magnifies the clouds for the reflection it has on the rock

The grass layer (needs to use its own texture)
Has grass on it, a sprite that shows the shadow of the rock, and a sprite that masks out the grass to reveal the rock

The top most layer
This just has a sprite on it which colours the rock, allowing the reflection to also be tinted the colour of the sprite.

And thats it. If you applied that technique in a full game you could easily have lakes and shiny objects or really any kind of reflection effect. Sadly the grapics I used in this don't really demonstrate the effect all that well heh :( But meh!

Oh btw use the mouse to move the rock, and the arrow keys to scroll the background.

Happy constructing :P

------
Require Pixel Shader 1.4 - if you cant run it go to application properties and tick 'run without pixel shader'....it still works just doesn't look as good
------
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Thu Jul 17, 2008 4:42 pm

ps 1.4 here... could you upload a screenie? i'm curious :P
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Jul 17, 2008 4:51 pm

I captured a couple of frames and made an animating gif to give u an idea...but doesn't really demonstrate it all that well :(

B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Thu Jul 17, 2008 6:22 pm

Really clever effect there dude. It would be a great effect for metallic objects and the like.
B
2
S
2
G
5
Posts: 156
Reputation: 1,962

Post » Thu Jul 17, 2008 6:50 pm

Looks pretty good! I really like the fact that it doesn't use any events (it's not tied down to the layout)

Although the effect would probably work better for Glass or something since (shiny) rocks generally only reflect light or really close objects anyway.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Fri Jul 18, 2008 6:42 am

oh wow! I never knew of that "eraser" effect before! That's really awesome! :D
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest