Page 1 of 1

[ISL] Fresnel-Shader

Posted: Fri Nov 27, 2009 2:03 am
by zeitmeister
Hey,
I wondered where I can find information about coding a simple fresnel shader in ISL; from black (outwards) to white (inwards).
ISL documentation is few and confusing in my eyes... can someone please post a sample code like above?
I want to use this shader as a blend map/blend shader in Cindigo.
Maybe fused will have to give me further advice on that, but at first I would like to code this simple shader.
Can someone please help me?

Thank you very much in advance!

Re: [ISL] Fresnel-Shader

Posted: Fri Nov 27, 2009 7:51 am
by CTZn
According to the last Indigo technical manual version, the possible interactions of ISL with the scene are too limited, only texture sampling functions are allowing to query data from the scene.

For that shader you basically need two missing informations:

the camera direction:
  • it is already known at scene export time and present in the IGS, bringing it to the ISL engine is a possible task wich fused realised already iirc.
the direction of the normal of the sampled surface:
  • That one we can't access at all, if I am correct
Once ISL will allow to access these informations one would be able to do dust and snow shaders (not to mention a simple cell shading), because ISL is already providing the tools to manipulate vectors.

For now you can bake blend maps from your fav'app :)

If I have missed some ISL update please let me know, I'll be on your trail then zeitmeister !

Re: [ISL] Fresnel-Shader

Posted: Fri Nov 27, 2009 10:04 am
by fused
not possible currently because we cant acces the normal... :(

Re: [ISL] Fresnel-Shader

Posted: Fri Nov 27, 2009 10:43 am
by CTZn
mewants a snow displacer for christmas Image

Really a good approach to learn shading with ISL, nice pick zeitmeister.

Re: [ISL] Fresnel-Shader

Posted: Fri Nov 27, 2009 8:53 pm
by zeitmeister
Oh, this is a pity.
I can't believe that we can't get access of the normals direction towards the camera... other shaders work with that too, or am I wrong?
There was a post a while ago where in a phong-material "<fresnel_scale>0.1</fresnel_scale>" was being used.
So I thought this has been implemented, but maybe not referred?
Hm.

Then, I need the glossy transparent material redone... it should have the option to work either with RGB colors or with textures; because only that enables real SSS for textured materials.
Like skin textures, for example.

Re: [ISL] Fresnel-Shader

Posted: Sat Nov 28, 2009 2:01 am
by fused
zeitmeister wrote:Then, I need the glossy transparent material redone... it should have the option to work either with RGB colors or with textures; because only that enables real SSS for textured materials.
Like skin textures, for example.
check out the absorption layer in cindigo 2.2.8 ;)

oh well... as soon as i get that mac build out!

Re: [ISL] Fresnel-Shader

Posted: Sat Nov 28, 2009 2:16 am
by zeitmeister
!!!

Re: [ISL] Fresnel-Shader

Posted: Sat Nov 28, 2009 9:30 pm
by fused
shaders based on normal direction may be possible very soon ;)

Re: [ISL] Fresnel-Shader

Posted: Sun Nov 29, 2009 12:45 am
by CTZn
Great !

This thread will revive then :)