Bumpmap light rotates along with object

This forum is currently in read-only mode.
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • The bumpmapping effect's light rotates along with object, which is kind of silly.

    Is there a reason for this? Are there any simple ways around it? I wanted to rotate an object that was lit by the side, showing its all of its bumpyness, but as it is now, I might as well bake the light in.

  • I just tried to fix the shader but my shader skills aint up to snuff.

    Anyone? I believe the effect is just lacking some matrix rotation

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Are you using it on the object, or the layer?

  • the object :s am I supposed to do otherwise?

    I just put it on the layer now and it still looks wrong.

    If I turn the bumpmap sprite's rotation off, it looks okay (when going around the light source, the shadows oppose it). I had to look at the fx file to figure out that the x and y positions are 0 to 1 across the screen.

    If I turn the bumpmap sprite's rotation on, the shadows spin along with the bumpmap. This is wrong.

    Also, the transparent parts of the bumpmap layer still affect the underlying layers (move the ship around and watch it get lit) and the unlit parts are gray instead of black. I would suggest an ambient term parameter (which I'd be setting to 0 for this game).

    This is the .cap file, please have a look. The bumpmapping effect needs to account for rotation of the bumpmap (leading to eye popping visuals!), but I don't know how to fix it (I noticed it's doing a simple unrotated displacement though). Toggle the angle update action to see the uglyness.

    http://www.udec.cl/~jfuente_alba/asteroids.cap

    Edit: just figured out the correct terminology: the bumpmap effect is being done in object space, should be world space.

  • And I think that you can't rotate bump maps so you would have to use height maps if im not completely wrong?

    EDIT cuz of me being blind!

  • However, normal maps cannot be rotated, since the 3D data is only valid for an angle of 0 degrees. If you want to apply bumpmapping to a rotating object, you can only use heightmapping

    Thats what the wiki says!

  • grumble. Fancy hardware going to waste. grumble.

    Guess I'll wind up making a new bumpmap effect then.

  • I'll tell you a secret if you fix my VRAM problems im having now

  • Uh.. I could always try.

    Also, I like secrets.

  • Hehe I fixed VRAM problems already but use heightmaps Give em a shot

  • Hehe I fixed VRAM problems already but use heightmaps Give em a shot

    Just did. What's the difference between heightfield and heightfield background? also, lighting lacks contrast =( also it doesn't handle transparency correctly either.

    yeah. I complain a lot, too.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)