[Plugin] Floating Camera 1.0 public beta 1.4

[Plugin] Floating Camera 1.0 public beta 1.4

Postby bentleykfrog » Fri Aug 26, 2011 4:05 pm

This plugin allows you to navigate through your Sketchup model as you would normally do in a 3d video game environment.

I thought I might release a public beta of Floating Camera just to test the waters before an end-of-year official release. Feel free to try this plugin out, all instructions are included in the User's Guide pdf. If there are any issues or if you've got any suggestions, post it to this forum. I'll keep an eye on it. Enjoy!! ;)

Ohh, just a quick note, if you experience significant frame rate issues, try setting the face style to wireframe. The intersect and camera eye height features will still work, and hopefully you'll notice an improvement in performance.

-niall

Known Issues
  • Unit conversion is working incorrectly. This will be fixed in the next release. As a workaround for 1.4, switch your model units to millimeters:
    Instructions
    Load up your sketchup model and select the menu 'Window' and select 'Model Info'
    select 'units' and change the 'Format' to 'Decimal' and 'Millimeters'.

EDIT: Beta 1.4x made compatible with SUp >= v2014 [TIG 20150606]

Beta 1.4 Update
Fixed framerate issue with collision or eye height enabled by removing the sane distance test. Sorry for the quick updates.

Beta 1.3 Update
Removed some very bad scripting that has more than doubled the framerate. Significantly bad framerate was caused by the presence of .start_operation() & .abort_operation.

Beta 1.2 Update
There's an issue in Sketchup 7 when enabling collision detection that causes Floating Camera to crash. This issue isn't present in Sketchup 8 or later. This update fixes this issue.

GET THE LATEST VERSION FROM THE 'PLUGINSTORE'

Download

0
Last edited by bentleykfrog on Sat Oct 15, 2011 2:40 am, edited 7 times in total.

bentleykfrog 
 

Re: Floating Camera 1.0 public beta 1

Postby Ben Ritter » Fri Aug 26, 2011 5:32 pm

Thank you very much. I will give it a whirl.
0

Ben Ritter 
 

Re: Floating Camera 1.0 public beta 1

Postby Pixero » Fri Aug 26, 2011 5:43 pm

Thanks will test this ASAP. :thumb:
0
User avatar
Pixero 
Premium Member
Premium Member
 

Re: Floating Camera 1.0 public beta 1

Postby Pixero » Sat Aug 27, 2011 6:18 am

First impression is great.
So far the only suggestion I have is some control over pan speed/sensitivity.
Great work!
0
User avatar
Pixero 
Premium Member
Premium Member
 

Re: Floating Camera 1.0 public beta 1

Postby bentleykfrog » Sat Aug 27, 2011 2:28 pm

Pixero wrote:First impression is great.
So far the only suggestion I have is some control over pan speed/sensitivity.
Great work!


hrmm, do you mean something like rotational friction? I'm probably brutalising the use of certain words here. You can change the pan speed by changing the degrees value in the settings dialog. Hrmm maybe a scale like the Inertia (Friction) scale would be useful here?
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1

Postby bentleykfrog » Mon Aug 29, 2011 3:59 pm

I've posted a small update that fixes a bug that crashed Floatng Camera when enabling collision detection in Sketchup 7. See the main post for the updated plugin.

A few ideas for the next release:

I'm working on some MotionInJoy/XPadder game controller profiles for the PC, and some ControllerMate game controller profiles for the Mac for the next release. These will allow you to use the PS3 Sixaxis & XBOX 360 controllers with Floating Camera.

Hrmm, there might be a good reason for having different speeds on up and down movement, compared with forward, back, left & right. The idea being that since these movements are controlled by keyboard inputs, there's only an on/off input, its not really analog. This can lead to very jumpy movements as you start to change direction, or you want to change direction gradually.

AFAIK, sketchup only has one analog input available: mouse movement, and this can only be used for two-dimensional movement. I know that they've got the spacenavigator working in sketchup which suggests its possible to have more than one analog input. Is there a workaround for analog input in C++?

Also, I've noticed that the framerate for sketchup animations is direly slow when compared to the frame rate of the orbit tool. This seems to suggest that faster frame rates are possible and that running an animation is doing something different to the orbit tool that's slowing down the frame rate. I've tested both animation & UI.start_timer; view.show_frame, view.invalidate & view.refresh to little to no effect on the frame rate. Has anyone got any suggestions or know of any undocumented techniques that might help with this?

