Page 2 of 3

Re: Tutorial bump map?

Posted: Thu Oct 29, 2009 8:59 am
by CTZn
Hi madcoo !

Strictly, the maximum value (if we discard the a parameter) is b+c, not b alone. c will modify all values if non null. The sentence from me you quoted is incorrect in that regard.

Another example with exponent (phong):

I have a grayscale image. By default b=1 and c=0, meaning that the maximum phong exponent will range from 0 (black pixels) to 1 (white pixels). That's too low for this material parameter, wich should have it's smallest value closer to 1 (as a minimum), and wich can go up to millions.

More precisely for this example, I want the texture to describe an exponent ranging from 689 to 12800, not more not less.

That means that black pixels should return the value 689 instead of zero; 689 will be the choosen value for c. But, if I use 12800 for b then the max possible value will be 12800+689=13489... not what's planned.

So, whenever c is used, I need to "amend" b consequently. To obtain the aimed range, I will have to substract c from b to find the maximum possible value for b within that range.

The values I need to use are:

b = 12800-689 = 12111
c = 689

No value will then go below 689, nor above 12800.

I hope this fixes the puzzle, feel free to ask more if needed :)

Re: Tutorial bump map?

Posted: Thu Oct 29, 2009 8:06 pm
by madcoo
Many thanks, this looks clearer to me now!
:D

I'm at work right now, but as soon as i get back home i'll try this!

Many many thanks again, i can be slow at understanding sometimes....!
:mrgreen:

Re: Tutorial bump map?

Posted: Thu Oct 29, 2009 8:53 pm
by madcoo
And... I guess that finding the right range for the effect (exponent in your example), is more a "try and see" thing...?
With a "b" range from 1 to 1,000,000,000 , that'll be fun! :lol:

Re: Tutorial bump map?

Posted: Sat Oct 31, 2009 7:11 am
by CTZn
And... I guess that finding the right range for the effect (exponent in your example), is more a "try and see" thing...?
Yes it is, I gave arbitrary values for the example :) Comparing with photographs of similar materials is a recommended guideline.

Understanding slowly does not prevent to understand deeply, I am glad to help :) Not to mention that I may add confusion myself 8) :lol:

Re: Tutorial bump map?

Posted: Sun Nov 01, 2009 11:00 pm
by madcoo
CTZn wrote:Not to mention that I may add confusion myself 8) :lol:
:lol: !!!!

Thanks for your great help anyway, that's great !!!

Have a look at this thread about my Palmtree here - I think I'm getting better at bump/displacement/spec maps

Cheers!
:wink:

Re: Tutorial bump map?

Posted: Tue Nov 17, 2009 2:10 am
by StompinTom
In my understanding, the 'b' value is the linear multiplier of the texture (so that's the maximum value that white represents) and 'c' raises the whole value of the texture (raises the floor, so to speak, in audio terms). So, where previously black was 0, with a 'c' value of, say, '0.05' the black values will be mapped to this and the whole texture raised by '0,05'. Order of operations, so that happens AFTER the whole texture is multiplied by 'b'.

I find this mostly useful for changing the way albedo maps look, not necessarily bump maps, because you usually don't need to screw around with the black/unchanging values of a bump map; you can change their effect by altering the 'b' value.

The 'a' value seems to screw with the gamma... though I'm not sure. Hopefully we can all figure this out between all our heads :P

Re: Tutorial bump map?

Posted: Tue Nov 17, 2009 2:15 am
by StompinTom
Whoops, didn't see the second page. Yeah, I'd agree with CTZn. Still that mysterious 'a' value though...

Re: Tutorial bump map?

Posted: Tue Nov 17, 2009 2:36 am
by madcoo
The 'a' value seems to screw with the gamma... though I'm not sure. Hopefully we can all figure this out between all our heads
Sure we will!!!
:mrgreen:

Thanks to everyone for contributing!
:wink:

Re: Tutorial bump map?

Posted: Thu Jan 07, 2010 2:06 am
by madcoo
Hi all !

Just to make sure...

Is the following true?
When using bump or displacement settings:
* a value of 1.0000 = 1 metre
* a value of 0.1000 = 0.1 metre
* a value of 0.0100 = 10 cm
* a value of 0.0010 = 1 cm
* a value of 0.0001 = 1 mm

I'm asking, because sometimes when I do a preview, it doesn't seem to me to be true...

Indeed, when doing a preview, the "indigo preview mesh" is supposed to be 10cm large, or something close to this.
(at least, that's what the grid on the floor says)

When I use displacement, sometimes I can only start seeing displacement happening with a value of 0.004 or so, which should result in HUGE displacement (4cm for a mesh 10cm large).

I hope you see what I mean, and thanks in advance for replying soon...

Cheers!
:wink:

Re: Tutorial bump map?

Posted: Thu Jan 07, 2010 2:19 am
by madcoo
Please ignore last post...
I just had a look at the MatDb to understand...
:?

How dumb can I be????

=> In the preview window 10cm = EACH SMALL SQUARE,
NOT the distance between the "bigger" black lines.

Duh!
:lol:

Re: Tutorial bump map?

Posted: Thu Jan 07, 2010 2:32 am
by madcoo
Nope, still not making sense after all...

Have a look in the MatDb : the stone surface material
http://www.indigorenderer.com/materials/materials/52

It has displacement of 0.01, which should be 10cm...

=> Displacement should be bigger than it looks, if 1 small square on the floor is 10cm...

I'm LOST!!!!!!
:evil:

Re: Tutorial bump map?

Posted: Thu Jan 07, 2010 2:35 am
by PureSpider
1 small square is 2cm...
The problem is that the preview model is not scaled correctly!

Re: Tutorial bump map?

Posted: Thu Jan 07, 2010 2:36 am
by StompinTom
The prefix "centi" means "hundredth" or "hundred". There are 100 centimeters in 1 meter.

Therefore,

0.1 m
= 100 cm/0.1 m
= 10 cm

So you're off by one decimal place for everything under 0.1.

1 m = 1 m
1 dm (decimeter) = 0.1 m
1 cm = 0.01 m
1 mm = 0.001 m

The "10 cm" on the Mat Preview scene DOES correspond to the larger black lines.

Re: Tutorial bump map?

Posted: Thu Jan 07, 2010 2:37 am
by StompinTom
madcoo wrote: It has displacement of 0.01, which should be 10cm...
Nope. That should be 1 cm.

0.01 x 100 cm = 1 cm.

Re: Tutorial bump map?

Posted: Thu Jan 07, 2010 2:39 am
by madcoo
THANKS SO MUCH PureSpider!!!
:D

Is there a way to get into the preview model and scale it?