Hi,
starting from this discussion, and from this other Lua script by roeland, I have prepared an Xpresso setup for automatically adapting an image assigned to a Visible Environment node to be displayed like a Background image.
Let’s take this example scene:
If the Background c4d node is used, it is necessary to enable the Alpha channel option in the Kernel settings, but the Background image is not taken into consideration in reflections and refractions:
With the VisibleBackground Xpresso setup, you need to assign a reference camera, and the image to be displayed as RGB Image texture node. In this way, the projection and uv transform node of the image will be adapted to perfectly feat to the frame buffer, taking count of the camera FOV and Shift value:
It is possible to enable/disable backplate, reflection, refractions:
And change the border mode, in order to have different reflections/refractions based on the color repeted in all directions in the Visible Environment node:
Merge this .c4d file in your scene:
At the following link you can find the corresponding Lua scripted graph version for Standalone:
viewtopic.php?f=73&t=63807
Happy Rendering,
ciao beppe
*it is necessary to correct the aspect ratio in Render Settings, to match the aspect ratio of the background image. If the "Synchronization on geo. update" option is disabled in Settings/Other, it is necessary to press the "Refresh Live View" button, to see the changes applied in LV.
p.s. thanks to Luca-GIOLET for supporting and example scenes.