The physics controlling camera height when eye height is enabled needs some tweaking too. The problem is that when you 'jump' off a very high surface in Sketchup we've got to stop the camera from going through the ground, so the up & down acceleration when eye height is enabled is alot more rigid as you've probably noticed! We've also got to stop harmonics so the camera will eventually level out at the desired eye height rather than bouncing up and down all the time.

Hopefully all these problems will be ironed out soon.

thanks

-niall
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.2

Postby bentleykfrog » Tue Aug 30, 2011 3:19 pm

bentleykfrog wrote:Also, I've noticed that the framerate for sketchup animations is direly slow when compared to the frame rate of the orbit tool. This seems to suggest that faster frame rates are possible and that running an animation is doing something different to the orbit tool that's slowing down the frame rate. I've tested both animation & UI.start_timer; view.show_frame, view.invalidate & view.refresh to little to no effect on the frame rate. Has anyone got any suggestions or know of any undocumented techniques that might help with this?


Ahah!, figured out my mistake. I wrongly thought that having Sketchup.active_model.start_operation() then a Sketchup.active_model.abort_operation would improve performance. I've removed both of these and the frame rate has more than doubled! Lucky this is a beta. Updated the main post with the fixed beta (v1.3).
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby bentleykfrog » Tue Aug 30, 2011 4:06 pm

In pb 1.4 I've fixed framerate issue with collision or eye height enabled by removing the sane distance test. Jumping off large distances still sends you though the ground though, so a bit more tweaking is required.

Sorry for the quick updates for those that downloaded 1.3.
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby Oneguy » Tue Sep 20, 2011 6:37 am

Hmm, a bit of a problem here,
Firstly, thanks for this plugin, I really need something like this for some reason, the camera is stuck. When i press one of the arrow buttons, the speed goes up but the camera just shake in the same place, any ideas?
Im using SU 8.0.4811 pro

Thanks
0

Oneguy 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby bentleykfrog » Wed Sep 21, 2011 4:45 pm

Oneguy wrote:Hmm, a bit of a problem here,
Firstly, thanks for this plugin, I really need something like this for some reason, the camera is stuck. When i press one of the arrow buttons, the speed goes up but the camera just shake in the same place, any ideas?
Im using SU 8.0.4811 pro

Thanks



Hrmm, i'm not sure about this one, its very weird behaviour. It could be a problem with the key assignments. Can you hold down the left mouse button to look around? If so, the plugin should be working and I'm 99% sure its a problem with the keyboard. To check this can you download this tool: sites.google.com/site/jimfoltz/sketchup/my-sketchup-plugins/key-code-tool

Instructions:
copy jf_KeyTool.tb to the Sketchup Plugins folder
start up Sketchup and select the menu 'Window' then select 'Ruby Console' (The ruby console window should open, leave it open)
now select the menu 'Plugins' then select 'Key Codes'
click inside the sketchup window and press the up arrow, down arrow, left arrow and right arrow, then press the space bar
copy the text from the ruby console inbetween the line 'Key Tool Activated' and 'Key Tool Deactivated' then put this text in a reply message on this forum so I can have a peek.

Also, can you tell me your operating system and version?
ohhh and finally, when you say that the speed goes up, what is the highest it goes to?

Thanks for reporting this Oneguy, hopefully I can find out whats causing the problem for you.

-niall
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby Oneguy » Thu Sep 22, 2011 8:36 am

Ok, lets see,

I can look around with the left mouse button.
I'm using windows 7 ultimate.
It's kinda hard to measure because the speed keeps going up and down very fast but I believe somewhere between 7-8kmph
And finally, here's the key tool from the ruby console:

Key Tool Activated.
onKeyDown: Key code: 38 ( VK_UP )
onKeyUp : Key code: 38 ( VK_UP )
onKeyDown: Key code: 37 ( VK_LEFT )
onKeyUp : Key code: 37 ( VK_LEFT )
onKeyDown: Key code: 40 ( VK_DOWN )
onKeyUp : Key code: 40 ( VK_DOWN )
onKeyDown: Key code: 39 ( VK_RIGHT )
onKeyUp : Key code: 39 ( VK_RIGHT )
Key Tool Deactivated.

