Page 1 of 2

Help to implement Bump mapping.

Posted: Thu May 23, 2019 8:37 pm
by kybio
Hello everyone,

I need help getting Bump mapping correct. One of the images shows only the texture mapping with Glossytranslucent and the other one I'm trying to load the Bump map, there are two lights in the scene, but something does not come out right in the final image. Can anyone help me identify where I'm going wrong?

Re: Help to implement Bump mapping.

Posted: Thu May 23, 2019 9:09 pm
by B.Y.O.B.
Bump mapping is in meters as far as I know, so a white pixel in your bump map that has a value of 1 means 1 meter of bump (assuming that your model has real-world dimensions in meters).
Usually what you do with bumpmaps is scale them down to more sensible values. You can do this with the "gain" property of the imagemap or with a "scale" (aka multiply) texture.

For example, to get 1 mm of bump, you would use these properties:

Code: Select all

scene.textures.Unnamed_groupnormal0.file = displace.png
scene.textures.Unnamed_groupnormal0.gamma = 1
scene.textures.Unnamed_groupnormal0.gain = 0.01
Note that you should also use gamma = 1 for all imagemaps where you directly use the data, without gamma correction.

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 1:00 am
by kybio
Ok, I understood your idea, but the problem seems to be with the mapping, because even decreasing the "gain" the texture behaves strangely, as if it had a dark spot in the center of the image..and also in the neck and eye side left..

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 8:07 am
by wasd
kybio wrote: Fri May 24, 2019 1:00 am Ok, I understood your idea, but the problem seems to be with the mapping, because even decreasing the "gain" the texture behaves strangely, as if it had a dark spot in the center of the image..and also in the neck and eye side left..
Try to remap height map from 0.0 - 1.0 to 0.51 - .99, then adjust bump height. You'd have to set height somewhere from 0.1 mm to 10 cm.
It may solve some issues.
p.s. bump is probably bugged (both height map and normal map), it never works as expected

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 10:56 am
by kybio
Thank you Wasd,

I'll try to fix the problem with your idea.

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 11:33 am
by B.Y.O.B.
You could try to reduce the gain further.
Also, you might want to test the bump on a glossy material first before moving to glossytranslucent. Just to eliminate other possible error factors.

And you might need an interior volume later for your glossytranslucent material in order to get correct SSS.
This might help: https://wiki.luxcorerender.org/Subsurface_Scattering

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 11:58 am
by kybio
Hi,

I have an interior volume in the project, but it does not seem to work very well ..

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 5:17 pm
by kybio
I think the error is in the interaction of the mesh with the lights, because if it has a single light it works ok. And the error occurs exactly at the junction of the luminosities of the lights.

My ligths are meshes with emission.

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 6:22 pm
by nigec
From what I've seen with other renderers they use hdri lighting for that model

Re: Help to implement Bump mapping.

Posted: Fri May 24, 2019 11:21 pm
by kybio
Certainly some bug in the contact of the luminosity with the mesh. I tried HDRI and it worked much better.