circusmonkey
Jan. 22, 2008 07:01:55
As per the help “Transitioning between VEX and RSL” there is one page listing 12 mapping values. Is it a case of the simple RSL listed below will render as a mantra shader after its been compiled ?. I suspect of course not . So where can I find out the differences between RSL and the vex for writing shaders ?
ie
surface
constant_test(float Kfb = 1 /* fake brightness */)
{
color surfcolor = 1;
Oi = Os;
Ci = Oi * Cs * surfcolor * Kfb;
}
r
Alanw
Jan. 22, 2008 11:27:39
You can check the Globals in VOPs for the basic Globals, but some don't match up like “Pz” and “dPdz” are not present in RSL. In order to get “Pz” in RSL you can do this.
point myPz = depth(P);
pPdz fries my brain, so I'll let somebody else tackle that one.
The code below just needs a few Global changes, and the way you assign variables has to be changed.
ex:
surface
constant_test(float Kd = 1;
vector opac = 1)
{
vector Cd = 1;
Of = opac;
Cf = Cd * Kd;
}
I'm learning RSL myself so I could be wrong, but I think checking VOPS and reading the shader code in SHOP nodes helps on the transition.
circusmonkey
Jan. 22, 2008 18:05:54
Hey Alan thanks for the reply.I found this in the latest online help
http://www.sidefx.com/docs/houdini9.1/vex/contexts/shading_contexts [
sidefx.com] , it should be of some use. If you fancy sharing info let me know
R
circusmonkey
Jan. 25, 2008 18:52:54
Well I dont seem to be having much luck with houdini.A simple constant shader works fine in the scene but when I try and re open the scene I get errors.
What is the workflow for creating scripted shaders ?