PDA

View Full Version : 3D auto stereoscopic camera script


SpackenLord
08-15-2008, 01:37 PM
Hello All,

NewSight Corporation would like to announce that it has released its first open-source script for 3D Studio Max that enables the user to produce their own movies in 3D.

For 10 years NewSight has developed glasses-free autostereoscopic displays and we would now like to offer our knowledge of 3D technologies to 3D artists and content producers. Hopefully this can open the door to the next level of digital entertainment. Everyone is welcomed to try out our script and become more familiar with real 3D content production.

Use this Link: MultiCam Script (http://www.newsight.com/open-source/multicam-maxscript.html)

pokoy
08-15-2008, 02:36 PM
sounds like a very useful script, thanks for releasing it for free!

thatoneguy
08-15-2008, 06:22 PM
Anaglyph output generates a really weird anaglyph with 4 layers.

SpackenLord
08-15-2008, 07:08 PM
Have you tried to watch it with an anaglyph glasses? This kind of preview is made to simulate the behavior of our 3D displays on a standard 2D screen. It is not a normal anaglyph image and one of the reasons for the 4 layers.

thatoneguy
08-15-2008, 08:46 PM
Yeah I looked at it through anaglyph glasses and the 4-planes made it look like like a good anaglyphic image... and a bad ghost image.

SpackenLord
08-15-2008, 09:43 PM
Exactly. All glasses free 3D displays have a limited 3D volume. Thatīs what the 3 planes are indicating in the viewport. So, if you have some scene elements near to the 3D borders or out of the given 3D volume, these elements will look blurry. It is comparable with the depth of field effect. So, please try to use different values for the "3D Volume" and watch the resulting anaglyph image to get a better feeling for it. The "ghost image" is also a kind of indicator for the 3D volume borders. When it starts disturbing the 3D impression just decrease your "3d volume" value.

Hopefully that helps to understand.

thatoneguy
08-16-2008, 12:16 AM
Ok so it's doing a super super basic multi-pass DOF effectively. And the 3D Volume spinner adjusts the interocular distance.

But isn't that '3d volume' calculation kind of arbitrary though?

I feel like a literal interocular distance adjustment would be more useful and then let the Renderer's DOF handle the field of view instead of doing it as a 2 sample process on a single dimension.

The output from this script seems really odd (at least for anaglyphic material).

SpackenLord
08-17-2008, 09:35 AM
The 'Anaglyph Output' is only a preview for people who dont have a 3D display and is not the final output. So, the script does exactly what it should do. It generates 8 different subviews for a given 3D volume. And of course, you really need a 3D display to watch the result without any anaglyph glasses. There is lot of information about our 3D technology in the script manual and on our website (http://www.newsight.com/index.php?id=81)

3rd Dimentia
08-19-2008, 12:44 AM
It's cool to see more and more people doing stereo 3d. I've only had a quick look at how your script works. Am I correct in thinking that your camera targets for each eye are the same? If so, your method of stereo will cause eye strain and dizzyness. This link will explain why.
http://local.wasp.uwa.edu.au/~pbourke/projection/stereorender/

If they're not "toe in" cameras, then I appologise and I'll have more of a play around when I get the chance.

I wrote a script a while back that works on the same theory as the info on Paul Bourke's site. It works with the free cross-eyed-mary plugin.
http://home.iprimus.com.au/wickergray/CgRay-AutoXidMary.mcr

Anyone feel free to do whatever you want with the script.

Cheers,

Cg.

SpackenLord
08-19-2008, 08:19 AM
Hey Cg, thanks for the response.

Indeed we do not "toe" in cameras. The script creates a new additional camera. This camera is specially created for 3D rendering. This new cam shifts or shears around the base camera.

By the way, i have created a local output, which changes the camera position at rendertime. This works fine for scanline renderer, but for mental ray or v-ray i see no camera change at render time.

Maybe someone has a good answer for this phenomenon.

martinB
08-19-2008, 02:59 PM
Indeed we do not "toe" in cameras. The script creates a new additional camera. This camera is specially created for 3D rendering. This new cam shifts or shears around the base camera.

So your script effectively creates an asymmetric view frustum?

-- MartinB

Teriander
08-20-2008, 06:28 PM
I went to Siggraph last week and had a private conference with autodesk and Lightspeed. If you guys are serious about Stereoscopic, also check out www.DepthQ.com they create projectors for polarized stereoscopic. Same type of cameras used for Beowulf 3d, U2 3D, etc. Could work well with this script!

SpackenLord
08-20-2008, 08:30 PM
@MartinB

Yes, we use shifted camera cones. This technique helps to avoid vertical disparities. These vertical disparities are one of the reasons why so many people are getting headaches while watching movies in 3D cinemas.

As i have seen, you are well skilled in scripting. So, this script is not jet perfect and I'm very interessted in any improvement suggestions.


@Teriander
Thanks for the link. Sounds very interesting, too. It would be great to watch their technology in action. Did you also gain some insights in the resuting 3D impression?

martinB
08-21-2008, 09:59 AM
@MartinB
Yes, we use shifted camera cones. This technique helps to avoid vertical disparities. These vertical disparities are one of the reasons why so many people are getting headaches while watching movies in 3D cinemas.
You do this by rendering a bigger image and then cropping away the surplus pixels?

Edit: After looking at the code, I see that you are using a Sheared transform matrix!
Sneaky ;) (maybe that is the reason you are having problems with other renderers?)


As i have seen, you are well skilled in scripting. So, this script is not jet perfect and I'm very interessted in any improvement suggestions.

First of all, thanks for making the source code available! Even though I have no direct use for eight subimages (I only need two), I really like the script


After a brief glimpse a it, I have few questions/comments:

You are using an #indexTab to store node handles for retrieving the attached objects. I wonder why you are not using a #nodeTab and directly store the node? AFAIK, handles are randomly assigned and start with 1 after each scene reset, which means that handles will not survive a File > Merge, for example.

It looks as if you are not taking pixel aspect into account?

If the script is having problems with renderers other than scanline, a check/warning would be good if mr/vray/fR.... is currently used

Not sure I understand why the script is rendering four times to produce the anaglyph preview? Two should be enough?

It might be nice to be able to cancel out the rendering, either anaglyph or local rendering.

You are setting the viewport to the 3D camera right before rendering. It would be nice if you would store the previous view and restore it afterwards. This might get a bit messy, though...


-- MartinB

SpackenLord
08-21-2008, 10:49 AM
Not sure I understand why the script is rendering four times to produce the anaglyph preview? Two should be enough?


Two are enough, right. It's just for demonstating the limited 3D volume.
The main images are shown by 80% and the 2 more images are added by 20%. This only makes sense for previewing the result like it will be displayed on an autostereoscopic display, because these displays can not seperate the images by 100%. If you only need two images, you can simply change up the Anaglyph function.

You are using an #indexTab to store node handles for retrieving the attached objects. I wonder why you are not using a #nodeTab and directly store the node? AFAIK, handles are randomly assigned and start with 1 after each scene reset, which means that handles will not survive a File > Merge, for example.

Yes, i know that this would be a better solution. But i'm always getting an dependency loop for my planes and the 3D camera. So, this was the only solution i found to identify the objects after scene loading. Maybe, someone can show me how to solve this problem.

If the script is having problems with renderers other than scanline, a check/warning would be good if mr/vray/fR.... is currently used

Ok, thats the easiest way ;) But the problem is my "PreRenderFrame" callback, which works fine for all renderers. But only the scanline renderer seams to allow you to change the camera position at rendertime!?