Thank you for the quick response and for your work.



bentleykfrog wrote:
Oneguy wrote:Hmm, a bit of a problem here,
Firstly, thanks for this plugin, I really need something like this for some reason, the camera is stuck. When i press one of the arrow buttons, the speed goes up but the camera just shake in the same place, any ideas?
Im using SU 8.0.4811 pro

Thanks



Hrmm, i'm not sure about this one, its very weird behaviour. It could be a problem with the key assignments. Can you hold down the left mouse button to look around? If so, the plugin should be working and I'm 99% sure its a problem with the keyboard. To check this can you download this tool: sites.google.com/site/jimfoltz/sketchup/my-sketchup-plugins/key-code-tool

Instructions:
copy jf_KeyTool.tb to the Sketchup Plugins folder
start up Sketchup and select the menu 'Window' then select 'Ruby Console' (The ruby console window should open, leave it open)
now select the menu 'Plugins' then select 'Key Codes'
click inside the sketchup window and press the up arrow, down arrow, left arrow and right arrow, then press the space bar
copy the text from the ruby console inbetween the line 'Key Tool Activated' and 'Key Tool Deactivated' then put this text in a reply message on this forum so I can have a peek.

Also, can you tell me your operating system and version?
ohhh and finally, when you say that the speed goes up, what is the highest it goes to?

Thanks for reporting this Oneguy, hopefully I can find out whats causing the problem for you.

-niall
0

Oneguy 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby bentleykfrog » Sat Sep 24, 2011 5:20 am

Oneguy wrote:Ok, lets see,

I can look around with the left mouse button.
I'm using windows 7 ultimate.
It's kinda hard to measure because the speed keeps going up and down very fast but I believe somewhere between 7-8kmph
And finally, here's the key tool from the ruby console:

Key Tool Activated.
onKeyDown: Key code: 38 ( VK_UP )
onKeyUp : Key code: 38 ( VK_UP )
onKeyDown: Key code: 37 ( VK_LEFT )
onKeyUp : Key code: 37 ( VK_LEFT )
onKeyDown: Key code: 40 ( VK_DOWN )
onKeyUp : Key code: 40 ( VK_DOWN )
onKeyDown: Key code: 39 ( VK_RIGHT )
onKeyUp : Key code: 39 ( VK_RIGHT )
Key Tool Deactivated.

Thank you for the quick response and for your work.


Thanks for your response Oneguy. It looks like its not a problem with the keyboard. I've found a bug in the plugin that could be related to what you're experiencing. Changing the model units greatly affects the speed of the camera. I'll fix this in the next release. For now, see if changing the model units solves your problem.

Instructions
Load up your sketchup model and select the menu 'Window' and select 'Model Info'
select 'units' and change the Format: to 'Decimal' and 'Millimeters'.

For now you'll need to change the units for each model that you open thats not in millimeters.

Thanks again Oneguy, and let me know how this goes

-niall
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby halroach » Mon Oct 03, 2011 3:03 pm

Hi,

Very nice plugin!

1. Works really well the minute you get the speed right! around 400-500 km\h max works good for me. I'm working on a model that is in cm. for some reason I don't believe I am traveling at 500 km\h. It must be a bug in the units or something.

2. I tried recording the movement with 'camera recorder' and it works pretty well!
Are there any other good ways to record the movement? Are you thinking of integrating something like that?

3. For maximum control, I would suggest to add the option for controlling 'pitch'(up and down) and 'yaw'(left and right) with the keyboard and not only with the mouse.
I used to play 'Doom II', 'Quake', and the best controls were in 'Descent II' and you could control the 'yaw' with left and right and holding down 'Alt' would change it to strafing left and right. I imagine there are problems with using alt in sketchup, but maybe that's solvable!? alternately you could use keypad 1 and 3 for 'strafe', 4 and 5 for 'yaw', and 7 and 9 for roll.

4. as for 'pitch' I would suggest using the keypad 8 and 2 keys.

5. Holding down Shift was used for Run/Walk mode - would be nice too!

Thanks!!!
0
User avatar
halroach 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby bentleykfrog » Sat Oct 15, 2011 2:29 am

Halroach wrote:Hi,

Very nice plugin!


Thanks Yoni :)

