bump map not loading

General questions about Indigo, the scene format, rendering etc...
User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Fri Mar 16, 2007 5:11 am

I somewhere read, you shouldn't change b or c normally...
just a is important.
So it can't represent RPG...
a should be...

f(x)=a*g(exponent)*2
hmmm...

Isn't there any good simple word for that? It seems that noone (I'm not a exception) can completely figure out, what these things mean... variaables are cionfusing... Sometimes, it would be better to see a formula with the meaning of the variables, instead of either shorts or meaningless letters... :(

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

Post by CTZn » Fri Mar 16, 2007 5:27 am

The final, used value for each component is calculated like so:
"for each component" means than this equation is how R, G and B final values are computed for every pixel of the map. So, for each of these pixels

Code: Select all

R = a*Xexponent² + b*Xexponent + c
G = a*Xexponent² + b*Xexponent + c
B = a*Xexponent² + b*Xexponent + c
At least this is how I try to get the point, maths only killed my scolarity :?
are abc representing RGB
or something different than like a alpha, b bump, c color value???
f(x) is the final used value
So they don't represent just R, G and B. The whole equation does (each of the rgb components equals f(x)). As for variables, I'm lost too. I'm wondering if that's related with tonemapping, but I guess these calculations happen before...
a, b, c, and exponent are as described below.
that is ... where ?

User avatar
F.ip2
Posts: 160
Joined: Thu Aug 10, 2006 11:05 am

Post by F.ip2 » Fri Mar 16, 2007 2:11 pm

i give up ... :cry:
--
C l a a s E i c k e K u h n e n
Artist : Designer : Educator

Assistant Professor Industrial Design
Kendall College of Art and Design
of Ferris State University

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

Post by CTZn » Fri Mar 16, 2007 2:29 pm

I'm sorry... I even don't know if what I've saied makes sense :lol:

User avatar
Stur
Posts: 594
Joined: Fri Nov 10, 2006 11:52 pm
Location: Nancy, France

Post by Stur » Fri Mar 16, 2007 9:09 pm

F.ip2, this is how I understand it :

- A improves gamma a lot
- B improves gamma reasonably
- C improves gamma a few


To be simple, just use B. If your texture is too dark, raise B a little. If your texture is to saturared, reduce B a little.

Hope it helps. (and hope I'm right :D)

mrCarnivore
Posts: 517
Joined: Sun Mar 04, 2007 6:20 am
Location: Stuttgart, Germany

Post by mrCarnivore » Fri Mar 16, 2007 9:49 pm

Here's how I understand it:

a, b, c are values that effect the colour of the texture.

the formula f(x) = a * g(x)² + b * g(x) + c is calculated for each r,g,b to calculate the r,g,b values that are used in the render.

I will explain the process for the r-component. The two other components are treated the same:
For clarity I define r_texture to be the r-value of the original texture (g(x) in the original formula).
r_final is the final value of that texture pixel that is used in the render (f(x) in the original formula).
Written with these variables the f(x)-formula looks like this:

r_final = a * r_texture * r_texture + b * r_texture + c


READ FROM HERE IF YOU JUST WANT THE RESULTS:

c is just a constant offset.
It makes all pixels of the texture brighter by the same amount. So the brightness of an image is increased. Notice that clipping might occur if you use a too large value for c.

b makes all pixels brighter/darker linear to their colour value.
So for values of b<1 the contrast of an image is decreased. For b>1 the contrast is increased. Notice that you will get clipping of you choose b-values of greater than 1!

a makes all pixels brighter to the square of their value. It mainly does the same as the b value just with an even stronger effect. The a-parameter makes the darker values much more dark than the b-parameter, whereas the brighter pixels are affected almost the same by the a- and b-paramter. However, you will not get any clipping, regardless of the values of a you choose.

How about an example:
So if you have a pixel of value (r_texture,g_texture,b_texture) = (0.1, 0.4, 0.9)

The impact of the a,b,c values will be following:
a=0.1, b=0, c=0;

(r_final, g_final, b_final) = (0.001, 0.016, 0.081)

a=0, b=0.1, c=0;

(r_final, g_final, b_final) = (0.01, 0.04, 0.09)

a=0, b=0, c=0.1;

(r_final, g_final, b_final) = (0.0, 0.3, 0.8 )


Hope this helps. Actually thinking it through helped even my understanding a,b,c more. :D

User avatar
manitwo
Posts: 1029
Joined: Wed Jul 05, 2006 4:50 am
Location: Tirol - Austria

Post by manitwo » Fri Mar 16, 2007 10:22 pm

good explanation! The standard indigo user won't benefit from this tho.
(except if the exporters would support a,b,c with a live-preview :wink: )

mrCarnivore
Posts: 517
Joined: Sun Mar 04, 2007 6:20 am
Location: Stuttgart, Germany

Post by mrCarnivore » Sat Mar 17, 2007 12:03 am

Actually it generating a preview for the texture according to the a,b,c parameters should be quite quick to calculate. So if somebody has the time and skills, it should be straightforward to implement in the exporters...

User avatar
OnoSendai
Developer
Posts: 6244
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Sat Mar 17, 2007 12:05 am

Well.. most people will only need to use b (gain).
The c parameter is there so that, say, if you want to use a negative of a texture for a blend material, you can set c=1 and b=-1.
The a is there because... well it might come in useful for something, and it's very cheap to compute :)

mrCarnivore
Posts: 517
Joined: Sun Mar 04, 2007 6:20 am
Location: Stuttgart, Germany

Post by mrCarnivore » Sat Mar 17, 2007 12:42 am

I can see why you namen the variables a,b,c. It makes sense looking at the formula.

From the whole concept about indigo and your responses I can gather that you think very mathematically. However, it might be useful if you replaced (or explained) the b with contrast, c with brightness. I guess those are equivalent terms to the effects that those coefficients have.

Having said that, it might be enough if the exporters just renamed the variables in their GUIs and you kept a,b,c in the xml...

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Sat Mar 17, 2007 2:09 pm

Thanks everyone for the information.

I read it all and understand better the meaning for these.

:)
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
F.ip2
Posts: 160
Joined: Thu Aug 10, 2006 11:05 am

Post by F.ip2 » Sat Mar 17, 2007 4:16 pm

I agree! I wish I would understand the math much better.
I hate just knowing where to click to get something but not knowing
why I have to do it.

I think replacing A,B,C with B like Bump depth value for example will help
non programmers a lot to understand what they are doing!!!

Anyway Ono great job for the render engine. This is my first time using it and I have to say for my first image I am very happy!


I just wish velvet and anisotropic reflections would be possible. I ran into many anti aliasing issues with to fine brushed image maps. They produced a lot of moires.

claas
--
C l a a s E i c k e K u h n e n
Artist : Designer : Educator

Assistant Professor Industrial Design
Kendall College of Art and Design
of Ferris State University

Post Reply
27 posts