Texture shift in jmetest/effects/TestBumpMapping.java


from a default position, if you move a little closer to the torus, it can be clearly seen that the texture cyclically "shifts".

any ideas why?

Could you explain in detail what you mean?

it's easier if you compile example and watch it :slight_smile:



basically, as the light rotates around the torus, you will see torus's texture periodically shift back and forth, it's as if the UV coords get modified, so the texture gets offset a bit , and then jumps back to old UV values.

Sure its not just the lighting  XD

Or the perspective?  :|… which was my initial thought

13.7MB video



http://www.megaupload.com/?d=5M6SVQVP





btw, the TestBumpMapping.java has the name 'decal.PNG' wrong. You have to change it to 'Decal.PNG'



took me a while to find a good proggie to record movie from desktop. the closer you get to donut, the more apparent the texture shifting, ghosting, whatever it is.


so, any comments?

Its not shifting texture coordinates, but the movement of one of the textures (or generated texture) based on the light location is what gives the illusion of depth on the surface. With out that it wouldn't look bumpy. I think thats the whole point.  :expressionless:

texture should not move. only it's pixel colors should change based on the light intensity and height map.



here's an example, using OpenGL. its already precompiled. i dont see any ghosting. do you?



http://nehe.gamedev.net/data/articles/extras/article20/bump_mapping.zip

Is there parallax mapping in the demo? That could explain it when your perspective changes.

Looking at the video, I see what you mean, but I cannot say if it is really a problem, or just an artifact of bump-mapping and the light source… I think you will need more input on some more advanced users.