Imported Obj File Position Not Matching Original File Position/Relation To Cam.

Started by ragnoru, February 18, 2014, 01:39:16 PM

Previous topic - Next topic

ragnoru

Hi,
I am doing lots of high altitude clouds renders with Terragen3 with airplanes flying through the clouds.
I am rendereing the airplanes in 3dsmax max and the clouds in terragen, I need the airplanes to matte the clouds so I exported the airplanes as an obj sequence from 3dsmax, and the camera as an FBX camera.
When I render the matted clouds there is a significant difference between the 3dsmax render and the terragen render, the only way I found to fix it is to offset the airplane around using the angular position until I find the sweet spot where the difference is just due to anti-aliasing, is this a pivot issue?
As a test I imported the same Obj sequence and camera into nuke and compared to the 3dsmax render, and the position is just perfect.

Matching the 2 renders is really time consuming there must be a better way to have a objects match right off the box.

Obviously having exr2 files out and the ability to deep compositing will make this a non issue, but until than I really need some help on solving this issue I've got way to many shots that need to be delivered in a week
Thank you
Aldo Ruggiero

ragnoru

Here are the supporting files.
A simple teapot scene that works perfectly in nuke ( in the zip file you can see that the camera and the tepot match perfectly the 3d render)
and way off in terragen
[attach=1]
[attach=2]
[attach=3]

I attached the terragen file, teapot obj, and fbx camera
Any help with this will really be appreciated

Kadri


Not sure about the real problem but as it is an animation could there be anything related to using the wrong frame as the beginning Aldo?

ragnoru

No unfortunately it is the same frame.
I get the same issue with a static camera and static object.
Aldo

Kadri


Alright.
Did you tried to import the fbx file with the "Set project start/end frames on import" box checked in the FBX file import window Aldo?
That changed the position of the object-camera a little.

ragnoru


Kadri

I made two renders one with the static fbx imported the other with the animated one.
The two renders were different.
But i could not see any different numbers in the settings. Strange!

Kadri

I made many tests so i hope it is as i think but at least the difference looks like it comes from the blur tab in the camera node.
When i made the Motion blur length zero the renders (animated and not animated) were the same.
Not sure if your problem lies here but it could be worth a look.

Even that in the render node the motion blur is set to off that setting in the camera is changing the position of the camera.
You can see it easily if you put a big number like 40 in the camera blur setting that the position changes quite much.

Looks like a bug.

Matt

It's probably related to motion blur and the shutter offset:

http://www.planetside.co.uk/wiki/index.php?title=Camera_-_Blur_Tab

If you set the shutter offset to -0.25 it might match.

(Almost certainly true after what Kadri reported. Thanks for doing those tests!)

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Setting the shutter offset to -0.25 *appears* to be about right, apart from a slight subpixel offset which might be due to Max's default renderer measuring pixels incorrectly (or my image viewer!).

Matt
Just because milk is white doesn't mean that clouds are made of milk.

ragnoru

Kadri really good catch.

Matt
When I turn blur length to 0 i get a 1 to 1 match with a non motion blur frame from 3dsmax
With shutter offset to -0.25 and blur length of 0.5 I get still a visible offset (my planes are going really fast)
With shutter offset to -0.25 and blur length of 0.25 I get still a one to one match
This is with motion blur disabled in the render

Aldo

Kadri


Matt you have your own reasons, but wouldn't it be a little less confusing to change the camera blur to 0 automatically when no motion blur is used in the render node?


Matt

Hi Aldo,

There are a few unknowns here. I don't know how Max handles the key frames when motion blur is turned off. You should also be able to choose how the shutter is offset in Max. Sometimes you just have three choices: centred, start, end.

If Terragen matches when you set the shutter offset to -0.25 and the blur length to 0.25, that means that the Max render is rendering as if the key frame is at the end of the exposure (I think), which seems unusual. Will you be rendering with VRay? I'd recommend setting the camera to "centred" in Max/Vray, then in Terragen set the shutter offset to minus the motion blur length divided by 2. That should match. In any case, there should be a way to get them to match almost 100% whatever settings you have in Max, if I know the setting you use. The only big problems occur if you have multi-segment motion blur or non-linear blur which Terragen doesn't support and/or if you have very high curvature between key frames but I don't think that's what's happening here.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Hi Kadri,

The motion blur flag needs to be separate so that you can render out motion vectors and still control the length of the motion blur for the vectors. It works the way it does because it's a good idea to render the non-blurred frame centred on whatever the final blur region will be, not at the start or end of it. You might also need to shift the timing of the key frames.

http://www.planetside.co.uk/wiki/index.php?title=Camera_-_Blur_Tab

But of course if you want to, you can set the camera's motion blur length to 0 if that's the way you'd prefer to disable motion blur (that was the only way to do it in TG2). They just have potentially different consequences.

Matt
Just because milk is white doesn't mean that clouds are made of milk.