jonp Posted March 3, 2010 Share Posted March 3, 2010 Hi, Here's a few connected questions about lights: 1) I can't find any comprehensive examples on using the light template object. Any pointers? 2) I'm trying to set up a point light to generate a shadow map using polar projection. I'm using a light template object. I've added v_rayshadow and v_pointlight shops to my light node, and copied the shadow parameters over from a hlight node to get started. But when I test render, instead of rendering the shadow map to disk, it gets rendered in mplay, and then v_rayshadow complains that it can't find the shadow file. Why does hlight behave properly and render shadow maps straight to disk, and my light template doesn't? 3) is there a built-in way to get a point light with shadow-mapped shadows in all directions? Cheers, Jon Quote Link to comment Share on other sites More sharing options...
symek Posted March 3, 2010 Share Posted March 3, 2010 (edited) Hi, Here's a few connected questions about lights: 1) I can't find any comprehensive examples on using the light template object. Any pointers? I think they don't exist. Light template is an empty light, without any mantra properties on it. AFAIK it's also not processed by light wranglers scripts like in case of hlights objects. This means that standard mantra rendering properties mechanism is taking place here. ... But when I test render, instead of rendering the shadow map to disk, it gets rendered in mplay, and then v_rayshadow complains that it can't find the shadow file. Why does hlight behave properly and render shadow maps straight to disk, and my light template doesn't? Apparently you need to install another parameter which is "vm_picture". 3) is there a built-in way to get a point light with shadow-mapped shadows in all directions? Unfortunately not. It's a shame. This feature should be present in an application relying so heavily on deep shadow maps. It can be done though, but requires some hackery in soho module (trivial but inelegant) and of course custom shadow shader. Edited March 3, 2010 by SYmek Quote Link to comment Share on other sites More sharing options...
jonp Posted March 4, 2010 Author Share Posted March 4, 2010 I think they don't exist. Light template is an empty light, without any mantra properties on it. AFAIK it's also not processed by light wranglers scripts like in case of hlights objects. This means that standard mantra rendering properties mechanism is taking place here. Thanks for that tip, it saves me the trouble of considering modifying HoudiniLightIFD.py to recognize polar projection in a light. Apparently you need to install another parameter which is "vm_picture". 'vm_picture' isn't on the standard hlight so I hadn't thought to use it. Does it need to be left blank? Unfortunately not. It's a shame. This feature should be present in an application relying so heavily on deep shadow maps. It can be done though, but requires some hackery in soho module (trivial but inelegant) and of course custom shadow shader. Agreed. In maya I six separate shadow maps are generated, for each direction. I've tried this with six spot lights but could never eliminate an extremely fine seam between the shadow map projections. Quote Link to comment Share on other sites More sharing options...
symek Posted March 4, 2010 Share Posted March 4, 2010 'vm_picture' isn't on the standard hlight so I hadn't thought to use it. Does it need to be left blank? vm_picture should point to a shadow map file. Agreed. In maya I six separate shadow maps are generated, for each direction. I've tried this with six spot lights but could never eliminate an extremely fine seam between the shadow map projections. It's fixable assuming shadowmaps are executed in a single shadow shader, what allows interpolating of boundaries. Quote Link to comment Share on other sites More sharing options...
jonp Posted March 4, 2010 Author Share Posted March 4, 2010 It's fixable assuming shadowmaps are executed in a single shadow shader, what allows interpolating of boundaries. How would you render six different shadow maps from one light? Wouldn't you need six different objects for this? Quote Link to comment Share on other sites More sharing options...
symek Posted March 4, 2010 Share Posted March 4, 2010 (edited) How would you render six different shadow maps from one light? Wouldn't you need six different objects for this? You can force soho to generate six lights just for a shadowmap generation process from a single light in a scene. So you have a single light in a scene, but you end up with six lights for shadow map generation inside ifd file, then final picture is again rendered with a single light. Edited March 4, 2010 by SYmek Quote Link to comment Share on other sites More sharing options...
jonp Posted March 4, 2010 Author Share Posted March 4, 2010 Thanks! I finally got my hack to work (spherical projection shadows), if I have more time I'm definitely going to try creating a six-shadow point light. Your info was a huge help... more informative than everything else I've read combined. Quote Link to comment Share on other sites More sharing options...
symek Posted March 4, 2010 Share Posted March 4, 2010 I'm glad I could help. I would be able to post changes made in soho for this, but first I need to strip off all other stuff in our soho, which wouldn't work outside studio anyway. The same goes for a shader. I think SESI should implement it one day. I would love to have shadowmap() call reading single cubic map, the same as it is with environmental maps now (single file with six planes inside). This is how 3delight does it, and it works great. Quote Link to comment Share on other sites More sharing options...
jonp Posted March 12, 2010 Author Share Posted March 12, 2010 Since my light seems to be doing what I expect now I'd like to make it a bit more user-friendly. While trying to make it behave more like a standard light, I noticed that Houdini seems to auto-recognize some parameters and not others. For instance, "ogl_enablelight" and "light_color" show in the viewport when I add them, but "light_intensity" and "light_enable" do not. Is there a way to make these work outside of Soho? 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.