Jump to content

Camera Tools continued v1.15.0


DocNappers
 Share

Recommended Posts

Version 1.17.0 is now released. Changelog:

Bugfixes

  • Only activate the camera when changing modes if it was already active.
  • Don't automatically start playing a path when adjusting it or creating a new one and stop it if keyframes or the path is deleted.
  • Start playing a path when it's loaded if camera tools is active.
  • Adjust ordering of stationary path updates to avoid jitter.

Improvements

  • Automatically disable TimeControl's camera zoom fix as it breaks CameraTools when slow-mo is enabled (sorry @ntwest).
  • Switch stationary and pathing cameras to run in Update instead of FixedUpdate as they aren't sensitive to physics updates.
  • Switch pathing camera to use unscaled time so that it works while paused.
  • Add option of cubic spline interpolation to pathing mode positions based on https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Interpolation_on_an_arbitrary_interval.
  • Add option of Slerp and cubic spline interpolation to pathing mode rotations.
    • Note: the interpolation method is used from the keypoint it's set in until the next one, so different parts of the path can use different interpolation methods.
  • Rework stationary camera to actually make the camera stationary when below maxRelV. Jumps due to CoM changes (e.g., launch clamp detachment) should not affect the camera position unless maxRelV is extremely low (e.g., <1 in most cases).
  • Option to save the previously used rotation in stationary camera mode when no target is selected (prevents semi-random initial views, default: disabled).
  • Add keybinding options for free move keys (escape cancels keybinding).
Link to comment
Share on other sites

On 7/16/2021 at 3:11 AM, DocNappers said:

Version 1.17.0 is now released. Changelog:

Bugfixes

  • Only activate the camera when changing modes if it was already active.
  • Don't automatically start playing a path when adjusting it or creating a new one and stop it if keyframes or the path is deleted.
  • Start playing a path when it's loaded if camera tools is active.
  • Adjust ordering of stationary path updates to avoid jitter.

Improvements

  • Automatically disable TimeControl's camera zoom fix as it breaks CameraTools when slow-mo is enabled (sorry @ntwest).
  • Switch stationary and pathing cameras to run in Update instead of FixedUpdate as they aren't sensitive to physics updates.
  • Switch pathing camera to use unscaled time so that it works while paused.
  • Add option of cubic spline interpolation to pathing mode positions based on https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Interpolation_on_an_arbitrary_interval.
  • Add option of Slerp and cubic spline interpolation to pathing mode rotations.
    • Note: the interpolation method is used from the keypoint it's set in until the next one, so different parts of the path can use different interpolation methods.
  • Rework stationary camera to actually make the camera stationary when below maxRelV. Jumps due to CoM changes (e.g., launch clamp detachment) should not affect the camera position unless maxRelV is extremely low (e.g., <1 in most cases).
  • Option to save the previously used rotation in stationary camera mode when no target is selected (prevents semi-random initial views, default: disabled).
  • Add keybinding options for free move keys (escape cancels keybinding).

cool, really like this mod. I've got one problem though. when I go to change to the stationary camera angle (ie, click somewhere on the ground) nothing works. it just stays the same

Link to comment
Share on other sites

6 hours ago, azurechief said:

cool, really like this mod. I've got one problem though. when I go to change to the stationary camera angle (ie, click somewhere on the ground) nothing works. it just stays the same

In stationary camera mode the options for moving the camera with the mouse are:

  • right click and move mouse = rotate camera (if no target is selected; if a target is selected, the camera will always point towards it)
  • middle click and move mouse = translate camera position
  • scroll mouse = up/down translation

Left click is for interacting with the menu, e.g., selecting a target, etc.

Link to comment
Share on other sites

15 hours ago, DocNappers said:

In stationary camera mode the options for moving the camera with the mouse are:

  • right click and move mouse = rotate camera (if no target is selected; if a target is selected, the camera will always point towards it)
  • middle click and move mouse = translate camera position
  • scroll mouse = up/down translation

Left click is for interacting with the menu, e.g., selecting a target, etc.

 

ah ok thanks!

edit: is there any way to stop the stationary camera from changing position mid flight? Whenever I'm launching something, the camera will track my rocket for a bit, then change postion. I don't have either the auto or the manual flyby boxes checked

Edited by azurechief
Link to comment
Share on other sites

Posted (edited)
9 hours ago, azurechief said:

is there any way to stop the stationary camera from changing position mid flight? Whenever I'm launching something, the camera will track my rocket for a bit, then change postion. I don't have either the auto or the manual flyby boxes checked

