Fisheye OSL lens

Forums: Fisheye OSL lens
Newtek Lightwave 3D (exporter developed by holocube, Integrated Plugin developed by juanjgon)

Re: Fisheye OSL lens

Postby addol95 » Fri Sep 14, 2018 8:31 am

addol95 Fri Sep 14, 2018 8:31 am
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!
addol95
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Mon Nov 23, 2015 9:46 pm

Re: Fisheye OSL lens

Postby baltort » Fri Sep 14, 2018 9:07 am

baltort Fri Sep 14, 2018 9:07 am
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 31 times
baltort
Licensed Customer
Licensed Customer
 
Posts: 52
Joined: Mon Jul 07, 2014 4:00 pm

Re: Fisheye OSL lens

Postby addol95 » Fri Sep 14, 2018 10:39 am

addol95 Fri Sep 14, 2018 10:39 am
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!
addol95
Licensed Customer
Licensed Customer
 
Posts: 5
Joined: Mon Nov 23, 2015 9:46 pm

Re: Fisheye OSL lens

Postby baltort » Fri Sep 14, 2018 12:57 pm

baltort Fri Sep 14, 2018 12:57 pm
That cheered me up no end. You're very welcome.

Shout if you need anything else.

Cheers,

James.
baltort
Licensed Customer
Licensed Customer
 
Posts: 52
Joined: Mon Jul 07, 2014 4:00 pm

Re: Fisheye OSL lens

Postby skycaier » Wed Oct 10, 2018 1:13 pm

skycaier Wed Oct 10, 2018 1:13 pm
Hi
If i don’t need the depth of focus ,could I turn off it?
skycaier
Licensed Customer
Licensed Customer
 
Posts: 3
Joined: Sun Jul 16, 2017 9:05 am

Re: Fisheye OSL lens

Postby baltort » Wed Oct 10, 2018 1:29 pm

baltort Wed Oct 10, 2018 1:29 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.
baltort
Licensed Customer
Licensed Customer
 
Posts: 52
Joined: Mon Jul 07, 2014 4:00 pm

Re: Fisheye OSL lens

Postby frankmci » Wed Oct 10, 2018 2:51 pm

frankmci Wed Oct 10, 2018 2:51 pm
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.
Technical Director - C4D, Maya, AE, - Washington DC
frankmci
Licensed Customer
Licensed Customer
 
Posts: 135
Joined: Fri May 26, 2017 2:00 pm

Re: Fisheye OSL lens

Postby skycaier » Thu Oct 11, 2018 11:06 am

skycaier Thu Oct 11, 2018 11:06 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
skycaier
Licensed Customer
Licensed Customer
 
Posts: 3
Joined: Sun Jul 16, 2017 9:05 am

Re: Fisheye OSL lens

Postby noisyboyuk » Sat Oct 20, 2018 9:50 pm

noisyboyuk Sat Oct 20, 2018 9:50 pm
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 :)
noisyboyuk
Licensed Customer
Licensed Customer
 
Posts: 76
Joined: Thu Apr 21, 2016 5:28 am
Previous

Return to Lightwave 3D


Who is online

Users browsing this forum: hkleton, LightwaveGuru and 3 guests

Sun Nov 18, 2018 12:49 pm [ UTC ]