Hi,

I was thinking about one improvement of the rooftiles shader.
It's quite important to check the final bump height value of the shader (to
use the same value in the SDS displacement). The shader uses two curves to
compute the bumpheight value. Both curves are added together.

So I assumed that the user will use two curves (or an image and a curve)
that both run from 0 to 1.
In that case the Max bump height slider in the material user interface will
show the bump height in cm. In that case the user can put this same value in
the SDS max displacement box, and that will make sure that the displacement
has a correct value.
If these values do not correspond you will get one of the next two problems:
-If the value in the SDS object is lower than the bump height in the shader
you get errors in the displacement
-If the value in the SDS object is higher you will loose perfomance in
renderspeed.

At this moment I use a fixed constant to halve the outcome of the addition
of the two bump curves. In the next step I use a variable that the user can
change to set the displacement to a desired level.

But now comes the problem: If a user does not create a curve that runs from
0 to 1 the variable will not show the right value. So what would be the best
solution in such a case?

Is it possible to find the minimum and maximum values of a curve or an
image?
With this outcome it should be possible to calculate the right devision
value.
Or is there a way to rescale any input by the user, so that it runs from 0
to 1 again?

Of course I could explicitely write in a readme that the user should always
use the right curves. And of course for my own use I will use these right
values. But just out of interest I would like to know an answer.

Arjo.

Reply via email to