Cloner instances with transparency based on camera distance

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

Moderators: ChrisHekman, aoktar

Post Reply
xcaseyx
Licensed Customer
Posts: 115
Joined: Wed Feb 18, 2015 9:04 pm

Hello,

Im hoping there may be a render time solution that octane may have that Im not seeing.

Is it possible with an octane shader to adjust the opacity/transparency of an object base on its distance to another object?

example:

Camera as object A
Cubve as object B

When the camera gets close to object B its becomes completely transparent, when it moves away its completely opaque.

I can do this is cinemas native render engine in about a dozen different ways, but I can't seem to get a good SMOOTH methodology solved for octane.


One thing that does work, although its terribly awkward, is to make the cloner editable and use an xpresso script to change the display tag, visibility %.
xcaseyx
Licensed Customer
Posts: 115
Joined: Wed Feb 18, 2015 9:04 pm

figured it out,

mograph color in the opacity channel, use a shader effector with a box/sphere falloff as a child of the camera.
milanm
Licensed Customer
Posts: 261
Joined: Tue Apr 30, 2013 7:23 pm

Hi, Casey! Big fan of your work ;)

Sorry I've been extremely busy these days so I couldn't post earlier.. :(

I got this working with render instances using Octane gradient with Perspective projection linked to camera.
Theoretically it should work with scatter, xp or any other Octane instances regardless of mograph.
BUT.. I couldn't figure out how to stop gradient from repeating. Still, with careful adjustments it could be useful.
You can control the falloff with S.X value. Also, I'm not sure but it could probably be linked to anything, not just a camera.

Node setup:
Nodes.png
Camera to Opacity.jpg
And if we change projection to 'Spherical' after that we get an interesting effect and it's still linked to Camera!
Projection.png
Projection.png (15.1 KiB) Viewed 4490 times
Camera to Opacity Spherical.jpg
Scene files:
Camera to Opacity.zip
(127.66 KiB) Downloaded 236 times
Camera to Opacity Spherical.zip
(201.04 KiB) Downloaded 211 times
I hope this helps in any way.

Regards
Milan
Colorist / VFX artist / Motion Designer
macOS - Windows 7 - Cinema 4D R19.068 - GTX1070TI - GTX780
xcaseyx
Licensed Customer
Posts: 115
Joined: Wed Feb 18, 2015 9:04 pm

holy cow! THAT WORKS AWESOME!
Hightechmech
Licensed Customer
Posts: 36
Joined: Sat Dec 23, 2017 5:35 pm

Hi Milan, your method was very interesting. Is there a new workaround for this? I just need a cloner grid to fade out gradually with a 3d gradient. Is there an easier way for this in the latest version of Octane?
Post Reply

Return to “Maxon Cinema 4D”