Alanw Posted July 29, 2008 Share Posted July 29, 2008 Hello, I'm sure this is probably a simple question, but I'm not very familiar with soho. I've recently purchased a license for Escape so I figured I would try and wrangle some custom RenderMan light shaders. For starters I'm not very good at Python yet, so I've decided to start small and work my way up. For now, I'm simply trying to add transmission() based shadows to the asad_light.sl shader. I've copied all the relative files from soho over to my $HOME directory and I've got a simple HDA based on the default Houdini Light attached to it via the light_wrangler. Everything is connecting, and I'm not getting any errors anymore. I also see transmission() based shadows when I render, so it is working in a sense. My only problem is adjusting parameters in the interface doesn't update my RIB output, and in some cases it "does" update but the values are just percentage of what they should be. My Python syntax is obviously wrong for adding these. I'll attach a snippet from my modified HoudiniLightRIB.py. Hopefully this helps, but if not let me know and I'll attach the whole file. Here are my parms as seen in the lshaderParms table 'min_samples' : SohoParm('min_samples', 'real', [-1], False), 'shadow_blur' : SohoParm('shadow_blur', 'real', [0], False), 'bias' : SohoParm('bias', 'real', [0.0001], False), 'do_shadows' : SohoParm('do_shadows', 'int', [1], False), 'beamdistribution' : SohoParm('beamdistribution', 'real', [2], False), 'shadowcolor' : SohoParm('shadowcolor', 'real', [0,0,0], False), And here's where I'm messin things up # my custom params shader += '%s [%g %g %g]' % \ ( _uc('shadowcolor'), shadowcolor[0], shadowcolor[1], shadowcolor[2]) if light_intensity: shader += '%s [%g]' % (_uf('intensity'), light_intensity) if min_samples == 0: shader += ' %s [0]' % _uf('minsamples') elif min_samples > 0: shader += '%s [%g]' % (_uf('minsamples'), min_samples) if shadow_blur > 0: shader += '%s [%g]' % (_uf('shadowBlur'), shadow_blur) if bias > 0: shader += '%s [%g]' % (_uf('bias'), bias) if do_shadows: shader += '%s [%g]' % (_uf('doShadows'), do_shadows) if beamdistribution > 0: shader += '%s [%g]' % (_uf('beamdistribution'), beamdistribution) # end custom params Also, I'm curious why the intensity parameter is not included in the asad_light.sl? I tried adding it as well, which is the parameter I'm getting a percentage of by adjusting it in the viewport. It appears to be taking the default + my values and using the sum. Thanks! Alan (hope that made some sense.. it's late ) Quote Link to comment Share on other sites More sharing options...
crunch Posted July 29, 2008 Share Posted July 29, 2008 ...I'll attach a snippet from my modified HoudiniLightRIB.py. Hopefully this helps, but if not let me know and I'll attach the whole file. Here are my parms as seen in the lshaderParms table 'min_samples' : SohoParm('min_samples', 'real', [-1], False), 'shadow_blur' : SohoParm('shadow_blur', 'real', [0], False), 'bias' : SohoParm('bias', 'real', [0.0001], False), 'do_shadows' : SohoParm('do_shadows', 'int', [1], False), 'beamdistribution' : SohoParm('beamdistribution', 'real', [2], False), 'shadowcolor' : SohoParm('shadowcolor', 'real', [0,0,0], False), So, I assume you changed the light OTL to have the parameters min_samples, shadow_blur, bias, do_shadows, beamdistribution? Cool. And here's where I'm messin things up # my custom params shader += '%s [%g %g %g]' % \ ( _uc('shadowcolor'), shadowcolor[0], shadowcolor[1], shadowcolor[2]) .... # end custom params Also, I'm curious why the intensity parameter is not included in the asad_light.sl? I tried adding it as well, which is the parameter I'm getting a percentage of by adjusting it in the viewport. It appears to be taking the default + my values and using the sum. I would really suggest generating a .rib file and checking to see what SOHO is generating for you. This would probably tell you a lot. Your code looks ok to me. But, I think it depends on how you modified the asad_light shader... P.S. I think the intensity parameter is folded into the light color. Just search for "light_intensity" in the wrangler (if I understood your question). Quote Link to comment Share on other sites More sharing options...
Alanw Posted July 29, 2008 Author Share Posted July 29, 2008 (edited) So, I assume you changed the light OTL to have the parameters min_samples, shadow_blur, bias, do_shadows, beamdistribution? After reading this and hearing back from support it seems this is the ticket. I put my custom parameters at the root level of my asset, but never added them to the light contained within. Seems like a silly mistake now that I think about it. Thanks for the help Alan Edited July 29, 2008 by Alanw Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.