The camera shouldn't be changing position unless you're doing something to cause this. Potential causes are:

  • Manually reverting and activating camera tools. (For auto- or manual-flyby, the camera position will be recalculated each time camera tools is activated.)
  • Switching active vessels (triggers camera tools to restart the current mode if it was active). This could be being triggered by other mods.
  • Too low "Max Rel. V". (The camera will smoothly adjust its position to prevent the distance between the camera and the active vessel changing faster than this).
  • Other mods interfering, e.g., stealing the camera parent transform. (Should cause camera tools to revert without reactivating and a message will appear in the KSP.log file.)

You can enable the `DEBUG` variable in the settings.cfg file (in GameData/CameraTools/PluginData, edit it manually) to get more verbose messages in the log file that may help you figure out what's going on. This can be done without restarting KSP by editing the settings.cfg file then hitting the "Reload" button in the camera tools GUI.

Edited by DocNappers
Link to comment
Share on other sites

On 7/13/2021 at 11:28 PM, SpacePixel said:

Thanks a lot, especially for the code, I might have some ideas how I could make it work! I'll post the trick here if successful.

So, as promised, I figured out how to control the camera with a joystick — I simply switched from Joystick-to-Mouse to Joy-to-Key which did the trick. That and some Warp Stabilizer helped me created the following:

Spoiler

 

 

Link to comment
Share on other sites

On 7/19/2021 at 1:05 AM, DocNappers said:

The camera shouldn't be changing position unless you're doing something to cause this. Potential causes are:

  • Manually reverting and activating camera tools. (For auto- or manual-flyby, the camera position will be recalculated each time camera tools is activated.)
  • Switching active vessels (triggers camera tools to restart the current mode if it was active). This could be being triggered by other mods.
  • Too low "Max Rel. V". (The camera will smoothly adjust its position to prevent the distance between the camera and the active vessel changing faster than this).
  • Other mods interfering, e.g., stealing the camera parent transform. (Should cause camera tools to revert without reactivating and a message will appear in the KSP.log file.)

You can enable the `DEBUG` variable in the settings.cfg file (in GameData/CameraTools/PluginData, edit it manually) to get more verbose messages in the log file that may help you figure out what's going on. This can be done without restarting KSP by editing the settings.cfg file then hitting the "Reload" button in the camera tools GUI.

Ok so I did that, and I'm getting this (screenshot of ingame message)

I took a look at the log and it came up with this:

Spoiler

[CameraTools]: DEBUG Floating origin offset: [-2084.7, -1.3, 1337.6], Krakensbane velocity correction: [360.5, -0.6, -170.6] 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

I checked CKAN but it's not in interference with any other mods. Help?

Link to comment
Share on other sites

I see that you have "Random Mode" enabled, which for the stationary camera does the same thing as having "Auto Flyby Position" selected. Random Mode is for automatically picking a different camera mode whenever the active vessel changes (mostly for use with BDArmory). Try disabling it to see if it still occurs.

Enabling the DEBUG variable in the settings prints more than just messages with DEBUG in them (those are mostly just for my own debugging), it includes a bunch of messages starting with "[CameraTools]: ... ", which are the ones to look for.

Link to comment
Share on other sites

48 minutes ago, DocNappers said:

I see that you have "Random Mode" enabled, which for the stationary camera does the same thing as having "Auto Flyby Position" selected. Random Mode is for automatically picking a different camera mode whenever the active vessel changes (mostly for use with BDArmory). Try disabling it to see if it still occurs.

Enabling the DEBUG variable in the settings prints more than just messages with DEBUG in them (those are mostly just for my own debugging), it includes a bunch of messages starting with "[CameraTools]: ... ", which are the ones to look for.

yeah, I didn't realize that I had random mode on. I disabled that, same thing still happens with the debug message ingame

Link to comment
Share on other sites

8 hours ago, azurechief said:

yeah, I didn't realize that I had random mode on. I disabled that, same thing still happens with the debug message ingame

OK, I have a suspicion that it may be the correction in the camera position for the shift in the floating origin being limited by the Max Rel V since it's quite a large shift. Can you try making Max Rel V 100 times bigger and see if it still occurs?

Link to comment
Share on other sites

16 hours ago, DocNappers said:

OK, I have a suspicion that it may be the correction in the camera position for the shift in the floating origin being limited by the Max Rel V since it's quite a large shift. Can you try making Max Rel V 100 times bigger and see if it still occurs?

