Page 2 of 3

Re: failed to match maya cam, please help

Posted: Sun Nov 28, 2010 2:50 pm
by bazuka
my friend can u post me camera settings here so i can try match them with octane?

or export just camera? ;)

Re: failed to match maya cam, please help

Posted: Sun Nov 28, 2010 4:51 pm
by [gk]
Its your Maya camera that has issues, what? I dont know but it is.
Im using 3dsmax and everything aligns flawless.

One thing though
You can render AO pass from octane and a Mat ID pass. You can use the last one for swapping new backgrounds in and so forth.

Re: failed to match maya cam, please help

Posted: Sun Nov 28, 2010 10:42 pm
by radiance
Hi guys

I think this is due to an incorrect translation from the Maya camera to octane's.
Bazooka, can you provide a referrence image and the exported obj file so we can have a detailed look?

Also, what fov conversion code are you currently using in the exporter?

Radiance

Re: failed to match maya cam, please help

Posted: Mon Nov 29, 2010 12:23 am
by tchoa
The code is the same as in the native mel script (AEcameraTemplateCommon.mel) that converts camera's focal length to fov :

Code: Select all

float $fov = (0.5 * $aperture) / ($focal * 0.03937);
$fov = 2.0 * atan ($fov);
$fov = 57.29578 * $fov;
Default camera's horizontal aperture is 1.417 (x0.945 for vertical) ... and does not correspond to an existing preset like imax or a 35mm film, but might be a 36mm x 24mm.
In maya, the focal length is the attribute attached to a camera (mm), and fov 'is more like' a simple displayed information in the attribute editor.
That doesn't seems to match the octane's fov calculation.
Hope that helps.

F

Re: failed to match maya cam, please help

Posted: Mon Nov 29, 2010 1:47 am
by abstrax
As far as I can see in your code snippet, the aperture is given in inches while the focal length is millimeters. Is that correct?

Is it possible that the pixel ratio in the Maya scene is not exactly 1:1?

Cheers,
Marcus

Re: failed to match maya cam, please help

Posted: Mon Nov 29, 2010 5:09 am
by face
I think it´s the same issue like this in Softimage...
http://www.refractivesoftware.com/forum ... =29&t=4374

face

Re: failed to match maya cam, please help

Posted: Mon Nov 29, 2010 4:40 pm
by tchoa
Yes it's possible.
Although the field of view is easy to get, as said face, the view in maya (and other 3d apps) can't perfectly match octane's view.
I guess that's because of the way octane is computing lens effects (wich might be accurate).
Don't know if bazuka already fixed that. Anyway, I can post some correction code there when I've some time to check if it's 'close' enough.
F

Re: failed to match maya cam, please help

Posted: Mon Nov 29, 2010 7:25 pm
by abstrax
I don't know, but the C4D output matches the Octane output quite well. There may be a difference of 0.5 pixel (haven't checked that), but otherwise it matches. Of course, the camera in C4D must not have a film offset and the pixel ratio must be 1:1. I guess in Maya it's the same. Could any of the Maya users please verify that the if you set the pixel ratio to exactly 1:1 and remove any film offset, the rendering output between Maya and Octane match?

By the way, the camera model of Octane is a pinhole/thin lens camera. I.e. there is no special distortion, just a plane projection onto a plane from the camera view position (plus some shifting around for DOF, if the lens aperture is != 0, which wasn't the case here).

Cheers,
Marcus

Re: failed to match maya cam, please help

Posted: Mon Nov 29, 2010 7:27 pm
by bazuka
@tchoa

i think ive also copy the formula from AEcameraTemplateCommon.mel

if u already have fixed formula plz paste it here and ill update the script ;)

cheers

Re: failed to match maya cam, please help

Posted: Mon Nov 29, 2010 8:18 pm
by tchoa
I've noticed some strange behaviour with the 'fit resolution gate' attribute (aka .filmFit attribute).
A workaround : set your camera's 'fit resolution gate' attribute to 'horizontal' or 'overscan'.
Default is 0 or 'fill'.
Perhaps it's a good idea to fix the .filmFit of each camera in the scene when the script is launched.
F