Page 2 of 2
Re: Fisheye OSL lens
Posted: Fri Sep 14, 2018 8:31 am
by addol95
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!
Re: Fisheye OSL lens
Posted: Fri Sep 14, 2018 9:07 am
by baltort
Hi Addol95,
Good point! I only use square image sizes for fisheyes. Here's a new version that should fix the distortion.
Cheers,
James
Re: Fisheye OSL lens
Posted: Fri Sep 14, 2018 10:39 am
by addol95
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!
Re: Fisheye OSL lens
Posted: Fri Sep 14, 2018 12:57 pm
by baltort
That cheered me up no end. You're very welcome.
Shout if you need anything else.
Cheers,
James.
Re: Fisheye OSL lens
Posted: Wed Oct 10, 2018 1:13 pm
by skycaier
Hi
If i don’t need the depth of focus ,could I turn off it?
Re: Fisheye OSL lens
Posted: Wed Oct 10, 2018 1:29 pm
by baltort
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.
Re: Fisheye OSL lens
Posted: Wed Oct 10, 2018 2:51 pm
by frankmci
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.
Re: Fisheye OSL lens
Posted: Thu Oct 11, 2018 11:06 am
by skycaier
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
Re: Fisheye OSL lens
Posted: Sat Oct 20, 2018 9:50 pm
by noisyboyuk
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