set it to 250,000 and the same thing still happened. I tried uninstalling the mod from ckan and reinstalling but no luck

edit: playing around with it and removed my srbs. when I set the stationary camera back a bit from the pad, launch is normal and goes up. at the exact time that the thing that I'm seeing happens, the screen flashes for a split second back to the default camera, then back to the stationary camera. when I don't target my vehicle and just have the stationary cam, everything goes right up until the point that I've discussed. after this "glitch" (that's what I'll call it) the camera returns, but is shaking like something is clipping through the ground (camera shake in the gui is at 0) and is also moving slowly to the right. I'm terribly sorry to keep on coming back with more bugs, but this didn't occur before you updated the mod. before the bugs started, I was using the old version of this mod with the new ksp update.

edit I'll add what I'm using for mods if that helps

Spoiler

+Flags (PlusFlags 1.6)
ABookCase Orbital Reference System (ABCORS 0.5.1.4)
Animate Generic Effects Module (ModuleAnimateGenericEffects 0.0.1.2)
Animated Decouplers (AnimatedDecouplers v1.4.2.2)
ASET Agency  (ASETAgency 1.0)
ASET Avionics (ASETAvionics 2.1)
ASET Props (ASETProps 1.5)
Astrogator (Astrogator v0.10.2)
B9 Part Switch (B9PartSwitch v2.18.0)
Better SR Bs (BetterSRBs 1.2.6)
Breaking Ground (BreakingGround-DLC 1.7.0)
Camera Tools continued (CameraTools v1.17.0)
Canadian Flags (CanadianFlags 1.0)
Chatterer (Chatterer 0.9.99)
Chatterer Extended (ChattererExtended 0.6.2)
Comfortable Landing (ComfortableLanding 2:2.0.1.1)
CommNet Antennas Consumptor (CommNetAntennasConsumptor 3.5.0)
CommNet Antennas Extension (CommNetAntennasExtension 2.1.4)
CommNet Antennas Info (CommNetAntennasInfo 3.0.3)
Community Category Kit (CommunityCategoryKit v5.2.0.0)
Community Delta-V Maps (CommunityDeltaVMaps 2:2.8)
Community Parts Titles (CommunityPartsTitles 0.8.2)
Community Parts Titles Extras: Categories (CommunityPartsTitlesExtrasCategory 0.8.2)
Community Parts Titles Extras: CCK - No Duplicates (CommunityPartsTitlesExtrasNoCCKDup 0.8.2)
Community Resource Pack (CommunityResourcePack 1.4.2)
Constellation Essentials (ConstellationEssentials v1.4.1.0)
Craft Manager (CraftManager 1.2.0)
Cryo Tanks (CryoTanks 1.6.1)
Cryo Tanks Core (CryoTanks-Core 1.6.1)
Cryogenic Engines (CryoEngines 1:2.0.2)
Cryogenic Engines - Near Future Aeronautics (CryoEngines-NFAero 2.0.2)
Deployable Engines Plugin (DeployableEngines 1.3.1)
Distant Object Enhancement Continued (DistantObject v2.0.2.0)
Distant Object Enhancement Continued default config (DistantObject-default v2.0.2.0)
Docking Port Sound FX (DockingPortSoundFX v2.1.12)
Dynamic Battery Storage (DynamicBatteryStorage 2:2.2.4.0)
EditorTime (EditorTime KSP1.4.1)
Engine ISP x2 (M-ISPx2 0.0.3)
Environmental Visual Enhancements - Stock Planet Config files (EnvironmentalVisualEnhancements-HR 2:EVE-1.2.2-1)
Environmental Visual Enhancements Redux (EnvironmentalVisualEnhancements 3:1.11.3.1)
Heat Control (HeatControl 0.6.0)
Kabrams Sun Flare Blue High (KabramsSunFlaresPack-Blue-High 001)
Kerbal Actuators (KerbalActuators v1.8.3)
Kerbal Attachment System (KAS 1.9)
Kerbal Dust Experiment (KDEX v2.0.2)
Kerbal Engineer Redux (KerbalEngineerRedux 1.1.9.0)
Kerbal Joint Reinforcement Continued (KerbalJointReinforcementContinued v3.5.2)
Kerbal Reusability Expansion (SpaceXLegs 2.9.1)
Kopernicus Planetary System Modifier (Kopernicus 2:release-1.12.1-55)
KSP Artemis Suit (KSPArtemisSuit 1.10.1)
KSP Recall (KSP-Recall v0.2.0.1)
KXAPI (KXAPI 1.2.0)
Making History (MakingHistory-DLC 1.12.0)
MechJeb 2 (MechJeb2 2.12.0.0)
ModularFlightIntegrator (ModularFlightIntegrator 1.2.10.0)
Module Manager (ModuleManager 4.1.4)
MSP-3000 Material Science Pod (MSP3000 v1.1)
Near Future Aeronautics (NearFutureAeronautics 2.1.1)
Near Future Construction (NearFutureConstruction 1.3.1)
Near Future Electrical (NearFutureElectrical 1.2.3)
Near Future Electrical - Decaying RTGs (NearFutureElectrical-DecayingRTGs 1.2.3)
Near Future Electrical Core (NearFutureElectrical-Core 1.2.3)
Near Future Exploration (NearFutureExploration 1.1.2)
Near Future IVA Props (NearFutureProps 1:0.6.5)
Near Future Launch Vehicles (NearFutureLaunchVehicles 2.2.0)
Near Future Propulsion (NearFuturePropulsion 1.3.4)
Near Future Propulsion - Xenon Hall Effect Thrusters (NearFuturePropulsion-XenonHETs 1.3.4)
Near Future Solar (NearFutureSolar 1.3.2)
Near Future Solar Core (NearFutureSolar-Core 1.3.2)
Near Future Spacecraft (NearFutureSpacecraft 1.4.2)
Near Future Spacecraft - LFO Engines (NearFutureSpacecraft-OrbitalLFOEngines 1.4.2)
Oinker's Skybox 2.0 Brighter [4] (OinkersSkybox 2.0_brighter)
Parallax (Parallax 1.3.0)
Parallax - Stock Planet Textures (Parallax-StockTextures 1.3.0)
Planet Origins (PlanetOrigins 1.0)
PlanetShine (PlanetShine 0.2.6.3)
PlanetShine - Default configuration (PlanetShine-Config-Default 0.2.6.3)
RasterPropMonitor (RasterPropMonitor 1:v0.31.4)
RasterPropMonitor Core (RasterPropMonitor-Core 1:v0.31.4)
Real Plume (RealPlume 2:v13.3.2)
Real Plume - Stock Configs (RealPlume-StockConfigs v4.0.8)
Real Solar System (RealSolarSystem v18.1.5)
Real Solar System Textures - 2048 x 1024 (RSSTextures2048 v18.3)
RealChute Parachute Systems (RealChute v1.4.8.3)
Realistic Atmospheres (RealisticAtmospheres 1.3.2)
RemoteTech Redev Antennas (RemoteTechRedevAntennas 0.1.1)
ReStock (ReStock 1.4.1)
ReStock Extra - Rigid Legs (RestockRigidLegs 1.4.1)
ReStock+ (ReStockPlus 1.4.1)
Retractable Lifting Surface Module (RetractableLiftingSurface 0.2.1.1)
Rocket Sound Enhancement (RocketSoundEnhancement 0.5.4)
Rocket Sound Enhancment - Default Configs (RocketSoundEnhancement-Config-Default 0.5.3)
RSS DateTime Formatter (RSSDateTimeFormatter 1.6.1.0)
scatterer (Scatterer 3:v0.0772)
Scatterer Default Config (Scatterer-config 3:v0.0772)
Science Lab Info (and 6 Crew Lab) (ScienceLabInfo 2.0.1)
Simple Adjustable Fairings - KW Rocketry Pack (SimpleAdjustableFairings-KWRocketry v1.4.0)
Simple Adjustable Fairings - Plugin (SimpleAdjustableFairings v1.12.0)
SmokeScreen - Extended FX Plugin (SmokeScreen 2.8.14.0)
Space X suits (SpaceXSuits 1.0)
Speed Unit Annex (SpeedUnitAnnex 1.4.0)
Stockalike Station Parts Expansion Redux (StationPartsExpansionRedux 1.4.0)
Sum Dum Heavy Industries - Service Module System (SDHI-ServiceModuleSystem v4.0.4)
Sum Dum Heavy Industries - Shared Assets (SDHI-SharedAssets 4.0.4)
TextureReplacer (TextureReplacer v4.5.1)
Timekeeper (Timekeeper v1.0.2)
Trajectories (Trajectories v2.4.1)
TweakScale - Rescale Everything! (TweakScale v2.4.5.1)
TweakScale Companion for ReStockPlus (TweakScaleCompanion-ReStockPlus v1.1.0.0)
Waterfall - Restock (WaterfallRestock 0.2.1)
Waterfall Core (Waterfall 0.6.7)
 

 

