Lens shader not working when render to File/Mplay

   431   4   2
User Avatar
Member
104 posts
Joined: 2月 2015
オフライン
Hello, I have an issue with a relatively simple scene in solaris.
I have build a lens shader in cvex ( cylindrical lens ) that works perfectly in Solaris viewport (Karma CPU)
but fails when I try to render to mplay or to disk ( using a classical "Karma CPU setup" in solaris )
I can see lens shader related info in the usd at "Render/rendersetting" , everything seems alright to me.
  • karma:camera:lensshader -> op:/obj/....
  • karma:camera:uselensshader -> True

But it renders as if uselensshader was set to false.
Is this a bug ? or Am I missing something ?

I use
Houdini FX Version 21.0.508
On Windows 11

Looking at the log Viewer, I see errors :

Error loading lens shader: Unable to load shader 'op:/obj/cylindrical_lens_test/LENS_SHADER/gui2one_cylindrical_lens1'
Command Exit Code: 1

Error loading lens shader: Unable to load shader 'op:/obj/cylindrical_lens_test/LENS_SHADER/gui2one_cylindrical_lens1'
Error - lens shader must have P and I as outputs: Unable to load shader 'op:/obj/cylindrical_lens_test/LENS_SHADER/gui2one_cylindrical_lens1'

But my cvex network correctly outputs P and I vectors
Edited by gui2one - 2025年11月20日 15:01:55
https://vimeo.com/user43710534 [vimeo.com]
User Avatar
Member
8177 posts
Joined: 9月 2011
オフライン
gui2one
Error loading lens shader: Unable to load shader 'op:/obj/cylindrical_lens_test/LENS_SHADER/gui2one_cylindrical_lens1'
Command Exit Code: 1

Unfortunately, offline karma renders cannot use lens shaders defined by nodes, only those defined by HDAs, as they can be read from disk.
User Avatar
Member
104 posts
Joined: 2月 2015
オフライン
jsmack
gui2one
Error loading lens shader: Unable to load shader 'op:/obj/cylindrical_lens_test/LENS_SHADER/gui2one_cylindrical_lens1'
Command Exit Code: 1

Unfortunately, offline karma renders cannot use lens shaders defined by nodes, only those defined by HDAs, as they can be read from disk.

Hi, but my lens shader IS defined in a hda.the lens shader itself is a cvex VOP network though.
Is that the issue ? Should I write it in cVex instead ?
Or maybe my hda is not accessible to Karma somehow ?

... a little later ...
Oh I see, it's the "op:/obj/..." thingy that is the issue, right ? So Karma cannot load my HDA.
But that's not me referecing the shader using op:/obj/..., I set the property 'lens_shader_vop' on the camera I use by giving a relative path to my hda : "../LENS_SHADER/gui2one_cylindrical_lens1".
Edited by gui2one - 2025年11月24日 06:27:07
https://vimeo.com/user43710534 [vimeo.com]
User Avatar
Member
285 posts
Joined: 2月 2016
オフライン
I assume you've read the karma lens docs? https://www.sidefx.com/docs/houdini/solaris/support/karma_lens_shader.html [www.sidefx.com]
There are some sample files that make use of custom lens shaders, they might shed some light on how to get it to render to disk.
I feel like it was working when I was playing around with a custom lens shader in h20.5

edit: Here is the one that I built, also using vop nodes https://www.sidefx.com/forum/topic/94084/?page=1#post-424757 [www.sidefx.com]
Edited by AslakKS - 2025年11月24日 06:41:18
User Avatar
Member
104 posts
Joined: 2月 2015
オフライン
Thank you so much for the tip. No, I hadn't fully read the docs.

And I didn't check "Save cached code" in my HDA properties.
It works perfectly now.
https://vimeo.com/user43710534 [vimeo.com]
  • Quick Links