Bump mapping: User stupidity or bug?


(Surt) #1

http://img388.imageshack.us/img388/9969/bumptest1zp.th.png
When adding some bump mapping to a model I noticed it was looking screwy, so did this test.

With the lamp above and below the rect it looks as though the lamp is directily over the mesh (Y), not above it (Z).
It doesn’t look to be evaluating the vertical vector component correctly.

This occurs both with 2.37a and 2.4 alpha, so it seems unlikely it would be a bug.
So what am I doing wrong, or is this actually a bug?

(I’ve seen people with attached files, how do you do that here, so I can attach the blend?)


(MassTA) #2

Its not the same texture, so its hard to compare, but it looks quite ok to me. Post your scene setup, if you want more info.


(alabandit) #3

[email protected] your settings? Is who have you applied your texture, flat or to a cube?


(Surt) #4

Here the setup:
http://img468.imageshack.us/img468/193/mat6uv.png
http://img468.imageshack.us/img468/5937/tex3du.png

I’ve discovered that using “correct normal map” for the texture seems to fix the problem for orco mapping, but the problem still exhibits for global mapping. I always thought that “normal map” was a different kind of thing to “bump map”.

The problem also seems to go away when using object mapping without any object specified.

So am I just doing it wrong? It seems strange that you would have to use a “correct normal map” option to get proper bump mapping, why would someone want incorrect bump mapping? I still can’t get proper output in global mapping.


(alabandit) #5

Sorry about my english in my last post - in the first pic you loaded, under map input, ther are 4 buttons, “flat, cube, tube and sphear.” The tell blender how to apply your texture to the object. Your problem might dissapear is hit the one that says “cube” as the texture will be applied to follow the normals of a cube beter.


(Surt) #6

As far as I’m aware the mapping shape has no effect on procedurals, only on imagemaps, so that doesn’t have any effect.


(SoylentGreen) #7

I’ve tried the settings from the pictures you’ve posted, and

  1. the texture looks different in the preview window,
  2. it works as expected.

I’m afraid that you have to post the blend File.


(alabandit) #8

Sorry. I sat down tried out what you said :expressionless: and it didn’t work. tried messing around :expressionless: still din’t work. Went back to the basic (Gus) and you guessed it, still didn’t work. If you figaure it out pls post i stuck now too.


(Spin) #9

Here’s what I got. But I am missing settings that you have, because you can see the difference in my texture.

http://mysite.verizon.net/vze3nvj6/Blender/forum/NOR.jpg


(Ongnissim) #10

Global mapping (as opposed to ORCO) makes the texture based on the X, Y, and Z axis, so, moving it will change the texture. If you keep it on orco, it will be that same, because it is based on the mesh data. I think this is your problem, based on what you said, and based on that your first image looks like 4 Cubes, not just the same image rendered with different lighting. So, use orco, and not global, for things that are moving, or else it will change (which causes some neat effects if you want them…).

Hold on Tight,
Ongnissim


(Surt) #11

The bumpmapping works fine in orco with “Correct nor map” selected (why it defaults to the incorrect old behaviour, I don’t know).

But in global the bumpmapping comes out wrong both with “Correct nor map” on and without it.

Ongnissim: Yeah, global uses a fixed, object-independent transform for the texture, but bump should still work correctly.

Here’s the blend.


(Ongnissim) #12

I looked at your blend, and the only excuse I can find to why they look weird is that the planes are only 2D, meaning they have only one face, and one normal. When a normal is facing outwards, it blocks light/rays from going into it, but if it is backwards, then light can still go through that side outward, causing those ugly black marks in meshes when your normals are reversed. Your Up/Down plane is pointing left, and the Left/Right plane is pointing up, letting light shine through to your top right, and bottom left cubes, causing the lightin problems. You could easily make the Planes into 3D objects by extruding them, even if my just a hair. I think this should fix your problem, thought I could be wrong…

Hold on Tight,
Ongnissim

Edit: JSYK, this is the only seemingly possible quick explaination I could think of, and I didnt even try it, but, if it isn’t, post again, b/c is may very well be a bug. Have your tried other procedurals, like the one spin used?


(Surt) #13

The planes are just there so I can demostrate the problem in one blend. The same happens even if there is just one cube and one lamp.


(SoylentGreen) #14

I’ve tried your blend-File. The problem is the position of the lamps. After all, BumpMaps (NormalMaps) are only 2D, so you may not exaggerate the positioning.

The Lamps are too close to the surface, so some of the shadows gets to long.


(Surt) #15

If that’s the case then the left-right lighting should behave the same as they have the same angle of incidence, so I don’t think that could be the problem. And the problem isn’t shadows being over-long, it’s that they have not consistent source.

Here’s a demo:
http://img487.imageshack.us/img487/4091/bumptest2th9hx.th.png
The blend.

With a much steeper angle of incidence, the problem is still quite visible, though less pronounced.


(SoylentGreen) #16

Anyway, it is not a bug (nor stupidity :D) , and I’m afraid that you have to make another texture to achieve the desired result.


(Surt) #17

What else then?

Anyway I think I’ll post the problem on the dev forums and see what they’ve got to say about it.