Edited by azurechief
adding context
Link to comment
Share on other sites

OK, it sounds like something else is interfering with the camera or active vessel then.

Can you DM me your KSP.log file from a run where this happens (with DEBUG enabled in camera tools)? I can try to see if there's a hint of what's going on in there.

Link to comment
Share on other sites

10 hours ago, DocNappers said:

OK, it sounds like something else is interfering with the camera or active vessel then.

Can you DM me your KSP.log file from a run where this happens (with DEBUG enabled in camera tools)? I can try to see if there's a hint of what's going on in there.

ok, so when I set the max rel v to 250, everything was fine. I have no idea what happened, but now it's working. do you suppose it's something with the mod?

Link to comment
Share on other sites

Posted (edited)
4 hours ago, minerbat said:

is there a version of this for 1.10.1? the download only goes back to 1.11 and so does CKAN

The latest version should also work for 1.10.1. I'm reasonably sure that there are no function calls that are specific to 1.11 or 1.12. 

Edited by DocNappers
Link to comment
Share on other sites

1 hour ago, GuessingEveryDay said:

I remember there used to be an option where you could change the frame reference, and it really helped with departures, but I can't find that option anymore.

How did it help with departures? Were you using the "Initial Velocity" reference frame?

In the code, the frame of reference only seemed to be being used to maintain the position of the stationary camera. The new method of keeping the camera stationary (in 1.17.0) doesn't use the vessel's velocity (except for "Max Rel V." calculations) and as a result is more accurate and accounts for changes in the floating origin, so I removed the now unneeded reference frame option. However, I see now that the "Initial Velocity" reference frame acts a little differently than what I originally thought, so I can add an option for that back in.

