Page 1 of 2

Lens Shift inconsistency

PostPosted: Wed Feb 02, 2011 10:45 am
by yoyoz
Hi,

while I was adding the export of lens shift from Blender to Octane in the plugin, I noticed that same values don't shift the scene the same way in the 2 products... The 'right/X' value seems almost OK, but the 'up/Y' one doesn't match.

Here're a couple of screenshots so you see what I mean. Am I doing something wrong?

Thanks,
Lionel

Re: Lens Shift inconsistency

PostPosted: Wed Feb 02, 2011 10:51 am
by abstrax
yoyoz wrote:Hi,

while I was adding the export of lens shift from Blender to Octane in the plugin, I noticed that same values don't shift the scene the same way in the 2 products... The 'right/X' value seems almost OK, but the 'up/Y' one doesn't match.

Here're a couple of screenshots so you see what I mean. Am I doing something wrong?

Thanks,
Lionel


Obviously Blender is doing something different here. Can you show us the shifted and the non-shifted Blender renders?

Thanks,
Marcus

Re: Lens Shift inconsistency

PostPosted: Wed Feb 02, 2011 10:58 am
by yoyoz
Yep, here are two screeshots taken in a row.

Re: Lens Shift inconsistency

PostPosted: Wed Feb 02, 2011 11:04 am
by abstrax
yoyoz wrote:Yep, here are two screeshots taken in a row.


Ok, it looks as if in Blender the shift is always relative to the width, while in Octane the shift is relative to corresponding axis. I'm not sure, if the behaviour in Blender stays the same in portrait mode.

If my assumption is correct, the shifts to export are:

Code: Select all
OctaneLensShiftX = BlenderLensShiftX;
OctaneLensShiftY = BlenderLensShiftY * ImageSizeX / ImageSize Y;


Cheers,
Marcus

Re: Lens Shift inconsistency

PostPosted: Wed Feb 02, 2011 1:04 pm
by yoyoz
Hi Marcus,

it seems it's working as you predicted, at least for this screen resolution.

There has been an API change this morning in Blender that prevents me properly testing other aspect ratios at the moment but I'll definitely do when I've a chance.

Thanks a lot,
Lionel

Re: Lens Shift inconsistency

PostPosted: Fri Feb 04, 2011 5:29 am
by yoyoz
Hi Marcus,

it seems there're issues with 'portrait' resolutions : even without lens shift the results are very different between Blender and Octane. I've attached two renders of simple cube at 100x150 so you can see.

Cheers,
Lionel

Re: Lens Shift inconsistency

PostPosted: Fri Feb 04, 2011 7:53 am
by abstrax
yoyoz wrote:Hi Marcus,

it seems there're issues with 'portrait' resolutions : even without lens shift the results are very different between Blender and Octane. I've attached two renders of simple cube at 100x150 so you can see.

Cheers,
Lionel


In Octane, the field-of-view is always the horizontal field-of-view. I guess, in Blender it's the field-of-view of the longer axis.

Cheers,
Marcus

Re: Lens Shift inconsistency

PostPosted: Fri Feb 04, 2011 9:46 am
by yoyoz
abstrax wrote:In Octane, the field-of-view is always the horizontal field-of-view. I guess, in Blender it's the field-of-view of the longer axis.


It looks like you always guess well at first shot ;) . Applying simple arithmetics on the fov seems to properly do the job now.

Thanks for the advice, it'll be included in next version of my exporter!
Cheers,
Lionel

Re: Lens Shift inconsistency

PostPosted: Fri Feb 11, 2011 5:16 pm
by Hastule
yoyoz wrote:
abstrax wrote:In Octane, the field-of-view is always the horizontal field-of-view. I guess, in Blender it's the field-of-view of the longer axis.


It looks like you always guess well at first shot ;) . Applying simple arithmetics on the fov seems to properly do the job now.

Thanks for the advice, it'll be included in next version of my exporter!
Cheers,
Lionel




Hey, I am having this EXACT same problem. I was wondering, what arithmetics are you applying to achieve the result you want? I too would like to solve this issue on a project I am working on but I am not quite sure what values I should change, and whether I should fix the problem on the blender side, the octane side, or a little of both. How exactly did you fix your own scene?

Re: Lens Shift inconsistency

PostPosted: Fri Feb 11, 2011 5:39 pm
by yoyoz
I didn't change my scene, I updated my exporter :)

I've not made lot of tests but everything was fine last time I checked. Look at engine.py, starting line 129: you'll find the logics I applied.