Halroach wrote:1. Works really well the minute you get the speed right! around 400-500 km\h max works good for me. I'm working on a model that is in cm. for some reason I don't believe I am traveling at 500 km\h. It must be a bug in the units or something.


It is an error on my part, my unit conversion isn't working like it should for any model units other than millimeters. In the next release (which should be available in about 3 weeks) this is fixed. There's a raft of other changes and some unrelated work that's delaying the release.

Halroach wrote:2. I tried recording the movement with 'camera recorder' and it works pretty well!
Are there any other good ways to record the movement? Are you thinking of integrating something like that?


Camera recorder is probably the best thing available for recording the camera movements, but it does have some issues as you've probably noticed. This is because Camera recorder was based on Sketchup's walk tool. Floating Camera added features that are outside the scope of the walk tool. To get a good recorded camera path from Floating Camera you'd need a script that can smoothly interpolate camera positions, that can store camera data (like roll, interval, fov, etc) as attributes or definitions, and that can provide a good suite of editing tools to edit all of this data. It's quite a mean feat of coding ;) so no promises, but I am looking into this.

Halroach wrote:3. For maximum control, I would suggest to add the option for controlling 'pitch'(up and down) and 'yaw'(left and right) with the keyboard and not only with the mouse.


I'm probably more of a fan of the mouse than you are. In sketchup the mouse represents the only analog input, so it gives you a smooth gradation of control over pitch and yaw.

The problem with keyboard inputs is that they're either all or none. This is probably ok with PC games like 'Descent II' as you're using these keys in an early video game environment (you sort of overlook/accept the violent way that you control the game). From a video presentation perspective, its really really bad.

The way I see it is that Floating Camera is designed for two purposes: 1. to provide a simple interactive navigation in Sketchup, 2. to produce smooth camera paths for export to video. For both of these purposes the keyboard + mouse combo isn't really ideal. I'm looking at 5th/6th generation console controller integration for the next release, as these provide the best of both worlds (IMO). They're an easy to use navigation controller, and they provide very, very smooth control. The only problem is what I mentioned before, the mouse is the only analog input to sketchup through ruby. I'm working around this by using the keyboard as a binary system, which is probably not the best idea, but it'll provide smoother camera control without the need to write a huge C++ script to get gamepad inputs into sketchup.

I'm currently working with:
PS3 Sixaxis controller (usb input) (cheapest option)
XBOX 360 Wireless controller with a wireless gaming receiver
XBOX Kinect (lots of setup required, but almost no troubleshooting)

I'm currently ignoring with prejudice
Wii remote (interesting, but not enough analog inputs)
PS3 Move (?)

If you've got any suggestions I'd love to hear them

Halroach wrote:5. Holding down Shift was used for Run/Walk mode - would be nice too!


Hopefully using more analog inputs will negate the need for this, but I guess it would be nice to have to save a few seconds between camera setup.
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby Bertier » Wed Nov 02, 2011 11:40 pm

is your plugin compatible with 3Dconnexion controller from logitech ?

this is a great analog controller for SU8
0

Bertier 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby bentleykfrog » Thu Nov 03, 2011 7:13 am

Bertier wrote:is your plugin compatible with 3Dconnexion controller from logitech ?

this is a great analog controller for SU8


If you're refering to the SpaceNavigator, the short answer is no. There are a couple of bodges that would make SpaceNavigator compatible with Floating Camera (ie. using ControllerMate/XPadder to re-jig the controls to keyboard output) but I'm getting increasingly unhappy with these. My main concern for the next release is controller integration and there's a raft of things that I'm unsure about so I can't confirm either way that the SpaceNavigator will be compatible with Floating Camera.

Out of curiousity, what kind of problems are you having or what kind of features are you lacking with the existing SpaceNavigator & Sketchup support?
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby bentleykfrog » Wed Nov 09, 2011 1:25 am

From: Re: Preview - Sketchup Floating Camera [Update 2011-03-19]]
tspco wrote:A short video using Floating Camera and Camera Recorder
http://youtu.be/9mDYQBtYC04


Thanks for the example Ryan :)

I see a couple of things to add/fix in the next release. The first is analog support. In your video its quite noticable that you jump between the forward and left directions. I'm guessing that this is probably not ideal and that analog/gamepad support would solve this.