Link to comment
Share on other sites

Hello, first thank you for continuing the mod. Huh, is there a way to choose between  the keypad move/zoom speeds  and the sliders one? 

I would prefer to use the old style (more precise in my opinion). If I use an earlier version, then the Interpolation doesn't work. 

Thank you.

Link to comment
Share on other sites

4 hours ago, Oraldo revak said:

is there a way to choose between  the keypad move/zoom speeds  and the sliders one?

I'm not sure what you mean by this. The "Move Speed" and "Zoom Speed" sliders at the bottom of the settings window control the speed of the keypad move/zoom.

For interpolation in the pathing camera, the "Linear" setting in both position ("Pos") and rotation ("Rot") is what was used previously.  The "CubicSpline" and "Slerp" interpolation modes were added.

Link to comment
Share on other sites

5 hours ago, DocNappers said:

I'm not sure what you mean by this. The "Move Speed" and "Zoom Speed" sliders at the bottom of the settings window control the speed of the keypad move/zoom.

For interpolation in the pathing camera, the "Linear" setting in both position ("Pos") and rotation ("Rot") is what was used previously.  The "CubicSpline" and "Slerp" interpolation modes were added.

I  mean  at the bottom for keypad control.  Before we could  enter the  value manually , now  it's  a slider.  I  would  like to use, the old way, enter the  speed  with number  manually, and not by moving the a bar, if  it's  possible  to  choose.

Thank you for your time.

Link to comment
Share on other sites

9 hours ago, Oraldo revak said:

  would  like to use, the old way, enter the  speed  with number  manually, and not by moving the a bar, if  it's  possible  to  choose.

Ah, ok. I'll see what I can do.

Link to comment
Share on other sites

On 8/2/2021 at 6:02 PM, DocNappers said:

How did it help with departures? Were you using the "Initial Velocity" reference frame?

In the code, the frame of reference only seemed to be being used to maintain the position of the stationary camera. The new method of keeping the camera stationary (in 1.17.0) doesn't use the vessel's velocity (except for "Max Rel V." calculations) and as a result is more accurate and accounts for changes in the floating origin, so I removed the now unneeded reference frame option. However, I see now that the "Initial Velocity" reference frame acts a little differently than what I originally thought, so I can add an option for that back in.

Thanks.

Link to comment
Share on other sites

Version 1.18.0 is now released. Changelog:

Improvements:

  • Add option for text input fields instead of sliders.
  • Add 'Maintain Vel.' option, which is the equivalent of the old 'Initial Velocity' reference mode.
  • Make the menu toggle hotkey configurable too.
  • Make loading of paths a bit more fault tolerant.

I'm still planning to try to add the doppler effects (as an option). Maybe for the next version...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...