  | | | shader wizard question on .mi file to spdl | shader wizard question on .mi file to spdl 2005-03-21 - By Rob Wuijster
Back Hi, Is seems to be one of those days -again-. Trying to "convert" the cubical lens shader with a Maya .mi file into XSI's SPDL. The shader wizard seems to do a good job except one of the GUID's is shot and gives -offcourse- a parsing error in the spdlcheck utility. So I created one for myself and that seems to do the trick when checking the spdl file. At least no erros are genereated. But installing this into XSI gives me an error, and in the logfile a spdlcheck is adviced for errors. But the check goes fine, so I'm missing something here and it's still early.....?? -- ---- ---- ---- ---- ---- ---- ---- ---- -- Here's the original .mi code: # MI declarations for latlong_lens Mental Ray shader # by Ralf Habel (ralf.habel@(protected)) declare shader color "cubemap_lens" ( integer "lensMode" #: softmin 0 softmax 5 default 0 ) version 1 apply lens scanline off trace on #: nodeid 58676 end declare -- ---- ---- ---- ---- ---- ---- ---- ---- ----- Looks easy enough.. And here's the spdl generated from the shader wizard (from within Firefox, IE doesn't even want to run): -- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- SPDL Version = "2.0.0.0";
Reference = "{D18D6A3B-BA9C-4EF3-91BD-147AE70F6769}"; NOTE: this GUID was shot with an : character in the last set of characters PropertySet "cubemap_lens_params" { Parameter "out" output { title = "cubemap_lens output parameter"; guid = "{4C6879FF-7EC8-11D0-8E3B-00A0C90640EC}"; type = color; flags = 0; } Parameter "cubemap_lens" input { title = "cubemap_lens input parameter"; guid = "{D18D6A3B-BA9C-4EF3-91BD-147AE70F6769}"; NOTE: this GUID was shot with an : character in the last set of characters type = integer; flags = 0; texturable = off; value = 0; value minimum = 0; value maximum = 5; persistable = on; inspectable = on; } } phenomenon "cubemap_lens_declare" { Name = "cubemap_lens"; Version = 1; Use = lens; Trace = on; Scanline = on; shadow = on; face = both; } BEGIN "{24810490-56FF-11d2-BF23-00A0C982CE5D}" Defaults { cubemap_lens { Name = "cubemap_lens"; Description = ""; } } Layout "Default" { cubemap_lens; NOTE: name of .dll file } Logic { } END -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- Code looks fine to me, but XSI doesn't really likes it. Anyone on this, I was so confident I could do this after some previous fiddling with shaders and spdls..... ;) cheers, rob wuijster s-5 multimedia holland
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>Hi,</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>Is seems to be one of those days -again-. Trying to "convert" the cubical lens shader with a Maya .mi file into XSI's SPDL.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>The shader wizard seems to do a good job except one of the GUID's is shot and gives -offcourse- a parsing error in the spdlcheck utility.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>So I created one for myself and that seems to do the trick when checking the spdl file. At least no erros are genereated.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>But installing this into XSI gives me an error, and in the logfile a spdlcheck is adviced for errors. But the check goes fine, so I'm missing something here and it's still early.....??</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>-- ---- ---- ---- ---- ---- ---- ---- ---- --</SPAN>< /FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>Here's the original .mi code:</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005># MI declarations for latlong_lens Mental Ray shader<BR># by Ralf Habel (<A href="mailto:ralf.habel@(protected)">ralf.habel@(protected)</A>)</SPAN></FONT ></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>declare shader<BR> color "cubemap_lens" (<BR> integer "lensMode" #: softmin 0 softmax 5 default 0<BR> )<BR> version 1<BR> apply lens<BR> scanline off<BR> trace on<BR> #: nodeid 58676<BR>end declare</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>-- ---- ---- ---- ---- ---- ---- ---- ---- -----</SPAN ></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>Looks easy enough..</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>And here's the spdl generated from the shader wizard (from within Firefox, IE doesn't even want to run):</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---< /SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>SPDL<BR>Version = "2.0.0.0";<BR></SPAN></FONT><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>Reference = "{D18D6A3B-BA9C-4EF3-91BD-147AE70F6769}"; NOTE: this GUID was shot with an : character in the last set of characters<BR>PropertySet "cubemap_lens_params"<BR>{<BR> Parameter "out" output<BR> {<BR> title = "cubemap_lens output parameter";<BR> guid = "{4C6879FF-7EC8-11D0-8E3B-00A0C90640EC}";<BR> type = color;<BR> flags = 0;<BR> }<BR> Parameter "cubemap_lens" input<BR> {<BR> title = "cubemap_lens input parameter";<BR> guid = "{D18D6A3B-BA9C-4EF3-91BD-147AE70F6769}"; NOTE: this GUID was shot with an : character in the last set of characters<BR> type = integer;<BR> flags = 0;<BR> texturable = off;<BR> value = 0;<BR> value minimum = 0;<BR> value maximum = 5;<BR> persistable = on;<BR> inspectable = on;<BR> }<BR>}<BR>phenomenon "cubemap_lens_declare"<BR>{<BR> Name = "cubemap_lens";<BR> Version = 1;<BR> Use = lens;<BR> Trace = on;<BR> Scanline = on;<BR> shadow = on;<BR> face = both;<BR>}<BR>BEGIN "{24810490-56FF-11d2-BF23-00A0C982CE5D}"<BR>Defaults<BR>{<BR> cubemap_lens <BR> {<BR> Name = "cubemap_lens";<BR> Description = "";<BR> }<BR>}<BR>Layout "Default"<BR>{<BR> cubemap_lens; NOTE: name of .dll file<BR>}<BR>Logic<BR>{<BR>}<BR>END</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ -- ---- ---- ---</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>Code looks fine to me, but XSI doesn't really likes it.</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>Anyone on this, I was so confident I could do this after some previous fiddling with shaders and spdls..... ;)</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>cheers,</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>rob wuijster</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>s-5 multimedia</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=918074410-21032005>holland</SPAN></FONT></DIV></BODY></HTML>
|
|
 |