5
$\begingroup$

My goal is to create a realistic reproduction of a projector mounted on the ceiling. So far I can reproduce a projector that is projecting straight. But I cannot wrap my head around how to correct perspective distortion when the projector is tilted down.

Edit: The Solution shoud work like you woud expect from a real world projector. With the light beam originating from the lamp position spreading out onto the surface and interacting with objects in between.

For a prjector taht points 90° to the wall evything works fine. enter image description here

As soon as i tilt the Projector i introduce Perspective distortion enter image description here

Node tree to get the lamp to project a texture without barrel distorion like here or here

current projectore node tree

This example file:

$\endgroup$
  • $\begingroup$ It would also be nice if we could calculate the Scale and settings direcly from the projector position relative to the wall. $\endgroup$ – J.Doe Apr 6 at 14:33
3
$\begingroup$

I made a node group. It isn't perfect but works just fine for non-extreme cases. Hope this helps corrected projection node setup keystone correction node group This node group can be further condensed, but it is better this way for better clarity.

To know what Horizontal and Vertical inputs mean see: Keystone Correction

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ this helps already a lot! Now all thats left is to get rid of the distorion :) $\endgroup$ – J.Doe Apr 3 at 15:30
3
+50
$\begingroup$

I don't know whether this suits, you might be wanting more of a simulation of real lenses. But we have an unusual advantage here in CG-world .. the projector can know how far away it is from the points it's projecting onto, via a Ray Length output of a Light Path node.

By similar triangles, (multiplying the normal by the ray-length) the spherical look-up, using the lamp's normal direction, can be corrected back to an orthogonal look-up into the texture, correcting the keystone.

Assuming the lamp is rotating around its X axis, that angle can be used in a driver to correct the aspect ratio of the resulting rectangle.A sine is taken only because the wall is at 90 degrees. If the lamp was projecting onto the floor, or the lamp was parented to a screen with its Z pointing towards it, that would be a cosine.

enter image description here

I've also set the lamp's falloff to 'Constant', so the image is evenly bright. You may want to switch that out.

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ Hmm actualy now after trying to work with this solution i realized it dosnt work the way you would expect form a projector. When i put Objects in the Path of the Light not in the plane which its projecting onto.. the Light beam compes from a totaly unexpected angle and not the Position of the Projecting Lamp. $\endgroup$ – J.Doe Apr 22 at 16:16
2
$\begingroup$

I found another method to correct keystone distortion thanks to this paper. It too has its limitations. I guess if you take an average of this and my previous setup, you would get the best result. Corrected projection Node Setup Node Group

| improve this answer | |
$\endgroup$
0
$\begingroup$

Thanks, I had the same query. But to avoid the non linear distorsion of the edges I've found this node setup.Correction Keystone

I couldn't explain why it works though.

| improve this answer | |
$\endgroup$
  • $\begingroup$ what did you change? $\endgroup$ – J.Doe Oct 20 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.