Welcome! Ask and get answered - or just introduce yourself.
by mbark » Thu Sep 08, 2011 10:51 am
Hi I am not sure if this is the right place to post, but i am new  so bare with me. Is there a plugin or a way to import the camera's from 3ds Max into sketchup - and have them set up as scenes. They need to have the precise parameters regarding position (X,Y,Z), target (x,y,z), roll (tilt of the camera) and focal length. Also, is there a plugin where the scene and view can be controlled by using the exact same camera parameters - position (X,Y,Z), target (x,y,z), roll (tilt of the camera) and focal length. The goal is to use known camera parameters in sketchup. Thanks
-
mbark
-
- Posts: 7
- Joined: Thu Dec 16, 2010 1:54 pm
- Name: Mikkel
by mitcorb » Thu Sep 08, 2011 1:01 pm
My approach would be to use Sketchup command: Camera> Position Camera, and Camera> Field of View. I believe Jim Foltz has a plugin having to do with camera Roll. Use Window> Scenes to set up these positions and run the scenes sequentially with View> Animation> Play. Also, you can do your scene setups under View>, as I just rediscovered while checking the menus. Hope this helps. This is my approach since I do not use 3dsmax.
I take the slow, deliberate approach in my aimless wandering.
-

mitcorb
- Top SketchUcator
-
- Posts: 3429
- Joined: Sat Mar 22, 2008 2:32 pm
- Location: USA
- Name: Tim
- Operating system: Windows
- SketchUp version: 8
- License type: Free/Make
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by mbark » Thu Sep 08, 2011 2:41 pm
Thanks for the reply. I am though looking for a more precise way of setting up the camera. I have a well known camera with GPS measured position, and calculated target, so my pricision is down to centimeter lever. In Max one can set the camera parameters through number input, and it would be a script that can do that I am looking for.
-
mbark
-
- Posts: 7
- Joined: Thu Dec 16, 2010 1:54 pm
- Name: Mikkel
by TIG » Thu Sep 08, 2011 3:52 pm
If you can get some simple data out of the 3ds file you can then import that to make cameras and scene-tabs in the SKP. Can you export name,eye,target,up,fov as name, x,y,z, x,y,z, x,y,z, angle one per line into a txt/csv file then it can be done... BUT the question is can you export the data from 3ds so readily ? If you can then please post a file and I show you how to make new cameras from it...
TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by mbark » Thu Sep 08, 2011 4:12 pm
Sounds great. Actually i am using photomodeler - to calculate camera parameters, and it can deliver camera information i txt. I am not quite sure what the third coordinate is that you are refering to - the UP value. I can get the roll/til value which is in degrees - roll left or right. I can send a text file later today. Thanks!!
-
mbark
-
- Posts: 7
- Joined: Thu Dec 16, 2010 1:54 pm
- Name: Mikkel
by TIG » Thu Sep 08, 2011 4:22 pm
You could also look at the PageExIm script available from Smustard.com for just $5. It writes and reads '.sup' files in the format SceneName;(-107.49665, -174.644951, 91.64628);(201.036983, 201.920125, -22.396436);(0.144554343836861, 0.17642847255434, 0.973641122667915);true;30.0 plus other stuff about location and style etc... The 'true' part is for 'perspective'. Its main purpose is to duplicate scene-tab cameras between SKP files, but clearly if you make a .sup file out of 3ds it'd import it too [perhaps with some tweaks to the code etc which might be 'a step too far']...
TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Thu Sep 08, 2011 4:24 pm
The 'up' is a vector in Sketchup camera code to determine the 'roll' it could be simple to calculate that from an angle [from the vertical ?]...
TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by mbark » Thu Sep 08, 2011 4:29 pm
I will look into the script. Can you please explain what the following code describes (0.144554343836861, 0.17642847255434, 0.973641122667915) Is it camera tilt parameters?
-
mbark
-
- Posts: 7
- Joined: Thu Dec 16, 2010 1:54 pm
- Name: Mikkel
by TIG » Thu Sep 08, 2011 4:34 pm
That's the 'up' vector. For now forget the .sup file example, all I need to make a simple importer is a simple text file with name, xeye,yeye,zeye, xtarget,ytarget,ztarget, rollangle, fovangle I can then get the 'up' vector from all of that and make scene-tabs with cameras to suit...
TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by mbark » Thu Sep 08, 2011 10:50 pm
Hi again I have here two cameras that I would like get into sketchup. If you can explain the procedure and if there is a way to manipulate the cameras once in sketchup. The coordinates follow name, xeye,yeye,zeye, xtarget,ytarget,ztarget, rollangle, fovangle Camera_1 160,4 130,52 2,12 10,20 1,53 1,32 -1,52 26,89 Camera_2 2510,23 1263,25 2,56 12,25 4,89 2,39 2,56 16,96 Thanks!
-
mbark
-
- Posts: 7
- Joined: Thu Dec 16, 2010 1:54 pm
- Name: Mikkel
by TIG » Thu Sep 08, 2011 11:04 pm
What units are the xyz values ? meters/inches etc... I assume you are using a ',' as a decimal-separator and separate the values with a 'space' !
TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Thu Sep 08, 2011 11:13 pm
Here's a first pass... Copyright 2011 (c) TIG All Rights Reserved. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,WITHOUT LIMITATION,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ### Usage: Menu "View" > "ImportCamera..." Choose the file containing the camera data, in the following format: name,xeye,yeye,zeye,xtarget,ytarget,ztarget,rollangle,fovangle You can have one camera per line. The xyz values should be in 'inches'. The two angles should be in degrees. If the ",rollangle," is replaced with ",upx,upy,upz," a vector can be used. New scene-tabs are made, each called 'name', with cameras as specified. Edit the ICVSEP and ICDSEP constants below to suit your typical file's value-separator [' ',;:\t] and decimal.separator [. or ,]... ### Donations: info @ revitrev.org via PayPal.com Version: 1.0 20110908 First issue. ### TIGimportcamera.rb
Please, register (free) to access all the attachments on the forums. TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by mbark » Sat Sep 10, 2011 8:09 pm
Hi TIG
Sorry I havn't given a quick answer... The script works!!! Would it be hard work to thange the units from inches to meters? Also, would it be possible to make a input panal inside sketchup where the camera values could be entered and manipulated.
I appreciate your help very much, and i didn't think it was possible to get the same precision in sketchup as in 3ds Max - awsome!!
-
mbark
-
- Posts: 7
- Joined: Thu Dec 16, 2010 1:54 pm
- Name: Mikkel
by TIG » Sat Sep 10, 2011 9:45 pm
mbark wrote:Hi TIG Sorry I haven't given a quick answer... The script works!!! Would it be hard work to change the units from inches to meters? Also, would it be possible to make a input panel inside Sketchup where the camera values could be entered and manipulated. I appreciate your help very much, and i didn't think it was possible to get the same precision in Sketchup as in 3ds Max - awesome!! This is a version that assumes the units are in 'meters'...Copyright 2011 (c) TIG All Rights Reserved. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,INCLUDING,WITHOUT LIMITATION,THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ### Usage: Menu "View" > "ImportCamera..." Choose the file containing the camera data, in the following format: name,xeye,yeye,zeye,xtarget,ytarget,ztarget,rollangle,fovangle You can have one camera per line. The xyz values should be in 'METERS'. The two angles should be in degrees. If the ",rollangle," is replaced with ",upx,upy,upz," a vector can be used. New scene-tabs are made, each called 'name', with cameras as specified. Edit the ICVSEP and ICDSEP constants below to suit your typical file's value-separator [' ',;:\t] and decimal.separator [. or ,]... ### Donations: info @ revitrev.org via PayPal.com Version: 1.0 20110908 First issue. 1.1 20110910 METER version. TIGimportcamera.rb
Please, register (free) to access all the attachments on the forums. TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Sat Sep 10, 2011 9:54 pm
You can get a dialog that takes some input for camera data [but 'up' is a vector!] using this code [PC only, I'm afraid!] - Code: Select all
require 'sketchup.rb' UI.menu("Camera").add_item("Camera Info..."){Sketchup.send_action(10624)}unless file_loaded?(__FILE__) file_loaded(__FILE__)
copy+paste this code into a file called camera_info.rb in the Plugins folder and you get the new item in the menu after a restart...
TIG
-

TIG
- Global Moderator
-
- Posts: 14310
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by mbark » Sat Sep 10, 2011 10:09 pm
Thanks TIG I have been looking for a way to get my exact camera information from max to sketchup for ..... a long time. Thank you for your time and work.
-
mbark
-
- Posts: 7
- Joined: Thu Dec 16, 2010 1:54 pm
- Name: Mikkel
by eco » Sun Nov 06, 2011 10:11 pm
I was looking something like this but I have different camera coordinates information: xeye,yeye,zeye, xrotation,yrotation,zrotation, focallenght(mm), framesize(px)
-
eco
-
- Posts: 2
- Joined: Fri Sep 04, 2009 7:57 am
by lapx » Wed Feb 29, 2012 9:22 pm
pageexim is not working for me. Has anyone else had a problem getting it to work in su8? It makes the .sup file on export but when I try importing the .sup file it's doing nothing. It doesnt even give and error.
Thanks,
Lapx
-
lapx
-
- Posts: 576
- Joined: Wed Dec 05, 2007 11:14 pm
Return to Newbie Forum
|