[Rec] Implement tables in the shader language

Feature requests, bug reports and related discussion
Post Reply
6 posts • Page 1 of 1
User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

[Rec] Implement tables in the shader language

Post by galinette » Thu Jan 21, 2010 1:40 am

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
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: [Rec] Implement tables in the shader language

Post by fused » Thu Jan 21, 2010 10:21 am

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

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: [Rec] Implement tables in the shader language

Post by galinette » Thu Jan 21, 2010 10:22 am

Thanks for the help. The technical doc definitely needs some refresh!

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

Soup
Posts: 444
Joined: Sat Jun 13, 2009 1:20 am

Re: [Rec] Implement tables in the shader language

Post by Soup » Thu Jan 21, 2010 1:18 pm

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:

User avatar
psor
1st Place Winner
Posts: 1295
Joined: Sun Jun 25, 2006 1:25 am
Location: Berlin
Contact:

Re: [Rec] Implement tables in the shader language

Post by psor » Thu Jan 21, 2010 2:03 pm

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
"The sleeper must awaken"

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: [Rec] Implement tables in the shader language

Post by galinette » Fri Jan 22, 2010 7:00 am

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
Eclat-Digital Research
http://www.eclat-digital.com

Post Reply
6 posts • Page 1 of 1

Who is online

Users browsing this forum: Majestic-12 [Bot] and 23 guests