Help to implement Bump mapping.

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
kybio
Posts: 14
Joined: Tue Apr 30, 2019 4:11 am

Help to implement Bump mapping.

Post 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?
Attachments
manfull.jpeg
manfull1.jpeg
manfull.cfg
(605 Bytes) Downloaded 217 times
manfull.scn
(3.53 KiB) Downloaded 234 times
Unnamed_group.png
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Help to implement Bump mapping.

Post 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.
kybio
Posts: 14
Joined: Tue Apr 30, 2019 4:11 am

Re: Help to implement Bump mapping.

Post 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..
Attachments
manfull.jpeg
wasd
Posts: 319
Joined: Tue Apr 24, 2018 7:20 pm

Re: Help to implement Bump mapping.

Post 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
CPU Bidir + Metropolis | Core i5-4570
kybio
Posts: 14
Joined: Tue Apr 30, 2019 4:11 am

Re: Help to implement Bump mapping.

Post by kybio »

Thank you Wasd,

I'll try to fix the problem with your idea.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Help to implement Bump mapping.

Post 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
kybio
Posts: 14
Joined: Tue Apr 30, 2019 4:11 am

Re: Help to implement Bump mapping.

Post by kybio »

Hi,

I have an interior volume in the project, but it does not seem to work very well ..
kybio
Posts: 14
Joined: Tue Apr 30, 2019 4:11 am

Re: Help to implement Bump mapping.

Post 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.
User avatar
nigec
Posts: 141
Joined: Mon Mar 11, 2019 8:50 am

Re: Help to implement Bump mapping.

Post by nigec »

From what I've seen with other renderers they use hdri lighting for that model
kybio
Posts: 14
Joined: Tue Apr 30, 2019 4:11 am

Re: Help to implement Bump mapping.

Post by kybio »

Certainly some bug in the contact of the luminosity with the mesh. I tried HDRI and it worked much better.
Attachments
bug.jpg
manfull.jpeg
Post Reply