Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Coordinates 2D to 3D and back 3D to 2D in one expression?

  • Coordinates 2D to 3D and back 3D to 2D in one expression?

    Posted by Mark Doctor on June 11, 2018 at 12:37 pm

    Hello!

    I’ve created a shiny 3D-tablet(shapes) and it should reflect the floor it sits on.

    The floor is actually a shadow-catcher placed by motionmatching the camera movements of the backgroundfootage.

    To give the floor some contents that the tablet can reflect I’ve precomposed the floor and replaced the solid with the original backgroundfootage. Then I gave the floor an Infinite size to fill up the whole scene. And by hand, using the corner-pin-tool, I corrected the perspectif.

    Now I’ve finally got a 3D floor which aligns perfectly with the backgroundfootage. This prevents me of using camera projection, which also affects the 3D-tablet. Or rebuilding the scene with the vanishing point in Photoshop (I’m not allowed to export *.vpe)

    However if I move the compositioncamera, I need to adjust corner-pin-tool to correct the perspective. I guess it can be done with expressions to fixate the corner points to the composition corners.

    Since its a 2D effect placed on a 3D layer and the corners should match the 2D composition corners. My question is: How to match both 2D coordinates on different 3D layers, with an expression?

    Kind regards Mark

    Kalleheikki Kannisto replied 7 years, 11 months ago 2 Members · 8 Replies
  • 8 Replies
  • Kalleheikki Kannisto

    June 11, 2018 at 8:14 pm

    That sounds incredibly convoluted. You lost me about half-way through the explanation of how this is set up.

    Perhaps the best thing to do here would be to duplicate the layers that make up your 3D object and scale them -100% on the y-axis and offset them on the same axis to create a fake reflection, that you can blur, lower the opacity on, etc…?

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Mark Doctor

    June 11, 2018 at 9:22 pm

    Thank you for your input.

    That indeed would fake the reflection of the 3D-tablet into a floor. My curent problem is the fact that the floor isn’t reflected by the tablet.

    So i needed to create a fake floor from the backgroundfootage to be reflected by the tablet.

  • Mark Doctor

    June 12, 2018 at 1:41 am

    Maybe I should put it this way. The backgroundlayer is rotated to Lean backward, to create a floor and I used the corner-point-tool to skew the image so it looks upright again. This works fine when everything remains static

    But if i change the camera angle the skewing needs to be altered dynamically to the compositionscornerpoints

  • Kalleheikki Kannisto

    June 12, 2018 at 4:47 am

    Ok, I see, I got that backwards. I guess you’re using AE’s built-in 3D materials options for this?

    I don’t quite get why you’re using corner pin rather than turning the layer into a 3D layer. Perhaps a screenshot of how the scene looks would help.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Mark Doctor

    June 12, 2018 at 5:14 pm

    Thank you for your help. I’ve taken 4 screenshots:

    top-left:
    original scene with a 3D-shape.

    top-right:
    Creating a 3d-layer from the backgroundfootage and turn it 90° to create a floor.

    bottom-left:
    Skewing the image with the corner-pin-tool, back to its original state.

    bottom-right:
    New cordinates are needed for the corner-pin-tool, when the camera move’s. These need to be pinned down to the compositions corners.

  • Kalleheikki Kannisto

    June 12, 2018 at 8:29 pm

    Ok, how about a simpler solution? Make the floor for reflection as a plane, repeating a piece of that wooden floor. Instead of corner pinning to “fix” the perspective, use a copy of the tablet without a background as a track matte to hide the reflection surface and to reveal the original footage.

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Mark Doctor

    June 13, 2018 at 10:06 pm

    I Think your right. That means that i need to tile the floor with planks and create massive 3D plate. Then in material options select “appears in reflections only”.

    Still I have developed the original idea a bit further. Because of the flexibility to automatically acquire the floor of a random footage. I wrote 4 expressions for the cornerpins:

    Upper Left: thisLayer.fromCompToSurface([0,0,0])
    Upper Right: thisLayer.fromCompToSurface([thisComp.width,0,0])
    Lower Left: thisLayer.fromCompToSurface([0,thisComp.height,0])
    Lower right: thisLayer.fromCompToSurface([thisComp.width,thisComp.height,0])

    They all work fine and I also can use them als a preset for different purposes. But at a certain (steep) angle of the floor the expression gives an error message. Since I can manually drag the point-control to the desired position, I guess its got something to do with the size of the numbers to do the math, but not there outcome.

  • Kalleheikki Kannisto

    June 14, 2018 at 6:40 am

    Yes, I think perspective point values are just too extreme for corner pin to counter-act.

    Kalleheikki Kannisto
    Senior Graphic Designer

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy