Where the bump gets strange

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.
mischterlampe
Posts: 44
Joined: Fri Apr 03, 2020 6:22 pm

Re: Where the bump gets strange

Post by mischterlampe » Fri Nov 20, 2020 1:27 pm

This is exactly what I'm looking for.

This means, I have to wait until the "bumpsamplingdistance" is available in the blender plugin?

User avatar
B.Y.O.B.
Developer
Posts: 3981
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Where the bump gets strange

Post by B.Y.O.B. » Fri Nov 20, 2020 2:45 pm

Dade wrote:
Fri Nov 20, 2020 1:06 pm
The default sampling distance is 0.001 (1 mm), smaller value should be used if the bump (procedural) texture has smaller details (like in the case above).
In my tests it seems like just using a lower default value in all cases could be a solution.
But I guess the default was chosen higher for a reason, so could it introduce problems I don't notice now?

Below is a cube with 2m diameter with an fBM texture as bumpmap.
Attachments
sampling distance = 0.001
sampling distance = 0.001
sampling distance = 0.000001
sampling distance = 0.000001
the bumpmap as black/white values (note negative values are clamped to black)
the bumpmap as black/white values (note negative values are clamped to black)

mischterlampe
Posts: 44
Joined: Fri Apr 03, 2020 6:22 pm

Re: Where the bump gets strange

Post by mischterlampe » Fri Nov 20, 2020 3:49 pm

What happens when you get close?
Create a 2cm by 2cm cube on top and zoom in, so that the small cube is for example 4cm. How does the bump behave then?

User avatar
Dade
Developer
Posts: 4978
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Where the bump gets strange

Post by Dade » Fri Nov 20, 2020 3:53 pm

B.Y.O.B. wrote:
Fri Nov 20, 2020 2:45 pm
In my tests it seems like just using a lower default value in all cases could be a solution.
But I guess the default was chosen higher for a reason, so could it introduce problems I don't notice now?
If the sampling distance is too small compared to the wave length of the procedural textures, you can start to have a delta, between two sampled points, equal to 0.0 and non bump mapping at all. It can not happen with real numbers but it can happen with FP32. You can also experience aliasing problems if the sampling distance is not appropriate.

Whatever default value you pick, I can always build a scene where it will show problems.

May by you can have combo with 3-4 preset values: micro details (0.00001, the default setting), small details (0.001), macro details (0.1), user defined (i.e. the number is set by the user). Like I said there always can be a case outside the intended range.
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 3981
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Where the bump gets strange

Post by B.Y.O.B. » Fri Nov 20, 2020 6:38 pm

Ok, I have added the "Sampling Distance" parameter to the bump node.

The tooltip description is
Distance to use when picking two points on the surface for bump gradient calculation.
Use smaller values if procedural bump textures with very fine details don't show a bump effect.
Note: does not affect bump sampling of image textures.
Attachments
Capture.PNG

mischterlampe
Posts: 44
Joined: Fri Apr 03, 2020 6:22 pm

Re: Where the bump gets strange

Post by mischterlampe » Fri Nov 20, 2020 7:23 pm

*happy*
thank you.
Do you plan to add the "Sampling Distance" to the "Triplanar Bump Mapping" Node, too?

User avatar
B.Y.O.B.
Developer
Posts: 3981
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Where the bump gets strange

Post by B.Y.O.B. » Fri Nov 20, 2020 9:43 pm

I forgot about that one. Added.

mischterlampe
Posts: 44
Joined: Fri Apr 03, 2020 6:22 pm

Re: Where the bump gets strange

Post by mischterlampe » Fri Nov 20, 2020 10:18 pm

"expose bump sampling distance in triplanar bump texture, too"

Sorry for being "kleinlich" :lol:

User avatar
Dade
Developer
Posts: 4978
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Where the bump gets strange

Post by Dade » Fri Nov 20, 2020 10:56 pm

mischterlampe wrote:
Fri Nov 20, 2020 10:18 pm
"expose bump sampling distance in triplanar bump texture, too"
Triplanar bump mapping is bit a topic on its own: https://forums.luxcorerender.org/viewto ... =80#p19280

Are you using UV or UV-less bump mapping ?

As usual, you may want to post a test scene because it may be or may be not the same topic.
Support LuxCoreRender project with salts and bounties

mischterlampe
Posts: 44
Joined: Fri Apr 03, 2020 6:22 pm

Re: Where the bump gets strange

Post by mischterlampe » Sat Nov 21, 2020 12:01 am

The idea is to get rid of UVs so a procedural map can be place e.g as a bump on a part of the product. This shader is reused on other parts of the product, too. The size of e.g. the noise should be the same on every part of the product, regardless of UVs or mesh density. Just depending on real world scale. Because the parts came from step data, there is no UV and the geometry is "not good looking". The goal is to create a shader, procedurally, independent of UV, flexible and high resolution.
I will test the triplanar bumt mapping, too.
Thank you very much for your willingness to help.

What I would like to know is how do you decide where the journey of luxcore goes? Who or what is consulting you, what are your goals in the world of so many renders and realtime engines?
I ask this question, because I really love the luxcore's results (I come from the photography's world) and I appreciate the work you do, but at our studio (we do mutliple 100k € projects a year) we have some workflow needs, which other renders fullfill.
Who is the one to speak to, if I want to talk about the strategy and the future?

Post Reply