SketchUp and KeyShot FOV and Focal Length don't match
-
If what you're asking is if I used the Advanced Camera, I believe so. I did actually use an AC for export as shown in the first image above (see the camera settings values in dot 1).
That said, I had installed some AC plugin and I have now about 20 different camera 'types' I can set. I suppose this does not matter. I am setting the SU window to 1600 x 900 pixels and the Keyshot is set to 1280 x 720 which is the same 16:9 aspect ratio. Let me know if there's anything I need to send or do, or if I'm miscommunicating anything.
I can try modifying the plugin code.
Thanks for your help.
-
@chippwalters said:
If what you're asking is if I used the Advanced Camera, I believe so. I did actually use an AC for export as shown in the first image above (see the camera settings values in dot 1).
the setting AC tools prints on the screen are rubbish, it could easily supply better info about the 'screen'...
@unknownuser said:
...I am setting the SU window to 1600 x 900 pixels
are you using my plugin for that?
@unknownuser said:
and the Keyshot is set to 1280 x 720 which is the same 16:9 aspect ratio...
is that not auto from the SU size?
-
Yep, using your fine plugin to set the screen window resolution. Thanks!
I don't know, maybe the 1280x720 is set from the plugin. I typically use the same fixed size as my default, but I can certainly check and let you know.
-
can you try a simple cube in a different sized SU window and see if KS adjusts...
-
Nope, KeyShot does not adjust. It always defaults to the last screen setting which KS was left in.
Interesingly, the CAMERA shows up as an object in KeyShot. Here's a possible workaround-- though certainly NOT perfect.See below:
- Camera Object in KS
- Camera Object shown in SU Camera view (inside of cube) showing the 'bounds' of the camera cone.
- Camera Object shown in SU showing 'bounds' of camera cone
- First change FOV so that the edges of the 'bounds' extend to the horizontal borders of the KS camera window.
- Set aspect ratio so that it matches the SU aspect ratio..
Still need to test:
Different FOVs and Different SU aspect ratio other than square. -
your image are to small for me to read, when I enlarge them the text is to distorted...
however, you want to see if this works, without the workaround?
download this
in Ruby Consoleload ~/Downloads/keyShotExporter.rb
then test a correctly size window export...
may work...
-
I'll take a look at the plugin and let you know.
Even though the image is small, I believe the details aren't important other than the overall notion that one can manually adjust the FOV using the imported SU Camera Geometry Object to get 'close.'
Here's the same test using a different FOV and aspect ratio (green is because it's using your plugin and is perfect 16:9).
- Green 16:9 Aspect Ratio with different FOV than first test.
- Imported into Keyshot. Border is indicated.
- Adjust Field of View to match border then render. Looks very close.
-
@driven said:
however, you want to see if this works, without the workaround?
[attachment=0:3036vr1q]<!-- ia0 -->keyShotExporter.rb<!-- ia0 -->[/attachment:3036vr1q]
in Ruby Consoleload ~/Downloads/keyShotExporter.rb
then test a correctly size window export...
may work...
Thanks for the help! When I run it I get this:
> load ~/Downloads/keyShotExporter.rb Error; #<SyntaxError; <main>; unknown regexp options - kyShtEprtr> SketchUp;1;in `eval'
-
Yes, I contacted them. They don't really have an answer. They say it works with SU15 but the camera transfer doesn't work right. I was hoping to try and figure out a manual way to go from one setting to the other. I know it's possible to do it manually, I just need to find the right 'formula' and while I posted this same on their forum (and support ticket), I doubt there's much if any answer there.
-
I forgot the quotes ""
load "~/Downloads/keyShotExporter.rb"
-
Sorry to be a pain. But now, when I copy/paste it in I receive:
> load "~/Downloads/keyShotExporter.rb" /Users/chippwalters/Downloads/keyShotExporter.rb;35; warning; already initialized constant KeyShot5;;Set /Users/chippwalters/Library/Application Support/SketchUp 2015/SketchUp/Plugins/luxion_keyshot5/keyShotExporter.rb;35; warning; previous definition of Set was here /Users/chippwalters/Downloads/keyShotExporter.rb;316; warning; already initialized constant KeyShot5;;TEXTURE_PATH /Users/chippwalters/Library/Application Support/SketchUp 2015/SketchUp/Plugins/luxion_keyshot5/keyShotExporter.rb;309; warning; previous definition of TEXTURE_PATH was here /Users/chippwalters/Downloads/keyShotExporter.rb;319; warning; already initialized constant KeyShot5;;VERSION /Users/chippwalters/Library/Application Support/SketchUp 2015/SketchUp/Plugins/luxion_keyshot5/keyShotExporter.rb;312; warning; previous definition of VERSION was here true
Not sure what to do...
-
Those warnings occur when you reload a Ruby that defines constants in its code. They won't happen if the code is written to allow for this possibility. However, in most cases the warnings have no effect and can safely be ignored. The final line saying "true" is your indicator that the load succeeded.
-
So then, what do I do next? Use the Keyshot plugin button to export the file? Will it use your script or it's script?
-
steve beat me to it but hi ho...
there just warnings, because we overwrite the existing one for the SU session...
the advantage of testing this way is it's immediate and if it doesn't work you just trash it...
the old one will load again after a restart...if it does work, you can move it to the folder and rename the old one or trash it...
-
@chippwalters said:
So then, what do I do next? Use the Keyshot plugin button to export the file? Will it use your script or it's script?
it will use the last loaded script, i.e. my version...
-
Thanks.
I did what you said, but the results weren't what was expected:
- ORIGINAL in SU (Focal Lenght 42mm, FOV 46.8 degrees)
- Using your plugin code. Note the FOV is different, but still not correct.
- ORIGINAL KS Plugin. Note the FOV is also different.
-
you want post the skp [or PM...]
-
Here's the SKP
https://dl.dropboxusercontent.com/u/3788438/3D/test.skp -
btw, so you know...
the only thing I change was a 'back up' for a SU shortfall
if cam_aspect == 0.0 cam_aspect = width/height.to_f.round(3) end
I you don't have a Advanced camera set, SU sets the aspect ratio to 0.0, which is crazy...
this bit of code just tell KS to use 16:9 in that circumstance...I'll have a look at your skp...
-
@driven said:
btw, so you know...
the only thing I change was a 'back up' for a SU shortfall
if cam_aspect == 0.0 > cam_aspect = width/height.to_f.round(3) > end
I you don't have a Advanced camera set, SU sets the aspect ratio to 0.0, which is crazy...
this bit of code just tell KS to use 16:9 in that circumstance...I'll have a look at your skp...
Thanks again for your generous help.
I did look at your Ruby and saw that, and was wondering if there was anything else. I've written some Python scripts for Vue-Infinite, but don't know much about SU's api-- other than other plugins have figured this out-- and KS hasn't. I believe they first mentioned to me SU didn't have the correct api hooks to get an accurate camera from. That's when I mentioned all the other renderers have figured it out. They said they would take a look at it. Last time they said they'd work on the SU plugin it took them 2 years.
Too bad Thea and Vray are so damn slow compared to Keyshot. Of course, they both can do a lot more too!
Fwiw, here's an interior shot modeled in SU, and rendered in KS @ 1920x1080. Took a bit under 3 hours on my 2013 i7 iMac. Anyone think Thea can do that? If so, I have a license and can try. My early tests told me no, but then I'm not an accomplished Thea user.
Advertisement