Fisheye OSL lens

Newtek Lightwave 3D (exporter developed by holocube, Integrated Plugin developed by juanjgon)

Moderator: juanjgon

addol95
Licensed Customer
Posts: 11
Joined: Mon Nov 23, 2015 9:46 pm

baltort wrote:Hi,

That's straight forward enough... Here's an updated camera with a pin for cropping. It defaults to not cropped, but you can make it crop by attaching an integer of value 1 to this input.

I've set it up so that we reach full field of view at the mid points of the edge of frame. This means the bits that are now no longer cropped are wider than the FOV of the camera. In short, it's quite likely that the corners of the image will show points behind the camera...

I've also tidied up the DOF calculations, so it's worth switching to v2 of the camera even if people don't want the crop/uncrop functionality.

Let me know how you get on.

Cheers,

James.
fantastic!

the only thing i've now noticed (after setting my render to 16:9), is that the image stretches based on the aspect ratio. (meaning that square objects aren't square anymore)
is there any way around this, or is it simply a limitation of doing this in OSL?

thanks again!
baltort
Licensed Customer
Posts: 72
Joined: Mon Jul 07, 2014 4:00 pm

Hi Addol95,

Good point! I only use square image sizes for fisheyes. Here's a new version that should fix the distortion.

Cheers,

James
Attachments
fisheyeCamDOF v3.zip
(757 Bytes) Downloaded 313 times
addol95
Licensed Customer
Posts: 11
Joined: Mon Nov 23, 2015 9:46 pm

baltort wrote:Hi Addol95,

Good point! I only use square image sizes for fisheyes. Here's a new version that should fix the distortion.

Cheers,

James
Do you know what you are?

you are fantastic.

thank you very much!
baltort
Licensed Customer
Posts: 72
Joined: Mon Jul 07, 2014 4:00 pm

That cheered me up no end. You're very welcome.

Shout if you need anything else.

Cheers,

James.
skycaier
Licensed Customer
Posts: 3
Joined: Sun Jul 16, 2017 9:05 am

Hi
If i don’t need the depth of focus ,could I turn off it?
baltort
Licensed Customer
Posts: 72
Joined: Mon Jul 07, 2014 4:00 pm

Hi Skycaler,

No problem. Just set the aperture to 0. You'll need to plug a scalar node into the aperture pin to do so.

Cheers,

James.
frankmci
Licensed Customer
Posts: 917
Joined: Fri May 26, 2017 2:00 pm
Location: Washington DC

baltort wrote:Hi Skycaler,

No problem. Just set the aperture to 0. You'll need to plug a scalar node into the aperture pin to do so.

Cheers,

James.
Or you can just set float aperture = 0 in the OSL code editor.

Octane nodes multiply like rabbits in May, so if you don't intend to tweak the attribute, it's easy enough to just set it in the code and forget it.
Animation Technical Director - Washington DC
skycaier
Licensed Customer
Posts: 3
Joined: Sun Jul 16, 2017 9:05 am

baltort wrote:Hi Skycaler,

No problem. Just set the aperture to 0. You'll need to plug a scalar node into the aperture pin to do so.

Cheers,

James.
Great! Thank you
noisyboyuk
Licensed Customer
Posts: 103
Joined: Thu Apr 21, 2016 5:28 am

baltort wrote:
noisyboyuk wrote:Hey man!

This is awesome! Do you know if there is an anamorphic lens OSL script anywhere or whether this could be adapted as such?

Cheers :)
Anamorphic lenses... Interesting. I think you could create this effect in native lightwave just by changing the aspect parameter on the camera, but this appears to be ignored by Octane.

What's the appeal of anamorphic lenses? I think the main visual effect is that a wide image is squeezed onto a narrower negative. When this is then stretched back out during projection any optical effects that happen within the lens are stretched too; bokeh and lens flairs become stretched horizontally. I think this is conceptually the same as having an elliptical aperture in the camera. Is that what you're trying to create? Fairly straight forward in OSL.

Cheers,

James.
Hi dude!

Thanks for your response :) The appeal of Anamorphic lenses their look I suppose. Bokeh is easy enough in most render engines, in fact Octane does this better than most out the box as it's really easy to change the rapture aspect ratio per camera (as opposed to the whole scene file).

The thing I was really hoping for though was the distortion. that comes with an anamorphic lens. That's a big part of what gives anamorphic footage that lovely cinematic feel (in addition to many other parameters) which is why I thought this great fisheye script could be adapted to do just that.

Most of the time you would just apply distortion to your CG before compositing back into a plate but that's always going to be a destructive process. as it's stretching pixels.

I think ultimately I just wonder how far one might be able to take a CG anamorphic lens with OSL. Being able to capture not only the bokeh but also the aperture diffraction and lens distortion (and for extra points, the way that distortion is applied in 3D, not just stretching a 2D image) I would thing could might make for a really pleasant camera set up for CG. It's crazy how much of an impact all those tiny imperceptible subtitles can have when summed together :)
Post Reply

Return to “Lightwave 3D”