This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
69 camera endpoint #77
Open
tcannonfodder
wants to merge
61
commits into
master
Choose a base branch
from
69-camera-endpoint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Still working on rendering scenes completely without a broken clipping frame
Remove unused properties Rename containers for Camera objects
Since different flight modes have different camera configurations, CameraCapture should be more flexible. A blacklist selection of cameras to render should make the mod more resilient to changes to the core game.
There will be more code surrounding camera snapshots, so it should be moved into its own namespace for readability
Abstracting the logic to take a snapshot from a set of cameras into its own class makes rendering other camera types easier in the future.
This is the progress I've made on an internal IVA camera. I'm tabling this work for now to work on RPM cameras, because it's a "nice to have" and I can't figure out how to render the internal scene constantly without disrupting gameplay.
This is a first stab at hooking up a custom module to JSIPrimitiveExternalCameras and grabbing info from the RasterPropMonitor module
This is a WIP that fleshes out the RasterPropMonitorCamera class to include details from RasterPropMonitor, and register the camera with a singleton manager that will be used to get the active list of RPM cameras, and a Capture class responsible for taking a screenshot from the camera.
Moving the logic for duplicating cameras and rendering a screenshot into a base class gives a common ground for the different camera types and makes it easier to write a single class to manage them.
using CameraCapture as the base class for cameras in the manager makes the manager general so it can be used by the responsibility.
Managed to get RPM cameras to point at the right location, but need to tweak more settings and camera effects
* Made the camera naming prefix dynamic to prevent naming collisions with multiple RPM cameras * Fixed the FOV of near-field cameras, based on: https://github.com/Mihara/RasterPropMonitor/blob/ba5348e7b3716206e404ec937e59ea626fc5030e/RasterPropMonitor/Core/FlyingCamera.cs#L240 * Improved debugging for camera details
* Fix the update loop to skip transforming far-away cameras * Fix the update loop to translate camera positions
This list of cameras includes the camera names, types, and hypermedia URLs. The idea is that clients check this endpoint, then follow the hypermedia URL to the camera they'd like to view
`telemachus/cameras` returns the list of cameras, and `telemachus/cameras/X` returns the camera with that name, if the camera is present.
* Rendering images as JPEGs drastically reduces file size * Also bumped up the resolution to 640px to give the user a better view.
…thod This makes it possible for actual camera prop modules to use the method to build the camera string.
* Fix removeCamera to lowercase the key * Keep a mapping of the cameras a vessel has assigned to it so we don't accidentally remove a camera on the vessel with that name when switching to the vessel.
This makes sure the CameraManager always has an accurate list of cameras.
Also re-enable raster prop monitor cameras
…m manager" This reverts commit 887d49b.
* The methods to duplicate and reposition a camera will not be called until the mutex has been removed
The new yield structure will have us waiting until the frame is finished rendering, then capturing the image. We'll also wait a few seconds before releasing the mutex to improve performance.
By disabling the unity cameras behind a cameracapture until we need them we can improve the framerate on the off-frames where a camera snapshot is not being rendered.
This actually renders the image to be stored in the cache
The Camera Manager should be responsible for the flight camera, not the camera responsibility server. This hopefully will fix a memory issue when switching from flight mode to the editor.
Offsetting the camera snapshot rendering by an odd number appears to improve the overall perceived performance by spreading out the cost of copying data from the GPU to the CPU. incrementing by .3 gives us a reasonsable chance of avoiding stacking changes while making sure the updates happen quickly.
When rendering a camera snapshot we need to make sure to copy the settings from the current game camera. This ensures we grab subtle changes like the galaxy camera transforms.
This reverts commit 78bb2dc.
This reverts commit dc1af89.
…nder""" This reverts commit f8ee982.
The reposition camera method should have called the base method to reposition the camera to make sure the translation is maintained.
Hook into additionalCameraUpdates instead of redefining repositionCamera to improve performance.
Attempting this to see if it improves performance and camera jittering, it appears to.
Adding .mp4, .json, and .txt for add-on mod support (ie. KSP PAO). Allows for mp4 video files, json data and txt files to used internally or externally with Telemachus interface.
Update IOPageResponsibility.cs (adding .mp4,.json and .txt MIME types/support)
Should use the TextContent
Certain ngrok configurations pass an "X-Original-Host" header as part of the request if the host header is rewritten. This adds support for detecting and using that header to make the Camera listing endpoint seamless for clients using an ngrok URL
Are you planning to merge this? |
Hey Zach! I'd like to soon, but first I have to get the mod running with the latest version of Kerala, which introduced some breaking changes. Life's been pretty hectic, so I haven't had time to rewrite the broken parts of the code base. |
Ahh, good to hear! What's Kerala ? |
Apparently that's what autocorrect decided "Kerbal" meant! 😜 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the Camera Endpoint, along with support for
.mp4
,.json
, and.txt
files.This closes #69