Camera 3D Clipping Plane in/out ramp?

Moderator: SecondMan

Gene Cornelius
Posts: 26
Joined: Sun Mar 11, 2018 8:52 pm
Location: Haines, Alaska
Contact:

Camera 3D Clipping Plane in/out ramp?

#1

Post by Gene Cornelius » Mon Mar 12, 2018 11:17 pm

Hello again! I made it through Andrew Devis's tuts "Fusion Basics:Building a 3D Scene (5 Part Series)" all five parts today (which tells you where I am, no?) I am about to redo the entire process from a new comp and see how much I retained.

I came away with a few questions. I will try to limit my questions to 3 per day max, and only after really thinking/searching.

When using 3D camera clipping plane, near and far objects POP into and out of view when reaching the threshold. Is there a way to modify this so they ramp in/out? This is not for advanced stuff, more like a simple opacity fade.

In thinking about it, I decided that more advanced fades and "materializations" would be worth individually masking, but as I see it, a ramp in/out would save a lot of time/effort when operating on masses of objects. (camera pass-through, animating object movement)

It's probably there, but I don't know how to ask, or where to look.

Thank you.

Tags:

User avatar
SecondMan
Site Admin
Posts: 2601
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 92 times
Contact:

Re: Camera 3D Clipping Plane in/out ramp?

#2

Post by SecondMan » Mon Mar 12, 2018 11:34 pm

3D -> SoftClip

:)

