Page 1 of 1

[Rec] Implement tables in the shader language

Posted: Thu Jan 21, 2010 1:40 am
by galinette
If we could use tables in the shader definitions, then it would be possible to use measured spectrophotometric material data, and thus allow to make really advanced material models. Maybe this is more generic way to describe coated glass than adding a specific "tabulated" feature in the specular model. In that case, reflectance & transmittance coefficients should be user definable via a shader.

By the way, is wavelength accessible in the shader language? Is normal vector supported now?

Letting define fully customized BRDFs and BTDFs would allow endless material possibilities, and would make Indigo very interesting for industry applications.

Etienne

Re: [Rec] Implement tables in the shader language

Posted: Thu Jan 21, 2010 10:21 am
by fused
hey Etienne,

wavelength is accessible, normals arent, yet, but will be soonish.

it is of course only accessible in the wavelength dependent channels of the indigo material.
to use wavelength define you eval function like this:

Code: Select all

def eval(real wavelen, vec3 pos) real: 1.0
the range of "wavelen" is 400.0 -700.0

Re: [Rec] Implement tables in the shader language

Posted: Thu Jan 21, 2010 10:22 am
by galinette
Thanks for the help. The technical doc definitely needs some refresh!

Etienne

Re: [Rec] Implement tables in the shader language

Posted: Thu Jan 21, 2010 1:18 pm
by Soup
If you spot some gaps in the Technical manual, let us know so we can fill it for you. There's so much stuff it's hard to know what's there and what isn't :mrgreen:

Re: [Rec] Implement tables in the shader language

Posted: Thu Jan 21, 2010 2:03 pm
by psor
Soup wrote:If you spot some gaps in the Technical manual, let us know so we can fill it for you. There's so much stuff it's hard to know what's there and what isn't :mrgreen:
Ouch, ... unfortunately that is exactly my impression over the last two years.



take care
psor

Re: [Rec] Implement tables in the shader language

Posted: Fri Jan 22, 2010 7:00 am
by galinette
So in fact, I just need to use a 2D texture instead of a table, and for the same price I have automatic table interpolation. That means there is maybe no strong need to implement the table, except for convenience (I will have to write some code to convert my wavelength/angle tables into 2D textures.)

Even more than normal vector, having access to angle of incidence would be very, very interesting. Then we may be think of implementing something that looks like a BRDF

Etienne