Lens Shift inconsistency

Forums: Lens Shift inconsistency
Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)

Lens Shift inconsistency

Postby yoyoz » Wed Feb 02, 2011 10:45 am

yoyoz Wed Feb 02, 2011 10:45 am
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
Attachments
lensshift-octane.jpg
lensshift-blender.jpg
Desktop: Ubuntu 13.04 x64 - i7-3770K @ 3.5GHz - 32GB DDR3 - GTX670 2048MB
Laptop: Linux Mint 11 x64 - i7-2860QM @ 2.5GHz - 16GB DDR3 - Quadro 3000M 2GB
Software: NVidia 319.12 - Cuda 4.2.9 - Blender 2.66a
User avatar
yoyoz
Licensed Customer
Licensed Customer
 
Posts: 451
Joined: Sat Dec 25, 2010 9:59 am
Location: Belgium

Re: Lens Shift inconsistency

Postby abstrax » Wed Feb 02, 2011 10:51 am

abstrax Wed Feb 02, 2011 10:51 am
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
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5484
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: Lens Shift inconsistency

Postby yoyoz » Wed Feb 02, 2011 10:58 am

yoyoz Wed Feb 02, 2011 10:58 am
Yep, here are two screeshots taken in a row.
Attachments
blender-unshifted.jpg
blender-shifted.jpg
Desktop: Ubuntu 13.04 x64 - i7-3770K @ 3.5GHz - 32GB DDR3 - GTX670 2048MB
Laptop: Linux Mint 11 x64 - i7-2860QM @ 2.5GHz - 16GB DDR3 - Quadro 3000M 2GB
Software: NVidia 319.12 - Cuda 4.2.9 - Blender 2.66a
User avatar
yoyoz
Licensed Customer
Licensed Customer
 
Posts: 451
Joined: Sat Dec 25, 2010 9:59 am
Location: Belgium

Re: Lens Shift inconsistency

Postby abstrax » Wed Feb 02, 2011 11:04 am

abstrax Wed Feb 02, 2011 11:04 am
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
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5484
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: Lens Shift inconsistency

Postby yoyoz » Wed Feb 02, 2011 1:04 pm

yoyoz Wed Feb 02, 2011 1:04 pm
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
Desktop: Ubuntu 13.04 x64 - i7-3770K @ 3.5GHz - 32GB DDR3 - GTX670 2048MB
Laptop: Linux Mint 11 x64 - i7-2860QM @ 2.5GHz - 16GB DDR3 - Quadro 3000M 2GB
Software: NVidia 319.12 - Cuda 4.2.9 - Blender 2.66a
User avatar
yoyoz
Licensed Customer
Licensed Customer
 
Posts: 451
Joined: Sat Dec 25, 2010 9:59 am
Location: Belgium

Re: Lens Shift inconsistency

Postby yoyoz » Fri Feb 04, 2011 5:29 am

yoyoz Fri Feb 04, 2011 5:29 am
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
Attachments
t1.png
Octane render
t1.png (9.54 KiB) Viewed 4034 times
t2.png
Blender render
t2.png (1.78 KiB) Viewed 4034 times
Desktop: Ubuntu 13.04 x64 - i7-3770K @ 3.5GHz - 32GB DDR3 - GTX670 2048MB
Laptop: Linux Mint 11 x64 - i7-2860QM @ 2.5GHz - 16GB DDR3 - Quadro 3000M 2GB
Software: NVidia 319.12 - Cuda 4.2.9 - Blender 2.66a
User avatar
yoyoz
Licensed Customer
Licensed Customer
 
Posts: 451
Joined: Sat Dec 25, 2010 9:59 am
Location: Belgium

Re: Lens Shift inconsistency

Postby abstrax » Fri Feb 04, 2011 7:53 am

abstrax Fri Feb 04, 2011 7:53 am
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
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5484
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: Lens Shift inconsistency

Postby yoyoz » Fri Feb 04, 2011 9:46 am

yoyoz Fri Feb 04, 2011 9:46 am
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
Desktop: Ubuntu 13.04 x64 - i7-3770K @ 3.5GHz - 32GB DDR3 - GTX670 2048MB
Laptop: Linux Mint 11 x64 - i7-2860QM @ 2.5GHz - 16GB DDR3 - Quadro 3000M 2GB
Software: NVidia 319.12 - Cuda 4.2.9 - Blender 2.66a
User avatar
yoyoz
Licensed Customer
Licensed Customer
 
Posts: 451
Joined: Sat Dec 25, 2010 9:59 am
Location: Belgium

Re: Lens Shift inconsistency

Postby Hastule » Fri Feb 11, 2011 5:16 pm

Hastule Fri Feb 11, 2011 5:16 pm
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?
Hastule
Licensed Customer
Licensed Customer
 
Posts: 18
Joined: Thu Oct 07, 2010 1:12 pm

Re: Lens Shift inconsistency

Postby yoyoz » Fri Feb 11, 2011 5:39 pm

yoyoz Fri Feb 11, 2011 5:39 pm
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.
Desktop: Ubuntu 13.04 x64 - i7-3770K @ 3.5GHz - 32GB DDR3 - GTX670 2048MB
Laptop: Linux Mint 11 x64 - i7-2860QM @ 2.5GHz - 16GB DDR3 - Quadro 3000M 2GB
Software: NVidia 319.12 - Cuda 4.2.9 - Blender 2.66a
User avatar
yoyoz
Licensed Customer
Licensed Customer
 
Posts: 451
Joined: Sat Dec 25, 2010 9:59 am
Location: Belgium
Next

Return to Blender


Who is online

Users browsing this forum: ericquirino and 6 guests

Thu Apr 18, 2024 1:22 am [ UTC ]