depth of field with a background

Forums: depth of field with a background
Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderator: aoktar

depth of field with a background

Postby bertritude » Sat May 12, 2018 8:45 am

bertritude Sat May 12, 2018 8:45 am
Hi guys, I use a simple background and put an object with shadows on a plane to incrust this object in the original picture.
How can I have a depth of field applied on the background if I focus on my object ?
It seems impossible with a background object.
Thanks
bertritude
Licensed Customer
Licensed Customer
 
Posts: 143
Joined: Sun Aug 09, 2015 4:30 pm

Re: depth of field with a background

Postby bepeg4d » Mon May 14, 2018 8:37 am

bepeg4d Mon May 14, 2018 8:37 am
Hi bertritude.
till 3.07-R2, you need to use this XPresso and a Visible Environment node:
viewtopic.php?f=87&t=63808
from 3.08, you can use the Calus's OSL script insted in the Projection node of the ImageTexture used in the Visible Environment node:
Screen Shot 2018-05-14 at 10.32.53.jpg

cameraEnvProjOSL.zip
(500.95 KiB) Downloaded 173 times

ciao Beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9951
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: depth of field with a background

Postby bertritude » Wed May 16, 2018 5:44 am

bertritude Wed May 16, 2018 5:44 am
ok, many thanks, I'll try it ;)
bertritude
Licensed Customer
Licensed Customer
 
Posts: 143
Joined: Sun Aug 09, 2015 4:30 pm

Re: depth of field with a background

Postby xplorer » Tue Dec 07, 2021 9:02 pm

xplorer Tue Dec 07, 2021 9:02 pm
bepeg4d wrote:Hi bertritude.
till 3.07-R2, you need to use this XPresso and a Visible Environment node:
viewtopic.php?f=87&t=63808
from 3.08, you can use the Calus's OSL script insted in the Projection node of the ImageTexture used in the Visible Environment node:
Screen Shot 2018-05-14 at 10.32.53.jpg

cameraEnvProjOSL.zip

ciao Beppe


Hello Beppe ! :)

This is a great feature, and i was looking for ways to do this the whole day until i found this topic.

The only thing i'd like to add is that to be accurate with the dof values and results, it would be fantastic if some lines of code into the OSL, or some box to enter some value somewhere, could let us adjust the virtual distance of the backplate from the camera ( without changing its aspect ratio ) .... Because the subject pictured inside of the backplate isn't necessarily the same as the infinite distance used for this "environment texture" object.

>> this is important, to have an accurate dof result, a more or less correct distance from the subject to the camera used, and in relation to the objects in the scene. Then, the bokeh result would be adjustable with a lot more accuracy.

How could we do that please ? Thank you !
xplorer
Licensed Customer
Licensed Customer
 
Posts: 15
Joined: Mon Aug 03, 2015 11:26 pm

Re: depth of field with a background

Postby bepeg4d » Wed Dec 08, 2021 7:42 am

bepeg4d Wed Dec 08, 2021 7:42 am
Hi,
nice to hear you find this useful :)

But, from what you have written, since both solutions are using the Environment node, you should need something different, like a plane parented and facing to the camera, that scales on X and Y, while moved on Z, to be used as backplate at the desired distance :roll:

ciao,
Beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9951
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Return to Maxon Cinema 4D


Who is online

Users browsing this forum: Bing [Bot] and 10 guests

Tue Apr 16, 2024 4:48 pm [ UTC ]