PDA

View Full Version : Stereoscopic rendering + camera position + believable extension of the real world?


znelson
07-12-2011, 03:04 AM
Hey gang - I spent 4 hours tonight on the following problem with no luck - hopefully someone out there has figured this out and can shed some light on a solution...

I'm working on a stereoscopic 3d scene of a room that will be projected on a floor-to-ceiling screen. The goal is to make the projected 3d room appear as an extension of the room you're standing in.

The problem is that I can't figure out the right combination of camera position, rotation, etc. The objects in the room have to appear as they would if they were real, which requires the correct camera angle, etc. I don't think this is as hard as trying to match the floor, ceiling, and walls in the real world to the ones in the projected image - I found that nearly impossible tonight - the angles are just never right.

I created a grid on the floor of the real-world room and attempted to match the grid lines to those in Maya but was never able to. The grid lines in Maya diverge too sharply as they extend away from the camera (I used the center cam for this test instead of 3d).

I got to believe this is possible but I just can't find the right combination. Has anyone attempted this before and had luck? Maybe you have an example scene already that you should share? Many thanks in advance!

-Zach

ahazelden
07-12-2011, 06:57 AM
You may find it helpful to use real scale measurements in Maya when matching the stand-in geometry of the room with your real room. If you measure exactly where the real camera is then you can better position the virtual camera close to where the real camera was located.

If you haven't already you will need to edit the camera's field of view settings (focal length) in Maya to lineup with your grid in the real room. If you need even more fine tuning you can edit the camera's Film Back settings.
http://www.andrewhazelden.com/files/2011/July/cgtalk_Maya_camera_film_back.jpg

Depending on the lens of the projector there might be lens distortion in your projected output that might make it harder to lineup the 3d rendered footage with the grid in your room. You may need to use a lens distortion plugin on your rendered images to match the real scene.

Additionally, you may find the topic of Phantograms (http://en.wikipedia.org/wiki/Phantogram) / perspectival anamorphosis (http://en.wikipedia.org/wiki/Anamorphosis) interesting as well.

Good Luck!

P.S. Barco had an article on video projection mapping in their Barco redefine PDF newsletter (http://www.barco.com/downloads/redefine/redefine_issue02.pdf). It is on page 4.




I created a grid on the floor of the real-world room and attempted to match the grid lines to those in Maya but was never able to. The grid lines in Maya diverge too sharply as they extend away from the camera (I used the center cam for this test instead of 3d).

znelson
07-12-2011, 01:37 PM
Thanks - I think maybe this is a scale and focal length issue. Attached is a sketch that better illustrates the problem I'm seeing.

ahazelden
07-15-2011, 10:52 AM
Hi znelson.

I think I understand what you are trying to do but I don't have all of the details about what type content you are trying to include in your video projection mapping room extension. ie. are you trying to simulate an architectural type room extension or a simulated outdoor world that connects to the room.

I don't have a video projector on hand to test the output but I was playing with techniques that could be used for extending a room in Maya. Here are the results from my first try.

http://www.andrewhazelden.com/files/2011/July/maya-room-extension-animated.gif

http://www.andrewhazelden.com/files/2011/July/1.maya-room-with-end-wall.jpg

http://www.andrewhazelden.com/files/2011/July/2.maya-room-without-end-wall.jpg

http://www.andrewhazelden.com/files/2011/July/3.maya-room-extended.jpg

I created a small room in Maya and placed a camera in the middle of the room that would represent the projector's point of view. Then I created an extended version of the room that is visible when the end wall is removed.

I copied the simulated "projector's view" camera and edited the Film Back settings to "crop" the renderable area to the exact area of the end wall. I also changed the image size in the render settings to have the same aspect ratio as the end wall. This means when you render the camera it only renders the area that fits inside where the hidden end wall would be.

Attached is an image of the Film Back settings that I changed to crop the renderable area of the camera. I set the Fit Resolution Gate to Vertical and edited the Pre Scale and Film Translate Y attributes.

http://www.andrewhazelden.com/files/2011/July/Maya-cropped-camera-view-attributes.jpg

If you are going for photorealistic results you will have to spend some time working on blending the lighting on the edge of the real room's end wall to blend the indirect lighting in the rendered room extension with the lighting and corner shading in the real room.

Here is a link to a sample Maya scene I created.
Video_Projection_Room_Extension_Maya_Sample_Scene.zip (http://www.andrewhazelden.com/files/2011/July/Video_Projection_Room_Extension_Maya_Sample_Scene.zip)

Good Luck with your project!

Regards,
Andrew Hazelden

znelson
07-16-2011, 11:45 AM
Wow, Andrew - thanks so much!

I realized the other night that my primary problem was that I didn't align the edges where the ceiling and walls met with the top right and left corners of the rendered image - as well as the edges where the walls met the floor with the bottom right and left corners. It didn't dawn on me at first but in order for the illusion of the room to work it has to appear as if the the walls, ceiling, and floors all extend into the virtual room and that means lining up where everything meets. Once I did that, the illusion started to work.

It's also critical to sit directly in front of the projection while working on it. I was sitting to the side and 90 degrees to the screen which meant my viewing perspective was skewed. Once I sat dead center the problems because obvious.

I'll give your scene a try today - I really appreciate it!

CGTalk Moderation
07-16-2011, 11:45 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.