- Posts: 456
- Joined: Thu Sep 16, 2021 7:05 am
- Real Name: Cody Predum
I have a somewhat complicated use case for the "modify with" feature, and I need to understand how it works a little better in order to figure out how to solve my issue. Here's what I'm trying to do:
I'm using the ImagePlane3D node to transform the perspective of a 2D image for a composite. As is expected, the X and Y translation parameters affect the perspective of the image rather than just moving the image on screen without otherwise changing it. For example, take an image rotated 45 degrees on the Y axis. The previously parallel lines of the top and bottom of the image now converge on the right side of the screen, with one angled down and the other angled up. Then, by moving it up, it is now above the 3D camera, making both lines angled downward. See Figure 1:
But in my case, sometimes I want to achieve that perspective shift while keeping the image in the same part of the screen. This isn't difficult; you just place a regular transform after the Render3D node that follows the ImagePlane3D node and compensate, as shown in Figure 2:
Here's where my modifier/expressions question actually comes in. I would love to be able to set up some kind of modifiers that allow me to link the ImagePlane3D node's translation parameters to the downstream Transform node's translation parameters in an inverse way, such that I could change the Y value in ImagePlane3D to apply the perspective change without changing the on-screen position of the image's pivot point.
I know this probably requires quite a bit of non-trivial math once I start factoring more parameters into the equation, but for now I just want to figure out how to properly set up modifiers/expressions.
And two more quick questions about the finer details. First, there must be a way to write more complicated expressions somewhere other than the tiny single-line text field that comes up when you assign a parameter to an expression, right? Second, I am noticing that the X and Y components of the Transform node's Center appear to be manipulated together as a "Point" with an X component and a Y component (a Vector2 I'm guessing?). Is there a way to do the math for X and Y separately as floats, and then assign the results to the appropriate part of the Point type variable?
Thanks for any advice anyone happens to have on this (looking at you, Brian).
I'm using the ImagePlane3D node to transform the perspective of a 2D image for a composite. As is expected, the X and Y translation parameters affect the perspective of the image rather than just moving the image on screen without otherwise changing it. For example, take an image rotated 45 degrees on the Y axis. The previously parallel lines of the top and bottom of the image now converge on the right side of the screen, with one angled down and the other angled up. Then, by moving it up, it is now above the 3D camera, making both lines angled downward. See Figure 1:
- Figure 1
- Modifier question 04.png (177.04 KiB) Viewed 1397 times
But in my case, sometimes I want to achieve that perspective shift while keeping the image in the same part of the screen. This isn't difficult; you just place a regular transform after the Render3D node that follows the ImagePlane3D node and compensate, as shown in Figure 2:
- Figure 2
- Modifier question 02.png (181.97 KiB) Viewed 1397 times
Here's where my modifier/expressions question actually comes in. I would love to be able to set up some kind of modifiers that allow me to link the ImagePlane3D node's translation parameters to the downstream Transform node's translation parameters in an inverse way, such that I could change the Y value in ImagePlane3D to apply the perspective change without changing the on-screen position of the image's pivot point.
I know this probably requires quite a bit of non-trivial math once I start factoring more parameters into the equation, but for now I just want to figure out how to properly set up modifiers/expressions.
And two more quick questions about the finer details. First, there must be a way to write more complicated expressions somewhere other than the tiny single-line text field that comes up when you assign a parameter to an expression, right? Second, I am noticing that the X and Y components of the Transform node's Center appear to be manipulated together as a "Point" with an X component and a Y component (a Vector2 I'm guessing?). Is there a way to do the math for X and Y separately as floats, and then assign the results to the appropriate part of the Point type variable?
Thanks for any advice anyone happens to have on this (looking at you, Brian).