Your other points are interesting as well.
Thanks for your tips.

ZeBoxx2
08-21-2008, 12:04 PM
the camera position thing seems to work okay with Brazil, but you may want to try moving the camera not in #preRenderFrame but in #preRenderEval ?

SpackenLord
08-21-2008, 02:14 PM
Good idea, but the same result. Possibly it is a deadend to change the camera position at rendertime.

If someone has a better idea to render the same frame 8 times, like the multipass effect, this would be great.

Thanks for your help.

ZeBoxx2
08-21-2008, 05:03 PM
you could call render() locally (and optionally specify the frame, defaults to the current one. For network renders you'd have to submit multiple jobs, changing the camera's position for each; note that if there's any animation in the scene, your current method would have problems as well (I think).

martinB
08-22-2008, 01:41 PM
If someone has a better idea to render the same frame 8 times, like the multipass effect, this would be great.

Have you considered using a script controller on the camera's position? I am not sure though changing the camera position between frames with a callback script is such a good idea if you think about motion blur, for example.

I personally only need two stereo views and therefore would prefer to have two normal cameras in the scene that are controlled by a script but can be treated just like normal cameras for which I can submit a normal (batch) render job each.

Eventually, it looks like you are hitting against a limitation in the design of 3ds Max which never was good at dealing with multiple camera views IMHO.

-- MartinB

JHN
01-22-2009, 08:17 AM
*Bump

Is this script still available? I'm getting a 404. I'd be interested in checking out that workflow.
Thanks,
-Johan

th3ta
04-02-2009, 06:24 PM
Is this available anywhere?

ZeBoxx2
04-02-2009, 06:39 PM
Looks like the license at the top of the file allows redistribution - so.. v1.03 'as is' available from:
http://www.pointzero.nl/temp/NewSightMultiCam.zip

Note the folder name - it's only temporary and the file will be dropped eventually. I will, however, remove that file earlier if so requested (regardless of the license allowing it).

Star-Scream
03-03-2010, 07:26 AM
Would like to try this script but all links are 404 :shrug:

CGTalk Moderation
03-03-2010, 07:26 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.