New llSetCameraParams() rules: CAMERA_POSITION_KEY and CAMERA_FOCUS_KEY
tracked
rhet0rica Resident
Right now there's no way to make a dolly camera in SL, aside from manual panning. Similarly, chase cameras are limited to following vehicles that the avatar is sitting in.
With these features, scripters could implement:
- Remote control vehicles
- Security camera views that rotate from side to side
- Machinima camera scripting engines
- Scripted tours of sims with dynamic motion
- Cameras that follow other avatars
- Independent top-down cameras for strategy games (think isometric!) and platformers (think side-scrollers!)
Technical details
CAMERA_POSITION_KEY would set the UUID of an object to use for the eye position and rotation. Any changes to this object's position, including via keyframed motion or omega rotation, should affect the camera's eye position according to what the client sees. Only effective while CAMERA_POSITION_LOCKED is TRUE.
CAMERA_FOCUS_KEY would be the same, but for the camera focus position only. Only effective while CAMERA_FOCUS_LOCKED is TRUE.
A simple implementation of this feature can reasonably ignore most other camera settings (LAG, OFFSET, THRESHOLD, PITCH, etc.) when both CAMERA_POSITION_KEY and CAMERA_FOCUS_KEY are set, without compromising on utility to scripters. Such an implementation should also adopt the rotation of the CAMERA_POSITION_KEY when CAMERA_FOCUS_LOCKED is TRUE but CAMERA_FOCUS_KEY is nil (see use cases below).
A more ambitious implementation might enable CAMERA_*_OFFSET (which already exists for FOCUS) as overrides, and re-use the CAMERA_DISTANCE attribute to determine the depth-of-field target when CAMERA_POSITION_KEY is employed without CAMERA_FOCUS_KEY.
Dynamic control of camera position in response to user feedback is currently unusable
Although implementing position changes is possible, but involves updating the camera position to track an object with a high-resolution timer. This is both needlessly cruel to the simulator and very janky. Back-to-back llSetCameraParams() calls that update the camera position cannot be smoothed with CAMERA_POSITION_LAG in response to control() input, as the camera attempts to spline back to the non-scripted avatar camera after every input unless the CAMERA_POSITION_LAG is 0.
Controlling camera rotation is currently incomplete
Because SL currently assumes the avatar always wants a sensible camera orientation, there's no way right now to make an upside-down or sideways camera except in mouselook. To deal with this, it should be possible for scripters to indicate they wish to also use the rotation of the CAMERA_POSITION_KEY, at least when no camera focus is in use. (I'd really like to be able to make a car that can drive up curved walls and onto the ceiling...)
Log In
Otoa Kiyori
May I also suggest to consider adding CAMERA_ZOOM (FOV change).
I think combat poeple would love zoom effect for something like target scope things for rifles. I would love if a script-controlled camera could do "Crash Zoom" and "Dolly Zoom" for machinima (which can only be done with fly cam ATM, but it is possible) https://youtu.be/hOaZJy3nQMM (the last half about zoom)
rhet0rica Resident
Otoa Kiyori This has been doable for a long time via RLV, but perplexingly no one has tried it yet. I guess it's a lack of market overlap.
Otoa Kiyori
rhet0rica Resident Thank you!! I see it! @setcam_fov right? I need to try this!!!
Nexii Malthus
See https://www.youtube.com/watch?v=VBi5E6AlLb0 -- just needs a viewer patch to make this work for arbitrary absolute coords. But having ability to track by key for focus or position would be really nice to have.
I also really need camera roll for my usecase of Vertical Sim. I'm having to use some certain tricks around the linden vehicle flags for my tanks to work sideways.
Blaise Timtam
It would also be nice to have a CAMERA_VIEW_ANGLE parameter, Because viewers can have set a value in prefs different from the default. Without that we can't be sure all viewers get the same view when setting CAMERA_POSITION and CAMERA_FOCUS by script.
Maestro Linden
tracked