The other issue is a combination of Floating Camera and Camera Recorder. The poor frame rate could be hardware related. What I mean is that the combination of running Camera Recorder and Floating Camera at the same time is too taxing on your cpu + gpu that Camera Recorder isn't recording even steps between frames (ie. one frame would represent 0.1667 seconds, the other 0.24, another 0.18). This is probably whats causing the uneven jumps between frames. I'll look into some interpolation features to resolve this.

thanks again

-niall
0

bentleykfrog 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby eoinosullivan » Thu May 29, 2014 4:23 pm

Any updates to this plugin since 2011? Any alternative plugins for Sketchup 8 or newer that works similarly?
0

eoinosullivan 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby aldenkr » Sat Jun 06, 2015 12:14 am

The extension will not load in either sketchup 2014 or 2015.
shows a list of loading errors, is there a .rbz file version. It will not load with auto install nor with the zip file
0

aldenkr 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby TIG » Sat Jun 06, 2015 1:25 pm

aldenkr wrote:The extension will not load in either sketchup 2014 or 2015.
shows a list of loading errors, is there a .rbz file version. It will not load with auto install nor with the zip file
I updated the code within th terms of the OP (c) - v1.4x_beta is now >=v2014 compatible.

Download

0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby josephkim626 » Mon Jun 08, 2015 9:04 am

Seems though that all transparency settings become 0 upon activating the tool.

I believe my hardwares are good enough to maintain both transparency and the smooth transition. Would there be a way to set this setting off?
0
User avatar
josephkim626 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby TIG » Mon Jun 08, 2015 11:07 am

I did not write the toolset - I simply adjusted some lines to make it >=v2014 compatible
However, if you edit the file floating_camera in the Plugins folder using Notepad++ and find these lines starting at line#77:
@@q_render_opts = Hash[
"ModelTransparency" => false,
"EdgeType" => 0,
"EdgeDisplayMode" => 1,
"EdgeColorMode" => 1,
"DrawSilhouettes" => false,
"DrawDepthQue" => false,
"DrawHidden" => false,
"DrawLineEnds" => false,
"ExtendLines" => false,
"JitterEdges" => false,
"DisplayDims" => false,
"HideConstructionGeometry" => true,
"MaterialTransparency" => false,
"ShowViewName" => false
]
@@q_shadow_info = Hash[
"DisplayOnAllFaces" => false,
"DisplayShadows" => false
]

@@q_degrade_opts = Hash[
"Texture" => false,
"TransparencySort" => 0,
"DisplayFog" => false
]

and adjust the appropriate values, false >>> true etc, in the Hash then it will change things like transparency settings...
I have emboldened a few of the likely suspects...
1
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby josephkim626 » Mon Jun 08, 2015 11:10 am

TIG wrote:I did not write the toolset - I simply adjusted some lines to make it >=v2014 compatible
However, if you edit the file floating_camera in the Plugins folder using Notepad++ and find these lines starting at line#77:
@@q_render_opts = Hash[
"ModelTransparency" => false,
"EdgeType" => 0,
"EdgeDisplayMode" => 1,
"EdgeColorMode" => 1,
"DrawSilhouettes" => false,
"DrawDepthQue" => false,
"DrawHidden" => false,
"DrawLineEnds" => false,
"ExtendLines" => false,
"JitterEdges" => false,
"DisplayDims" => false,
"HideConstructionGeometry" => true,
"MaterialTransparency" => false,
"ShowViewName" => false
]
@@q_shadow_info = Hash[
"DisplayOnAllFaces" => false,
"DisplayShadows" => false
]
@@q_degrade_opts = Hash[
"Texture" => false,
"TransparencySort" => 0,
"DisplayFog" => false
]

and adjust the appropriate values, false >>> true etc, in the Hash then it will change things like transparency settings...
I have emboldened a few of the likely suspects...



Thats great. Thank you so much TIG.
0
User avatar
josephkim626 
 

Re: [Plugin] Floating Camera 1.0 public beta 1.4

Postby ARTchi » Thu Jun 11, 2015 12:07 pm

Couple of comments:
If you set the small inertia of the moving up and down (shift and ctrl) movements are not smooth, twitches.
It is clear that the camera is controlled with the mouse, it is possible to hide the mouse cursor so that you can make a good video. The movement of the mouse is intuitive and without a cursor.
0
User avatar
ARTchi 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 11 guests

Visit our sponsors: