SketchUcation Premium Membership

 

 

[Plugin] CameraControls

[Plugin] CameraControls

Postby RickW » Thu Aug 06, 2009 11:06 pm

Announcing CameraControls! (PC only for now - working on the Mac version)

CameraControls provides tighter user control over camera positioning by providing sliders and direct numeric entry for pan, tilt, and roll, through a webDialog.

The dialog also responds real-time to changes in the view (activating a scene tab or using the SketchUp-native camera manipulation tools).

To use CameraControls, select Camera Controls from the Camera menu in SketchUp. CameraControls is also compatible with Organizer.
Last edited by RickW on Sat Aug 08, 2009 6:12 am, edited 1 time in total.
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby Chris Fullmer » Thu Aug 06, 2009 11:39 pm

Cool, thanks Rick. I'll be looking at it shortly!

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6753
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby autarchos » Fri Aug 07, 2009 2:46 am

this is fantastic! (i was just looking for a script like this yesterday in fact.) so i know it will come in handy on future projects. many thanks.

pete
autarchos
 
Posts: 47
Joined: Sat Nov 15, 2008 6:23 pm
Location: USA
Name: Pete

Re: [Plugin] CameraControls

Postby Chris Fullmer » Fri Aug 07, 2009 3:43 am

Hey Rick, its not working for me. It just gives constant errors to the console. This is the first of them

Error: #<NoMethodError: undefined method `atan' for #<CameraControls:0x8e8fb98>>
C:/Program Files/Google/Google SketchUp 7/Plugins/cameracontrols.rb:153:in `set_angles'
C:/Program Files/Google/Google SketchUp 7/Plugins/cameracontrols.rb:216:in `onViewChanged'
C:/Program Files/Google/Google SketchUp 7/Plugins/cameracontrols.rb:153

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6753
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby TIG » Fri Aug 07, 2009 1:33 pm

