Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Deckard on April 09, 2008, 02:25:06 pm
-
The following 3 SEXPs would be much appretiated:
1.- Camera Zoom out
2.- Camera Zoom in
3.- (Extended) Camera shrudder for the very camera view ( and not only for the HUD view )
Thanks for your time,
-
:welcomesilver:
Yeah, you're right, but you can get those effects with tricks. For example, you can use every-time and coordinate manipulation in conjunction with a camera model to move the camera and represent a nice zoom effect ;)
-
Look in the "cutscene" subcategory of sexps.
1) set-fov
2) set-fov
3) set-camera-shudder
-
But set-fov is sudden, not progressive...
-
We really need a way to move the camera around smoothly. Using every-time is a temporary solution but since SEXPs can't use decimals it gives jittery results at best.
-
Tying the camera to an object by using every-time/set-object-position and using the object as a "camera plane" has given me good, smooth results. You just need to make sure that the object is invisible so the model doesn't get in the way of your view.
I need to make a Wiki page on this. This subject keeps coming up.
-
I don't agree. That's exactly the method I was referring to, and I don't think it's smooth enough. If the object you've tied the camera to is going less than about 30 m/s, you can clearly see the wonky movement. It makes precise shots look awfully hackish.
-
IIRC WMCoolmon recently submitted some camera code that allowed the camera to be translated over a period of time, with acceleration (among other things). I don't think it has been added to SEXPs though.
-
Yeah, I added it to the unstable branch of SVN, but the unstable branch was too different from the stable branch to easily port it over.
It uses a three-part acceleration-constant velocity-deceleration movement curve based on Newtonian motion of an object under constant force. Meaning that you get something looking like this (http://fs2source.warpcore.org/temp/wmc/camera_curve.gif), applied independently for x, y, and z rotation, as well as pitch, bank, and heading, or even zoom. Gives a nice smooth-looking movement, and the entire movement equation is set up as a separate function so it could easily be used for other things as well (although it's a hefty bit of logic, probably not as much as most matrix calculations though.)
It also lets you lock the camera to a specific object or lock the camera to face a specific object, and then the programmed movement is added on to the camera's position/facing based on those. Finally, it also takes into account custom position/orientation functions, which is not all that far from adding per-camera scripting hooks for movement.
-
That's seriously awesome, WMC. Can't wait to see this in a build.
-
Very nice. I had been thinking of adding some code where the camera could be translated along a parametric curve. Yours looks like it can do that, and more.
-
Great news ! ;) .
PS: The set-camera-shudder SEXp seems to be working for the HUD perspective only.
-
Are regular builds going to be implemented with the new feature?
-
I got another SEXp request.
Running certain cinematics I've been making for the BTRL game, I can't not turn off the player engines SFX via FRED2, which many times breaks the immersion factor during these cinematics..
So, would be possible to code a new SEXp to turn on/off the engines'SFX?
Thanks in advance,
-
For smooth movement try binding the camera to a ghost ship and have that one move with set-object-speed.
-
I'm pretty sure that won't solve the problem.
The movement isn't smooth with the binding method because SEXPs can't use decimals. So a camera-plane coordinate of X 12.3 will be translated by set-camera-position to 12, which means the camera will only move between whole numbers. The result is jerky camera movement at speeds below ~30 m/s, and higher if you're moving diagonally.