Houdini Lens shader

User Avatar
Member
184 posts
Joined: July 2010
Offline
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!
www.neilscholes.com
 Report
#1
User Avatar
Member
163 posts
Joined: Nov. 2008
Offline
There is no way to apply lens shaders in mantra atm. Maybe it's possible to create a custom camera in HDK, but not lens shaders for now…
Alexey Rusev(Sadrutdinov)
Houdini TD/Pipeline TD @ CGFactory
 Report
#2
User Avatar
Member
88 posts
Joined: March 2010
Offline
bump,

Is there any update on this in v12? I am interested in writing some camera shader stuff as well.

thanks
 Report
#3
User Avatar
Member
164 posts
Joined: Oct. 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.
 Report
#4
User Avatar
Staff
2423 posts
Joined: July 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.
There's at least one school like the old school!
 Report
#5
User Avatar
Staff
2423 posts
Joined: July 2005
Offline
If you do want to play with the physical model lens approach, model it out of NURBs surfaces and not polys for obvious reasons.
There's at least one school like the old school!
 Report
#6
User Avatar
Member
88 posts
Joined: March 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
 Report
#7
User Avatar
Member
13 posts
Joined: Aug. 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
 Report
#8
User Avatar
Member
1514 posts
Joined: Oct. 2010
Offline
Someone talked about using lens shader to do render to uv with pbr. Have not tried that yet bit would be the coolest lens shader ever
-G
 Report
#9
User Avatar
Member
184 posts
Joined: July 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 !
www.neilscholes.com
 Report
#10
User Avatar
Member
13 posts
Joined: Aug. 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
 Report
#11
  • Quick Links