Chris Fullmer wrote:...its not working for me.:
Error: #<NoMethodError: undefined method `atan' for #<CameraControls:0x8e8fb98>>
C:/Program Files/Google/Google SketchUp 7/Plugins/cameracontrols.rb:153:in `set_angles'

Chris:
Strangely it works fine for me - although I can't find the script that's defining 'atan' as a Math function !
Try adding Math:: in front of atan in line 153 - I did and it still works for me - so it might then work for you ?

Also Rick: if you run the tool in 'parallel projection' then the 'fov' returns errors at lines 72/97/121 [linked to 79/104/139 as the optional 'perspective' and 'fov' are NOT applicable to pp] - it all shows in the Console - these can easily be trapped in the 3 locations... I have already 'fixed' mine...
Code: Select all
fov = @camera.fov if perspective
###...
if perspective
   @view.camera = Sketchup::Camera.new(@eye,newtarget,newup,perspective,fov)
else
   @view.camera = Sketchup::Camera.new(@eye,newtarget,newup)
end#if


Thanks for another great tool by the way... :D
TIG
User avatar
TIG
Global Moderator
 
Posts: 14307
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

Re: [Plugin] CameraControls

Postby RickW » Fri Aug 07, 2009 4:34 pm

TIG: Thanks for the note - I forgot about parallel projection :oops:
I'll also add Math::atan to (hopefully) fix Chris's problem.

[EDIT] New version uploaded to Smustard
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby Khai » Fri Aug 07, 2009 5:38 pm

erm there's something on the camera controls page that kills my Firefox. something about a C library not loading correctly.
Khai
 
Posts: 548
Joined: Sun Mar 15, 2009 4:53 pm
Location: Onboard his TARDIS
Name: Khai

Re: [Plugin] CameraControls

Postby Chris Fullmer » Fri Aug 07, 2009 5:51 pm

TIG wrote:Try adding Math:: in front of atan in line 153


Ding!Ding!Ding!Ding!

We have a winner! That solved it all for me Tig, thanks!

Works great now Rick, very cool!

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6753
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby Jim » Fri Aug 07, 2009 6:02 pm

Rick,

Did you write the Javascript slider?
Jim
Global Moderator
 
Posts: 4126
Joined: Mon Nov 12, 2007 10:13 pm
Location: NEOH
Name: Jim
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] CameraControls

Postby RickW » Fri Aug 07, 2009 6:52 pm

Jim wrote:Did you write the Javascript slider?

Yep. Thought about an out-of-the-box thing, but decided to go custom.
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby mike d » Fri Aug 07, 2009 6:53 pm

thanks rick
The grass is always GREENER on the roof.
mike d
 
Posts: 242
Joined: Mon Oct 22, 2007 1:30 pm

Re: [Plugin] CameraControls

Postby RickW » Fri Aug 07, 2009 7:41 pm

Khai wrote:erm there's something on the camera controls page that kills my Firefox. something about a C library not loading correctly.

Which page? The Smustard page or the webDialog?
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby Khai » Fri Aug 07, 2009 8:09 pm

RickW wrote:
Khai wrote:erm there's something on the camera controls page that kills my Firefox. something about a C library not loading correctly.

Which page? The Smustard page or the webDialog?



the Smustard page
I had to use Chrome to get to it in the end...Fire fox complains about the loading and locks out.
Khai
 
Posts: 548
Joined: Sun Mar 15, 2009 4:53 pm
Location: Onboard his TARDIS
Name: Khai

Re: [Plugin] CameraControls

Postby Chris Fullmer » Fri Aug 07, 2009 8:20 pm

My FireFox goes in just fine. I don't have any of those ad removel apps installed, just vanilla FireFox.

version 3.0.13
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6753
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby Khai » Fri Aug 07, 2009 8:39 pm

actually it wasn't an ad removal problem at all.. (btw the Firefox version is 3.5.2 the latest)

it's Videolan, my video player. it's having a problem with the embedded video on that page.. working on it..
Khai
 
Posts: 548
Joined: Sun Mar 15, 2009 4:53 pm
Location: Onboard his TARDIS
Name: Khai

Re: [Plugin] CameraControls

Postby bagatelo » Fri Aug 07, 2009 11:38 pm

Thank you very much for the tool! I loved.
A thing that could be implemented would be the possibility to arise or to go down the camera, to change the zoom, or to alter the vision field, or Pan by slide.
User avatar
bagatelo
 
Posts: 243
Joined: Wed Apr 16, 2008 4:55 pm
Location: São José, Santa Catarina, Brasil
Name: Alex Henrique
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

Re: [Plugin] CameraControls

Postby RickW » Sat Aug 08, 2009 1:02 am

Thanks for the suggestions. I'll see what might work.
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby RickW » Sat Aug 08, 2009 1:06 am

Khai wrote:actually it wasn't an ad removal problem at all.. (btw the Firefox version is 3.5.2 the latest)

it's Videolan, my video player. it's having a problem with the embedded video on that page.. working on it..

Ah, sorry about that. I'll see about embedding a YouTube video instead.
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby JClements » Sat Aug 08, 2009 1:46 am

Nice job Rick!

I discovered a few things, not sure if they are bugs or not. See attached file.

Could you have vertical lines (or tick marks) at degree intervals (ie., 45, 90, 130, 180, -45, -90, etc.) in the dialog background so you can align the sliders to them (or perhaps snap to them?)?

_________________________________________________________________

Could you have a Camera Dialog devoted solely for "Dolley" movements (moving camera along a striaght path) which would perform the following:
1- Move along each of the colored axis (including user defined axis if possible) similar to the script you had for doing tutorials that jumb to "Iso snap-shots" from Scene to Scene.

2- Move left to right [Truck] and top [Pedestol]to bottom across the screen.

The user could input distance values for the DOLLEYs.

[UPDATE: Pardon me if I am not using the correct terminolgy here; it seems like there are mixed terminologies between applications (SU Pan tool does what I'm describing here, and SU's Look Around is similar to the PAN in your dialog). :?:]
Please, register (free) to access all the attachments on the forums.
Last edited by JClements on Sat Aug 08, 2009 8:02 pm, edited 5 times in total.
John
Illustrator
Beaverton, Oregon
User avatar
JClements
Premium Member
Premium Member
 
Posts: 774
Joined: Wed Nov 14, 2007 4:32 pm
Location: Portland/Beaverton, Oregon
Name: JClements
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Intermediate

Re: [Plugin] CameraControls

Postby RickW » Sat Aug 08, 2009 6:06 am

John,

The 90-degree issue is (I think) an internal SU thing due to the desire of the camera to not look straight down - you can see this when manually orbiting, and I suspect it carries over to dynamically moving the camera in Ruby. Either that, or it's a by-product of my (necessary) assumption that when looking straight down, the positive y-axis is zero roll. Not sure.

As for the second issue you described in your model, I don't quite understand the issue - I didn't have any problem getting 90 degrees for the magenta(?) and green boxes. I'll try to get with you later to get more input.
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby Pixero » Sat Aug 08, 2009 11:49 am

I cant get it to work.
I get a window with three sliders but nothing happens when I drag them.
Should there be more things visible in that window?
If not I suggest you make it a lot smaller.
It takes up a great deal of space IMHO.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1297
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby Chris Fullmer » Sat Aug 08, 2009 5:39 pm

Ahh yes, agreed. The window initialy starts quite large for just the three sliders.

Jan, is it giving errors to the webconsole? I had a problem described earlier in the thread where the atan function needed to be specified as Math::atan on line 153. Did you already fix that one Rick?

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6753
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby Pixero » Sat Aug 08, 2009 7:21 pm

Ok. I added the Math::atan and now it works. Still the window is huge! :shock:
I really like the way it works in realtime but please make the window much more compact.
It would also be nice with a small reset button for each slider.

Also would it be possible to have these as well:
Truck (left/right)
Pedestal (up/down)
Dolly (in/out)

For these maybe some logarithmic/non linear curve for the slider so when sliding a little it would be small values and when sliding towards the extremes it would be larger/faster movement.
Just a thought.
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1297
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby Chris Fullmer » Sat Aug 08, 2009 8:02 pm

Interesting, on my work computer, the window was HUGE also. But on my home computer, it was tiny tiny. Resized as absolutely small as possible, I almost didn't see it because it just shows the red x, minimize and maximize buttons.

You can manually resize it though, which works fine. And for me it remembers its size and location between SU sessions. So try to resize it and see if SU rememeber's its size.

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6753
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] CameraControls

Postby JClements » Sat Aug 08, 2009 8:09 pm

For these maybe some logarithmic/non linear curve for the slider so when sliding a little it would be small values and when sliding towards the extremes it would be larger/faster movement.
Just a thought.


Good suggestion, Pixero.
Moving sliders with the mouse with any accuracy has often been an issue for me (ie., in Goggle Earth dialogs).

Perhaps Arrow keys could be active. Shift-Arrow = large movement, Ctrl-Arrow small movement, and what I have available in a 2D app for closeup work, Alt-Arrow = One Pixel no matter what the zoom level is. Getting a bit complicated isn't it. :roll:
John
Illustrator
Beaverton, Oregon
User avatar
JClements
Premium Member
Premium Member
 
Posts: 774
Joined: Wed Nov 14, 2007 4:32 pm
Location: Portland/Beaverton, Oregon
Name: JClements
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Intermediate

Re: [Plugin] CameraControls

Postby bagatelo » Sat Aug 08, 2009 8:27 pm

Pixero wrote:Ok. I added the Math::atan and now it works. Still the window is huge! :shock:
I really like the way it works in realtime but please make the window much more compact.
It would also be nice with a small reset button for each slider.

Also would it be possible to have these as well:
Truck (left/right)
Pedestal (up/down)
Dolly (in/out)
.


I like the idea, and if is possible to store some values, is fantastic.
User avatar
bagatelo
 
Posts: 243
Joined: Wed Apr 16, 2008 4:55 pm
Location: São José, Santa Catarina, Brasil
Name: Alex Henrique
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: interior design
Level of SketchUp: Intermediate

Re: [Plugin] CameraControls

Postby RickW » Mon Aug 10, 2009 6:06 pm

Pixero: Not sure when you downloaded, but the current download has the corrected script (though I see you did get yours fixed).

John: Yes, I was using more "conventional" (as far as I could find) terminology for camera motion, rather than corresponding SU terminology. Also, I added text entry so you don't have to rely solely on slider accuracy - if you get it close and find the approximate angle, you can type the one you want.

All: I can add a preset size for the window to get it a bit smaller at startup, though as noted above, it can be resized and should remember that size in the future. Also, I'm noting the requests, and will see what can be added.
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby JClements » Mon Aug 10, 2009 7:57 pm

Thanks for the reply, Rick.

One thing. I did notice that you can NOT "swipe" the values in the dialog; you have to click and use the Delete Key or Backspace Key first, then type in new values.

Any chance to allow "swiping"?
Last edited by JClements on Wed Aug 12, 2009 4:22 pm, edited 1 time in total.
John
Illustrator
Beaverton, Oregon
User avatar
JClements
Premium Member
Premium Member
 
Posts: 774
Joined: Wed Nov 14, 2007 4:32 pm
Location: Portland/Beaverton, Oregon
Name: JClements
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: illustration, cartoons
Level of SketchUp: Intermediate

Re: [Plugin] CameraControls

Postby RickW » Mon Aug 10, 2009 8:20 pm

There are some challenges there with JavaScript/HTML in where I allow selection. I'll try to clean that up if possible.
RickW
 
Posts: 770
Joined: Fri Nov 16, 2007 6:38 am
Location: Wichita, KS
Name: Rick Wilson

Re: [Plugin] CameraControls

Postby lexmonteiro » Wed Aug 12, 2009 3:39 pm

Thank you RickW!
Works fine here!
lexmonteiro
 
Posts: 21
Joined: Thu Feb 14, 2008 1:19 pm

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Not a Premium Member yet? Check out the great time-limited deal we are offering.

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

Who is online

Users browsing this forum: Arc, CorpusDP, krostah, Lusitano, reymond and 6 guests