HI Chaps
Anyone out there written any lens distortion shaders for Houdini i could steal - i ask as i don't have the skills for such a ting.
In particular a lens shader which copies the anamorphic and/or classic lens model from 3DEqualizer 4.
Muchas Gracias!
Houdini Lens shader
20244 12 5- Neil78
- Member
- 275 posts
- Joined: 7月 2010
- Offline
- Stalkerx777
- Member
- 183 posts
- Joined: 11月 2008
- Offline
- kursad
- Member
- 88 posts
- Joined: 3月 2010
- Offline
- xtimmyx
- Member
- 166 posts
- Joined: 10月 2008
- Offline
It might not be exactly what you're looking for but if you click on the little gear in the top right corner of the camera parameters and select “Edit rendering parameters”. You should then be able to add the “Lens curvature” to your camera. It's fairly simple but might get you somewhere along the way.
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
I don't know about the anamorphic option in 3DE…
If it is a straight anamorphic and assuming that any lens aberrations have been removed (when processing the incoming plates), have you tried the default Camera Object's Pixel Aspect Ratio parameter?
http://www.widescreen.org/aspect_ratios.shtml [widescreen.org]
—-
As was mentioned before, you can render with the Mantra lens curvature property or set the camera Projection parameter to cylinder (panoramic) or polar (panoramic) to render non-ortho projections and is only supported by the raytrace or pbr Mantra render engines.
—-
As far as rendering lens aberrations, you could use an Atmosphere fog Object in your scene that is assigned a fog shader to distort the field of view of the camera. This is only supported with raytracing and with larger deviations you will have to fire more rays as your coverage will vary in the scene.
The Atmosphere Object with the Fog Shader is applied last, after the displacement and surface shaders are run. This is why it isn't ideal to render lens aberration as it can lead to too much noise.
—-
Another approach uses a physically based approach where you actually model a real glass lens out of geometry and parent this to the camera and fire rays through the lens. This means you will be relying on the index of refraction of your lens which is present on the Mantra Surface and the Glass materials. By changing the index of refraction on the shader, you can alter the amount of distortion.
Lots of fun but I don't know if this is something to rely on in production. I say this because you are spreading rays to cover a much larger area of the scene and you would need to fire more rays to reduce noise.
If it is a straight anamorphic and assuming that any lens aberrations have been removed (when processing the incoming plates), have you tried the default Camera Object's Pixel Aspect Ratio parameter?
http://www.widescreen.org/aspect_ratios.shtml [widescreen.org]
—-
As was mentioned before, you can render with the Mantra lens curvature property or set the camera Projection parameter to cylinder (panoramic) or polar (panoramic) to render non-ortho projections and is only supported by the raytrace or pbr Mantra render engines.
—-
As far as rendering lens aberrations, you could use an Atmosphere fog Object in your scene that is assigned a fog shader to distort the field of view of the camera. This is only supported with raytracing and with larger deviations you will have to fire more rays as your coverage will vary in the scene.
The Atmosphere Object with the Fog Shader is applied last, after the displacement and surface shaders are run. This is why it isn't ideal to render lens aberration as it can lead to too much noise.
—-
Another approach uses a physically based approach where you actually model a real glass lens out of geometry and parent this to the camera and fire rays through the lens. This means you will be relying on the index of refraction of your lens which is present on the Mantra Surface and the Glass materials. By changing the index of refraction on the shader, you can alter the amount of distortion.
Lots of fun but I don't know if this is something to rely on in production. I say this because you are spreading rays to cover a much larger area of the scene and you would need to fire more rays to reduce noise.
There's at least one school like the old school!
- old_school
- スタッフ
- 2540 posts
- Joined: 7月 2005
- Offline
- kursad
- Member
- 88 posts
- Joined: 3月 2010
- Offline
jeff
If you do want to play with the physical model lens approach, model it out of NURBs surfaces and not polys for obvious reasons.
Jeff, thanks for the tips. At least it is good to know that certain things are possible.
However certain kinds ofprojection spaces might not be possible with the camera tricks. Is it possible write camera lens shaders with the HDK?
k
- schnelli
- Member
- 14 posts
- Joined: 8月 2009
- Offline
Hi,
now, there is 3DEqualizer lens shader and a COP node available at orbolt store:
camera lens shader:
https://www.orbolt.com/asset/Keller::LDPKLenses::2.2 [orbolt.com]
COP distortion:
https://www.orbolt.com/asset/Keller::LDPKLensesCOP::2.2 [orbolt.com]
The assets can load 3DEqualizer lens models.
cheers,
christian
now, there is 3DEqualizer lens shader and a COP node available at orbolt store:
camera lens shader:
https://www.orbolt.com/asset/Keller::LDPKLenses::2.2 [orbolt.com]
COP distortion:
https://www.orbolt.com/asset/Keller::LDPKLensesCOP::2.2 [orbolt.com]
The assets can load 3DEqualizer lens models.
cheers,
christian
- grayOlorin
- Member
- 1799 posts
- Joined: 10月 2010
- Offline
- Neil78
- Member
- 275 posts
- Joined: 7月 2010
- Offline
schnelli
Hi,
now, there is 3DEqualizer lens shader and a COP node available at orbolt store:
camera lens shader:
https://www.orbolt.com/asset/Keller::LDPKLenses::2.2 [orbolt.com]
COP distortion:
https://www.orbolt.com/asset/Keller::LDPKLensesCOP::2.2 [orbolt.com]
The assets can load 3DEqualizer lens models.
cheers,
christian
Awesome - i been away for a while; sorry for late reponse - this is great - thankyou !
- schnelli
- Member
- 14 posts
- Joined: 8月 2009
- Offline
Hi,
the orbolt otl's did not work properly, because the assets need to modify the vex content dynamically, but orbolt uses locked assets for licensing. That's why the demo version didn't work.
If anyone is still interested, the latest version of our houLDPK shaderset can now be found and purchased directly via our webpage:
http://www.keller.io/software/ [keller.io]
best,
christian
the orbolt otl's did not work properly, because the assets need to modify the vex content dynamically, but orbolt uses locked assets for licensing. That's why the demo version didn't work.
If anyone is still interested, the latest version of our houLDPK shaderset can now be found and purchased directly via our webpage:
http://www.keller.io/software/ [keller.io]
best,
christian
- jomaro
- Member
- 102 posts
- Joined: 4月 2017
- Offline
- jparker
- Member
- 316 posts
- Joined:
- Offline
Look at Houdini's own lens shader as an example:
https://www.sidefx.com/docs/houdini/nodes/vop/physicallens.html [www.sidefx.com]
There are tips in the docs on making sure your lens shader is backwards compatible with Mantra:
https://www.sidefx.com/docs/houdini/solaris/karma_lens_shader.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/nodes/vop/physicallens.html [www.sidefx.com]
There are tips in the docs on making sure your lens shader is backwards compatible with Mantra:
https://www.sidefx.com/docs/houdini/solaris/karma_lens_shader.html [www.sidefx.com]
-
- Quick Links