Free Camera

Free Camera

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Free Camera

Post by trepan »

A new camera mode has been added to SVN, free camera. Its primary
control interface is the keyboard, and it really isn't intended to be used
for gameplay (although it may be if the controls get improved, especially
with respect to minimap view setting). It has smooth motion, and should
make for better video captures. It is not included in the default toggle list
for CTRL+MiddleMouseButton control.

The main controls are the arrow keys, with the following modifiers:

ALT: side scrolling
CTRL: up/down tilting
SHIFT: up/down scrolling
META: speedup

It will switch to a special mode if you are tracking a unit. The right/left
arrow keys then control the angular rotation about the unit, and the
up/down key control the speed of motion towards the unit. The further
away you are from the unit, the faster you will move towards it. It will
also always face the unit, so that you'll see ground shakes rather then
unit shakes.

There are 3 different modes for handling the ground.

1. CamFreeGroundOffset == 0
- the camera can move anywhere

2. CamFreeGroundOffset < 0
- the camera is always offset from the ground height by -CamFreeGroundOffset

3. CamFreeGroundOffset > 0
- the camera can be "locked" to the ground by using SHIFT+UP_ARROW.
(and will use +CamFreeGroundOffset as the offset). To release the lock,
simply press SHIFT+DOWN_ARROW

If the camera is locked to the ground, then the CamFreeAutoTilt and
CamFreeGravity parameters come into play. AutoTilt will point the camera
in the direction of the ground's slope. Gravity will be used if you jump off
of a ground ramp.


P.S. A new default widget "CameraControl" was added to provide low-level
access to cameras. Available commands:

/luaui cam
- list available parameters

/luaui cam <param>
- show current value of <param>

/luaui cam <param> <value>
- set <param> to <value>

Settings changed using "/luaui cam" do not get saved between games.
Last edited by trepan on 24 Mar 2007, 20:25, edited 3 times in total.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Heh, I forgot to mention the easy way to get into FreeCam mode...

/viewfree
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Post by Zpock »

F YEAH!!!!!!

GJ!!!! I have hoped so much for smoth camera so we can finally make good vids!!!
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

On a related note, each camera mode can now have its own
FOV (Field Of View) setting. Those wishing to fake an orthographic
camera mode will likely be disappointed (fog distance hasn't changed ;))
espylaub
Posts: 205
Joined: 01 May 2006, 11:35

Post by espylaub »

YESYESYESTHANKYOUAWESOME.

Amazing :D Smooth Spring movies at last!
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

now we just need to be able to rewind and forward replays.
User avatar
hrmph
Posts: 1054
Joined: 12 May 2005, 20:08

Post by hrmph »

trepan wtfpwns!
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

trepan wrote:NOiZE:
http://spring.clan-sy.com/phpbb/viewtopic.php?t=9603
(.skip = fast forwarding)
ok only rewind is missing then,

and some nice buttons on the gui :)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

oh fucking win! Nice trepan!

Told you guys he was a god...
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

NOiZE wrote:ok only rewind is missing then
Rewind is hard if not impossible, try asking for fast saves/loads (also hard but may actually be doable) so you can have 'back to snapshot' functionality.
chlue
Posts: 101
Joined: 28 Dec 2005, 20:48

Post by chlue »

Any change on seeing more customizeable cameramodes?

Till now i still use the old boring TA-Style-Cam, because panning the view with middle mouse and zooming works very good in that view. I would change asap to the rotateable overheadcamerea if middle mouse would pan the view instand of change the orientation and zooming would maintain the center of the screen.
User avatar
Slamoid
Posts: 237
Joined: 25 Jan 2005, 19:23

Post by Slamoid »

MUST. HAVE. PATCH. NOW.

I've always loved the Ground Control camera style, and with the new Tracking features, I think I'll be playing Spring a whole lot prettier.. :D
User avatar
Cabbage
Posts: 1548
Joined: 12 Mar 2006, 22:34

Post by Cabbage »

hurry up, i wants to maek mor videos!
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Post by Pendrokar »

Strangely it doesn't work for me! I write /viewfree but im still in one of the four cam modes!
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post by quantum »

Try control-F5. Are you sure you have the SVN version of Spring?

Keep shift-up pressed to enter dune buggy mode :-) Have fun jumping on bumps and skidding around 8)
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Hmmm, did anyone ever play empire at war?

That had a brilliant camera mode called 'cinematic mode', where it would pick a few interesting spots near the action, and would change the camera to be wide-angled (having the two black strips at the top and bottom), and would slowly pan the camera for you.

To be honest, I still can't work out how they did it, but it worked brilliantly, and somehow always managed to capture cinematic moments, and always looked great. (Shame the rest of the game was distinctly average)
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

Warlord Zsinj wrote:Hmmm, did anyone ever play empire at war?

That had a brilliant camera mode called 'cinematic mode', where it would pick a few interesting spots near the action, and would change the camera to be wide-angled (having the two black strips at the top and bottom), and would slowly pan the camera for you.

To be honest, I still can't work out how they did it, but it worked brilliantly, and somehow always managed to capture cinematic moments, and always looked great. (Shame the rest of the game was distinctly average)
I believe somebody was coding the necessary detection methods for such, some sort of Spectator camera where it would flash the interesting areas for you to check. From there we would have to use LUA for the bars, I think, and I'm not sure if the zoom can be scripted.
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Post by Pendrokar »

quantum wrote:Are you sure you have the SVN version of Spring?
OHH :shock: . Now I get it!
User avatar
jackalope
Posts: 695
Joined: 18 Jun 2006, 22:43

Post by jackalope »

yes I would like a free camera.
Post Reply

Return to “Engine”