slo to otl problem

   3973   4   2
User Avatar
Member
31 posts
Joined: Nov. 2006
Offline
Hi i've found sl shader on Pixar's site, and i'm trying to convert it to otl:


surface
bake_areas( uniform string filename = “”, displaychannels = “” )
{
normal Nn = normalize(N);
float a, opacity;

a = area(P, “dicing”); // micropolygon area
opacity = 0.333333 * (Os + Os + Os); // average opacity
a *= opacity; // reduce area if non-opaque

if (a > 0)
bake3d(filename, displaychannels, P, Nn, “interpolate”, 1, “_area”, a);

Ci = Cs * Os;
Oi = Os;
}


but when i try to convert it to otl using slo2otl.py i have error:



Fatal Python error: Py_Initialize: can't initialize sys standard streams
File “CPROGRA~1/SIDEEF~1/HOUDIN~1.292/python\lib\encodings\__init__.py”, lin
e 120
raise CodecRegistryError,\
^
SyntaxError: invalid syntax

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

any ideas how can i import slo shaders in other way ?
User Avatar
Member
11 posts
Joined: Oct. 2007
Offline
may be your not typing a right command..

the command has to be like this
slo2otl.py -l name.otl name.slo

Cheers,
Junaid
Art imitates life
User Avatar
Member
73 posts
Joined: Feb. 2006
Offline
slo2otl.py takes .slo files as the input. This means the shader should already be compiled from the .sl source code.

Could you be trying to run slo2otl.py on an uncompiled shader?
- resist or serve -
User Avatar
Member
11 posts
Joined: Oct. 2007
Offline
slo2otl.py command doesn't compile shader, otl is just a wrapper for slo to use in Houdini.
Art imitates life
User Avatar
Member
73 posts
Joined: Feb. 2006
Offline
junaidcg
slo2otl.py command doesn't compile shader, otl is just a wrapper for slo to use in Houdini.

That's what I was getting at. I suspect bareya is trying to run slo2otl.py on shader code that has not yet been compiled.
- resist or serve -
  • Quick Links