Code: [Select all] [Expand/Collapse] [Download] (WSLsnippet-2018Mar12-2337.setting)
  1. {
  2.     Tools = ordered() {
  3.         Shape3D1 = Shape3D {
  4.             Inputs = {
  5.                 Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
  6.                 ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
  7.                 ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
  8.                 ["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, }
  9.             },
  10.             ViewInfo = OperatorInfo { Pos = { 440, 115.5 } },
  11.         },
  12.         Camera3D1 = Camera3D {
  13.             Inputs = {
  14.                 ["Transform3DOp.Translate.X"] = Input { Value = 0.945696630485242, },
  15.                 ["Transform3DOp.Translate.Y"] = Input { Value = 1.53982139919836, },
  16.                 ["Transform3DOp.Translate.Z"] = Input { Value = 4.62502431928952, },
  17.                 ["Transform3DOp.Rotate.X"] = Input { Value = -18.7999996185303, },
  18.                 ["Transform3DOp.Rotate.Y"] = Input { Value = 16.6, },
  19.                 FLength = Input { Value = 18.2123442718302, },
  20.                 ["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
  21.                 FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
  22.                 ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
  23.                 ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
  24.             },
  25.             ViewInfo = OperatorInfo { Pos = { 440, 214.5 } },
  26.         },
  27.         Merge3D1 = Merge3D {
  28.             Inputs = {
  29.                 SceneInput1 = Input {
  30.                     SourceOp = "Shape3D1",
  31.                     Source = "Output",
  32.                 },
  33.                 SceneInput2 = Input {
  34.                     SourceOp = "Camera3D1",
  35.                     Source = "Output",
  36.                 },
  37.             },
  38.             ViewInfo = OperatorInfo { Pos = { 550, 214.5 } },
  39.         },
  40.         SoftClip1 = SoftClip {
  41.             Inputs = {
  42.                 SceneInput = Input {
  43.                     SourceOp = "Merge3D1",
  44.                     Source = "Output",
  45.                 },
  46.                 OpaqueDistance = Input { Value = 10, },
  47.                 TransparentDistance = Input { Value = 1, },
  48.             },
  49.             ViewInfo = OperatorInfo { Pos = { 660, 214.5 } },
  50.         },
  51.         Renderer3D1 = Renderer3D {
  52.             CtrlWZoom = false,
  53.             CustomData = {
  54.                 ToolVersion = 2,
  55.             },
  56.             Inputs = {
  57.                 Width = Input { Value = 1920, },
  58.                 Height = Input { Value = 1080, },
  59.                 ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
  60.                 SceneInput = Input {
  61.                     SourceOp = "SoftClip1",
  62.                     Source = "Output",
  63.                 },
  64.             },
  65.             ViewInfo = OperatorInfo { Pos = { 770, 214.5 } },
  66.         }
  67.     }
  68. }

User avatar
SirEdric
Fusionista
Posts: 963
Joined: Tue Aug 05, 2014 10:04 am
Been thanked: 70 times
Contact:

Re: Camera 3D Clipping Plane in/out ramp?

#3

Post by SirEdric » Tue Mar 13, 2018 11:19 am

You could even combine two SoftClips (one with inverse values) to create both fadeIn / fadeOut...:-)

Code: Select all

{
	Tools = ordered() {
		Duplicate3D1 = Duplicate3D {
			Inputs = {
				LastCopy = Input { Value = 12, },
				["Translate.Z"] = Input { Value = -4, },
				SceneInput = Input {
					SourceOp = "Shape3D1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 220, 115.5 } },
		},
		Shape3D1 = Shape3D {
			Inputs = {
				["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
				Shape = Input { Value = FuID { "SurfaceCubeInputs" }, },
				["MtlStdInputs.MaterialID"] = Input { Value = 1, },
				["SurfaceCubeInputs.ObjectID.ObjectID"] = Input { Value = 2, }
			},
			ViewInfo = OperatorInfo { Pos = { 110, 115.5 } },
		},
		Camera3D1 = Camera3D {
			Inputs = {
				["Transform3DOp.Translate.X"] = Input { Value = 3.8491287860974, },
				["Transform3DOp.Translate.Y"] = Input { Value = 0.642462324666671, },
				["Transform3DOp.Translate.Z"] = Input {
					SourceOp = "Camera3D1ZOffset",
					Source = "Value",
				},
				["Transform3DOp.Rotate.X"] = Input { Value = -2.9999996185303, },
				["Transform3DOp.Rotate.Y"] = Input { Value = 34.2, },
				FLength = Input { Value = 18.2123442718302, },
				["Stereo.Mode"] = Input { Value = FuID { "OffAxis" }, },
				FilmGate = Input { Value = FuID { "BMD_URSA_4K_16x9" }, },
				["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 3, },
				["MtlStdInputs.MaterialID"] = Input { Value = 2, },
			},
			ViewInfo = OperatorInfo { Pos = { 275, 214.5 } },
		},
		Camera3D1ZOffset = BezierSpline {
			SplineColor = { Red = 254, Green = 56, Blue = 46 },
			NameSet = true,
			KeyFrames = {
				[0] = { 7.24, RH = { 33, -10.0666666666667 }, Flags = { Linear = true } },
				[99] = { -44.68, LH = { 66, -27.3733333333333 }, Flags = { Linear = true } }
			}
		},
		Merge3D1 = Merge3D {
			Inputs = {
				SceneInput1 = Input {
					SourceOp = "Duplicate3D1",
					Source = "Data3D",
				},
				SceneInput2 = Input {
					SourceOp = "Camera3D1",
					Source = "Output",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 385, 214.5 } },
		},
		ClipFront = SoftClip {
			NameSet = true,
			Inputs = {
				SceneInput = Input {
					SourceOp = "Merge3D1",
					Source = "Output",
				},
				OpaqueDistance = Input { Value = 10, },
				TransparentDistance = Input { Value = 1, },
			},
			ViewInfo = OperatorInfo { Pos = { 550, 214.5 } },
		},
		ClipBack = SoftClip {
			CtrlWZoom = false,
			NameSet = true,
			Inputs = {
				SceneInput = Input {
					SourceOp = "ClipFront",
					Source = "Output",
				},
				OpaqueDistance = Input { Value = 20, },
				TransparentDistance = Input { Value = 30, },
			},
			ViewInfo = OperatorInfo { Pos = { 715, 214.5 } },
		},
		Renderer3D1 = Renderer3D {
			CustomData = {
				ToolVersion = 2,
			},
			Inputs = {
				Width = Input { Value = 1920, },
				Height = Input { Value = 1080, },
				["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
				SceneInput = Input {
					SourceOp = "ClipBack",
					Source = "Output",
				},
				RendererType = Input { Value = FuID { "RendererOpenGL" }, },
			},
			ViewInfo = OperatorInfo { Pos = { 880, 148.5 } },
		}
	}
}
Cheers.

Eric.

User avatar
murc
Posts: 18
Joined: Thu Aug 07, 2014 12:19 pm

Re: Camera 3D Clipping Plane in/out ramp?

#4

Post by murc » Wed Mar 14, 2018 4:57 pm

SirEdric wrote:
Tue Mar 13, 2018 11:19 am
You could even combine two SoftClips (one with inverse values) to create both fadeIn / fadeOut...:-)
Wa.. wa.. whaaat?

:bowdown:

User avatar
SirEdric
Fusionista
Posts: 963
Joined: Tue Aug 05, 2014 10:04 am
Been thanked: 70 times
Contact:

Re: Camera 3D Clipping Plane in/out ramp?

#5

Post by SirEdric » Wed Mar 14, 2018 10:16 pm

Ahhh...all those little Fusion jewels...:-)

Gene Cornelius
Posts: 26
Joined: Sun Mar 11, 2018 8:52 pm
Location: Haines, Alaska
Contact:

Re: Camera 3D Clipping Plane in/out ramp?

#6

Post by Gene Cornelius » Wed Mar 21, 2018 9:04 pm

I do appreciate this! Thank you guys. I'm studying it now. (It's pretty cool .. at first I could not see it as I was in another random comp, messing around, and it was longer (so how to include comp length in code?) and I finally rebuilt the comp, then figured out how to mess up the camera so I was heading into the blocks dead on, which is kind of cool.

I am not "getting it" though ... when I rebuild the comp myself, the soft clip does not seem to do anything, even having gone to extremes. I can see that it does do what I wanted though, so thanks.

So this Soft Clip, am I maybe correct in thinking it might be a newer Tool than the Camera3d? (a later add-on to address an issue?) Is it supposed to be used in congruence with Clipping Path in Camera? Why is is not something that works connected to the camera, rather than between the Merge3d and the Renderer3d?

"Fusion jewels"? Right now I'm lost on a seemingly infinite beach of slippery boulders, attempting to do everything I can to roll them aside to reveal the jewels myself before crying for help. The jewels would sparkle and be easier to find were the moon not covered by clouds of too much information and no structure to sort it within.

I'm attempting to begin to understand how some parts of Fusion have functions and controls within the Tool involves specifically, and others are split into separate Tools, why, and how to use this to create some semblance of real understanding .... not just this nodding, mouth agape, and "I see ... "

User avatar
SirEdric
Fusionista
Posts: 963
Joined: Tue Aug 05, 2014 10:04 am
Been thanked: 70 times
Contact:

Re: Camera 3D Clipping Plane in/out ramp?

#7

Post by SirEdric » Thu Mar 22, 2018 6:36 am

Hi Gene.

The values in the SoftClip relate to distance from the active Camera in Fusion Units.
So, if your Object is 10 Units away from the camera, the SoftClip won't deliver any visible result with the standard values of Transparent = 0.05, Opaque = 1.0
(Everything turns opaque once it's more than 1 Unit away from the camera)
Also, if your Object has very small z-depth (say...an ImagePlane) the effect is hard to see, unless you move your Camera or Object.

In the above example observe the range values of the two SoftClips.
Especially the fact that the second SoftClip's TransparentDistance is *larger* than the OpaqueDistance.
(By default this is the other way round...:-))

Maybe you could post a simplfied setup of your comp, so we can see what's going on.

Cheers.

Eric.

User avatar
Chad
Fusionator
Posts: 1265
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 20 times

Re: Camera 3D Clipping Plane in/out ramp?

#8

Post by Chad » Thu Mar 22, 2018 7:33 am

You're free to change the default values, but those were set that way to be a "soft clip" for things that were at the camera clipping plane. So very close distances.
Like flying through a particle field. Fading things far away from the camera works fine, it's just not what the default values are for.

Also, it's a material override. In a pure sense it should be a material that you apply with ReplaceMaterial3D, but it's packaged as one tool instead. If you wanted to build it yourself with CustomShader3D you would use ReplaceMaterial3D and make a macro. That's why it isn't part of the camera.

Gene Cornelius
Posts: 26
Joined: Sun Mar 11, 2018 8:52 pm
Location: Haines, Alaska
Contact:

Re: Camera 3D Clipping Plane in/out ramp?

#9

Post by Gene Cornelius » Fri Mar 23, 2018 12:53 pm

Thanks guys ... I found a reference to Soft Clip in the manual, while looking around for Fog3d info. I understand what it is meant to do (and why I wasn't seeing it work before), but I don't know enough yet to grok the term "material override". I suspect I'll be discovering that in due course.

Last several days I've got a "simple" 2d comp in the works, which I'll post in another thread along with questions I was unable to find answers to (or browbeat a workaround). I don't think I "need" soft clip or particles in this comp, although volume fog would be nice. Too bad it's 2d. I am thinking I could convert it over and make certain things easier, but for now I'm just trying to get a handle on this bag of Tools so I can bludgeon myself with it. Thanks again!

User avatar
ChristopherNodal
Fusioneer
Posts: 164
Joined: Mon Jan 11, 2016 1:42 pm
Been thanked: 12 times

Re: Camera 3D Clipping Plane in/out ramp?

#10

Post by ChristopherNodal » Fri Mar 23, 2018 8:27 pm

Gene Cornelius wrote:
Fri Mar 23, 2018 12:53 pm
I don't know enough yet to grok the term "material override"
Hi Gene,

In a nutshell it means that the Soft Clip tool is not a camera attribute, but a material attribute. The material itself adjusts based on its distance to camera.

That is also the reason why it will not work with the Software Renderer, I believe.

Gene Cornelius
Posts: 26
Joined: Sun Mar 11, 2018 8:52 pm
Location: Haines, Alaska
Contact:

Re: Camera 3D Clipping Plane in/out ramp?

#11

Post by Gene Cornelius » Fri Mar 23, 2018 11:50 pm

Thanks for that Christopher .. I'm not sure why yet, but something twitches in my brain and tells me this will be useful to know one day! "Material adjusts on distance to camera" ... could be interesting!