How does BumpMapping Operate?

Get help using Construct 2

Post » Sat Jul 23, 2016 9:58 pm

Hello all and thanks for looking.

Im trying to get the bumpmapping effect to work with my game and am having little luck. Im hoping one of you knows how it works.
When I set bumpmapping Light coX to ((character.X-bumpmap.X)/bumpmap.Width)*100
and bumpmap Light coY to ((character.Y-bumpmap.Y)/bumpmap.Height)*100
The Light (in the bumpmap) is floaty and not accurate which can be fixed by adjusting the coordinates but as soon as I overlap another bumpmap its back to being not accurate. Is this because the origin of "light" in the bumpmap is reset with each bumpmap? And is that origin at the bottom of the bumpmap or the bottom of the layout? Im so confused.

EDIT

Even if I combine my 2 bumpmaps into one very large bumpmap, the light coordinates are still floaty and drifting. Im assuming then that there's a problem with the equation ((character.Y-bumpmap.Y)/bumpmap.Height)*100
The bumpmap parameters operate on a 1-100 scale, I guess a percentage of the coverage with 1 being first pixel of the bumpmap, 50 the middle pixel, and 100 the last pixel. I think the equation is missing something and thats allowing the light to drift. Anyone have any ideas? Am I even making sense? :)
B
25
S
7
Posts: 79
Reputation: 2,267

Return to How do I....?

Who is online

Users browsing this forum: Bootfit, brunopalermo, mihirolover, tarek2 and 7 guests