depth of field with a background

Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderators: ChrisHekman, aoktar

Post Reply
bertritude
Licensed Customer
Posts: 143
Joined: Sun Aug 09, 2015 4:30 pm

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
User avatar
bepeg4d
Octane Guru
Posts: 10323
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

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 203 times
ciao Beppe
bertritude
Licensed Customer
Posts: 143
Joined: Sun Aug 09, 2015 4:30 pm

ok, many thanks, I'll try it ;)
xplorer
Licensed Customer
Posts: 15
Joined: Mon Aug 03, 2015 11:26 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 !
User avatar
bepeg4d
Octane Guru
Posts: 10323
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

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
Post Reply

Return to “Maxon Cinema 4D”