PDA

View Full Version : sketchup camera



titane357
05-30-2008, 03:13 PM
hello :D
Is there a way to bring sketchup camera in layout ?
Max users can do it via 3ds(skp export camera) but I can't manage to bring sketchup POV.... :question:

Bog
06-01-2008, 11:30 AM
Your question has been forwarded to the relevant sentience, and we aim to let you know soon.

titane357
06-02-2008, 04:32 AM
Thanks.
I dont want to hijack my own thread but can you explain a little bit what is your Xaml Converters for ? :D

Bog
06-02-2008, 04:37 AM
Turns out Regularfry's pretty busy this week (he whipped up a Sketchup to LightWave converter a while back, which is why I piped up in the first place).

XAML is the file-format for Windows Presentation Foundation, the native 3D format for Vista and XP (with the right bits installed in XP). It's a pretty nifty realtime 3D format, and more people seem to be interested in making 3D user-interface or website elements these days, so we thought we'd sell the converter we had to write for another job ;)

So you convert your Sketchup structure to LightWave format, set up lights and an animation, then export it to XAML for in-browser 3D playback. Or if you were a keen coder, you could set up look-and-walk controls and have your scene interactive. Fun!

vfxwizard
06-02-2008, 09:25 AM
Is there a way to bring sketchup camera in layout ?


The following is not a polished solution, however it works.

In Sketchup open Window > Ruby Console .

Paste in the console's input box the following line:


model = Sketchup.active_model view = model.active_view camera = view.camera

Press enter, Sketchup should confirm the action with a code and no error warnings.

Now copy and paste into the console the following lines, pressing enter after each one:


puts camera.eye

puts camera.target

puts camera.fov

each one will print some values which are the camera position, the target position (you'll assign them to a Null and point LW's camera to it) and the field of view.

For position values, swap Y and Z values when copying them to LW. Assign the Fov either to the horizontal or vertical FOV for LW's camera, depending on which axis is longer in the Sketchup scene. I'm no Sketchup expert, but so far the match with the exported camera has been pixel perfect.

It should be easy to adapt this to make a LWS scene exporter but even doing this with copy/paste it takes less than 1 minute.

Just let me know if you need any further clarification -hope it's useful.

titane357
06-02-2008, 03:42 PM
Seems to be a good trick ! Thanks. :D

bjornkn
06-02-2008, 04:11 PM
There's also a few Ruby scripts on http://www.crai.archi.fr/RubyLibraryDepot/Ruby/em_cam_page.htm that extracts camera positions/parameters or draw lines (with direction vector) between cameras etc.
And then there are the Film&Stage tools too, which may be helpful too, as it places visible cameras into the model.

titane357
06-03-2008, 02:04 PM
Thanks bjornkn, that's works fine. FOV is vertival FOV but don't match EXACTLY LW cam (need a little adjustement :D)

vfxwizard
06-04-2008, 04:08 AM
FOV is vertival FOV but don't match EXACTLY LW cam (need a little adjustement :D)

Regarding my post you'r right, FOV is always vertical, sorry about that -lack of coffee.

Anyway, I'm almost done with a SU camera exporter. Nothing fancy, it just creates an lws and then you load from scene the target and camera, works only on perspective cameras. Mainly useful for photomatching.

But I'd like to understand why you don't get an exact match. Is the image aspect ratio the same in LW and SU?

Can you post an example of the adjustment needed? Or a skp file? Before releasing I'd like to triple check and be sure it performs as expected.

titane357
06-04-2008, 06:19 AM
"I'd like to understand why you don't get an exact match"
me too...
I tried to export my scene problem, but when I remake it, all is fine ....

Just admit that I'm a little bit stupid sometimes :D

No, no problems.

Hope to use soon your exporter :thumbsup: (free ?)

vfxwizard
06-04-2008, 07:10 AM
Thanks for checking, will post the exporter soon, free of course - it's really basic.

titane357
06-04-2008, 07:33 AM
Thanks in advance !

vfxwizard
06-07-2008, 04:04 AM
This is a minimal Sketchup camera exporter.

Unzip, copy the "exportLWcamera.rb" file into Sketchup's "Plugins" directory. Upon loading SU a new menu item appears in camera menu: Camera to LWS. Use this to generate a temporary .lws that holds the matched camera.

Load items from the generated scene into Layout selecting Objects>CamTarget and Cameras>SketchupCamera. That's all.

Please note: to obtain a proper match the image aspect ratio in SU and LW must be the same, this is not handled by the exporter. Also, the exporter assumes meters as units for both SU and LW. Will look at those as time permits.

Unsupported freeware, but please report any issue. Have fun!

titane357
06-07-2008, 11:23 AM
:cry::cry::cry::cry::cry::cry: it is a 9.5 plug ?

titane357
06-07-2008, 11:42 AM
OK, no problem : I just change "LWSC 5 " with "LWSC 4" and works fine !! :D

titane357
06-07-2008, 11:52 AM
BUt it seems that bank camera infos are not ok ?!?

vfxwizard
06-07-2008, 12:55 PM
BUt it seems that bank camera infos are not ok ?!?

Sorry for the LWSC numbering, I'll update it (and fix another quirk with older versions) but before uploading another version I'd like to see a .skp file that is not converted correctly so I can check. Please, check your PM.

vfxwizard
06-11-2008, 06:34 AM
Here is a small update to the Sketchup to LW Camera exporter.

This version fixes the scene numbering, so items can be loaded in older LW versions, and adds export for camera bank angle.

Many thanks to Titane for reporting and testing with camera angles I would have never tought about. :)

insignet
06-11-2008, 07:26 AM
vfxwizrd...

Thanks for your work on this. I've tested it out and its worked for me (Mac) I'll try out this latest version also and give you feedback. I like this because by using the Photomatch in SU and exporting that matched camera setup to LW you've got a very good starting point for set extension work inside of LW... thanks again!!

vfxwizard
06-12-2008, 06:43 AM
using the Photomatch in SU and exporting that matched camera setup to LW you've got a very good starting point for set extension work inside of LW...

Yes, indeed, SU's Photomatch makes set extension a snap -that's exactly what got me interested in Sketchup. As soon as I find a way to access the photomatched image in SU, the exporter will be able to setup LW's camera with backdrop and image size. Will post here when (if...) it's done.

titane357
06-12-2008, 09:14 AM
Can't wait :D