Page 1 of 3

Tilt OSL lens

PostPosted: Fri Aug 31, 2018 10:23 am
by baltort
Hi all,

Here's another lens setup I've been working on. This one has a go at simulating a tilt lens.

It works by referencing a null (I've added a grid custom object to it to make it easier to see) which defines the plane of focus. You can position this and rotate it however you like. Add an item info node (for the null) in the Octane Editor and link the position, right, and up outputs to the OSL camera pins.

Aperture and FOV can be controlled with scalar nodes.

It's not entirely physically accurate, but it's not bad. Strange things happen when you turn the camera and see past the plane of focus...

Shout with any questions or requests. If anyone makes a nice fake-macro image with it, I'd love to see it!

Happy Scheimpflug!

Cheers, James.

tilt lens.jpg

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 6:50 am
by adkkda
Fabulous work baltort !
Love your OSL work and wish I had me some skills in that area.

Here's a quick one for you.

Al

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 10:52 am
by baltort
Wow! These look great, Al.

You’ve achieved that macro/micro look that real tilt lenses give. I think it might look good for medical renderings too. Tilt lenses make everything feel small.

Thanks for sharing.

James

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 12:41 pm
by LightwaveGuru
baltort wrote:If anyone makes a nice fake-macro image with it, I'd love to see it!


your wish is my command! :)

snip lwguru

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 1:26 pm
by LightwaveGuru
hi james,

i tweak the node tree a little bit...

works perfect here! :)

Image

snip lwguru

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 2:06 pm
by LightwaveGuru
here a quick testrender...

Image

snip lwugru

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 5:03 pm
by baltort
Hi LWGuru,

The complexity and defocused light panels are looking good, but I can’t quite make out a single plane of focus.

What are you using as the inputs for the focus point, focus up, and focus right pins? They need to be normalised, orthogonal and lie in the focus plane. You get this for free if you use the position, right, and up outputs from an item info node. If your using independent vector inputs then you’ll need to do a fair bit of maths to get a meaningful result.

Cheers,

James.

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 7:00 pm
by LightwaveGuru
baltort wrote:Hi LWGuru,

The complexity and defocused light panels are looking good, but I can’t quite make out a single plane of focus.

What are you using as the inputs for the focus point, focus up, and focus right pins? They need to be normalised, orthogonal and lie in the focus plane. You get this for free if you use the position, right, and up outputs from an item info node. If your using independent vector inputs then you’ll need to do a fair bit of maths to get a meaningful result.

Cheers,

James.


Hi James,

the 3 items for focus point, focus up, and focus right are item info nodes with the same null object as "target". i build that set up also to play with different nulls to create some effects.
btw. the ship is 1,6 kilometer big. so its possible that the node tree react in that case in a different way!? ah...and i use the world coordinates from the nulls. not the local input...is that right?

snip lwguru

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 7:12 pm
by LightwaveGuru
baltort wrote:Hi LWGuru,

The complexity and defocused light panels are looking good, but I can’t quite make out a single plane of focus.

What are you using as the inputs for the focus point, focus up, and focus right pins? They need to be normalised, orthogonal and lie in the focus plane. You get this for free if you use the position, right, and up outputs from an item info node. If your using independent vector inputs then you’ll need to do a fair bit of maths to get a meaningful result.

Cheers,

James.


by the way...if you save your scene and reopen it the node tree is not longer connected. you must then recompile the osl script and reconnect all the nodes.

snip lwguru

Re: Tilt OSL lens

PostPosted: Mon Sep 03, 2018 7:33 pm
by LightwaveGuru
Hi james,

so here an example with a "single plane". you can see the polygon in front of the ship. (the polygon target the camera. look to the camera.)

here the node tree.

Image

here the render output. the grey visible polygon is the target for focus point, focus up, and focus right.

Image

snip lwguru