Tutorial bump map?

Tutorials/guides/tips on how to use Indigo and the Indigo exporters
User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Tutorial bump map?

Post by CTZn » Thu Oct 29, 2009 8:59 am

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 :)
obsolete asset

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Thu Oct 29, 2009 8:06 pm

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:
Visit my website!
http://www.fairview-3d.com Studio 3D

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Thu Oct 29, 2009 8:53 pm

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:
Visit my website!
http://www.fairview-3d.com Studio 3D

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: Tutorial bump map?

Post by CTZn » Sat Oct 31, 2009 7:11 am

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:
obsolete asset

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Sun Nov 01, 2009 11:00 pm

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:
Visit my website!
http://www.fairview-3d.com Studio 3D

StompinTom
Indigo 100
Posts: 1817
Joined: Mon Sep 04, 2006 3:33 pm

Re: Tutorial bump map?

Post by StompinTom » Tue Nov 17, 2009 2:10 am

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

StompinTom
Indigo 100
Posts: 1817
Joined: Mon Sep 04, 2006 3:33 pm

Re: Tutorial bump map?

Post by StompinTom » Tue Nov 17, 2009 2:15 am

Whoops, didn't see the second page. Yeah, I'd agree with CTZn. Still that mysterious 'a' value though...

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Tue Nov 17, 2009 2:36 am

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:
Visit my website!
http://www.fairview-3d.com Studio 3D

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Thu Jan 07, 2010 2:06 am

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:
Visit my website!
http://www.fairview-3d.com Studio 3D

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Thu Jan 07, 2010 2:19 am

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:
Visit my website!
http://www.fairview-3d.com Studio 3D

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Thu Jan 07, 2010 2:32 am

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:
Visit my website!
http://www.fairview-3d.com Studio 3D

User avatar
PureSpider
Posts: 1459
Joined: Tue Apr 08, 2008 9:37 am
Location: Karlsruhe, BW, Germany
Contact:

Re: Tutorial bump map?

Post by PureSpider » Thu Jan 07, 2010 2:35 am

1 small square is 2cm...
The problem is that the preview model is not scaled correctly!

StompinTom
Indigo 100
Posts: 1817
Joined: Mon Sep 04, 2006 3:33 pm

Re: Tutorial bump map?

Post by StompinTom » Thu Jan 07, 2010 2:36 am

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.

StompinTom
Indigo 100
Posts: 1817
Joined: Mon Sep 04, 2006 3:33 pm

Re: Tutorial bump map?

Post by StompinTom » Thu Jan 07, 2010 2:37 am

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.

User avatar
madcoo
Indigo 100
Posts: 206
Joined: Thu Jun 11, 2009 9:05 pm
Location: in France, near Orange (84)
Contact:

Re: Tutorial bump map?

Post by madcoo » Thu Jan 07, 2010 2:39 am

THANKS SO MUCH PureSpider!!!
:D

Is there a way to get into the preview model and scale it?
Visit my website!
http://www.fairview-3d.com Studio 3D

Post Reply
35 posts

Who is online

Users browsing this forum: No registered users and 0 guests