Jump to content
Sign in to follow this  
Rydygier

Smart Camera module - cheeky voyeur of battlefields

Recommended Posts

SMART CAMERA



SC version 1.1 (Armaholic)

SC version 1.1 (Dropbox)

SC version 1.1 (ZippyShare)

Introduction

Here is something, that I polished from time to time, and now suddenly became ready for first official release, so no big choice, and here we are... Sometimes I just preffer even not to play the battle (yes, I'm such lazy), but only watch AI vs AI struggle in some fancy, attractive way. Hence the idea. Of course this thing probably can have also other uses, even if not often in regular gameplay.

Description

Smart Camera module provides an autonomous, dynamic camera floating over whole map that, hopefully in smart way, will on its own decide, what is most interesting to show at the moment, and how to show it. SC module applies also some subtle post processing effects, simulation of hand shaking, manual zoom and focus adjustment – all switchable.

SC can be launched at mission init or at chosen moment, can be also terminated any time. Apart of that SC, when running, offers quick switch from camera view to normal view and back. SC is not interactive – camera can’t be controlled manually, is fully controlled by the algorithm. To work needs some units on map to watch. It is always focused on some unit or vehicle.

Smart Camera can be used for dynamic (unique each run) intros, outros, cut scenes and such. May be useful also for showcases, FPS measurement, even as alternative death cam mode.

Note, SC relies on SQF code. That means, SC will be affected by consequences of overloading scheduler/CPU. Be sure, that yours CPU can seamlessly handle all used scripts, addons and such before use.

SC comes in two versions: as “Smart Camera†module, that can be placed on map in editor, and as a script, so more advanced users can alter the algorithm itself as needed.

Installation

Module version:
put
@RYD_Scam
folder same place, where all other addons are stored, and play with addon. Now new module should be available in editor.

Script version:
put
SmartCam
folder in your mission folder. To init use such code in the init.sqf file or init field of any object on map:

nul = [] execVM "SmartCam\CamInit.sqf";

See included manual for configuration and usage details. Enjoy. :)

Changelog

1.1

- two new config variables for changing camera transition height and target change frequency;

- default camera transition height changet to 3 meters;

- improved smoothness of camera handling, especially for aerial targets;

- changed shaking pattern;

- added new evaluation factors for target choosing: known enemy and assigned target, both influenced by distance factor;

- improved chance for showing static weaponry;

- fixed some camera position choosing issues;

- fixed death cam mode interferations with activated smart camera;

- a few other fixes.

Project was created "by player for players", source scripts you can freely modify, copy, "cannibalize", to use in your projects. It is released under APL-SA license. I'll be grateful for notification about each such usage.

Edited by Rydygier
1.1

Share this post


Link to post
Share on other sites

Rydygier, very interesting add-on. It's really fun to watch my missions unfold without having to control a camera.

I'll have it supported in PlannedAssault in it's next update (so, when chosen, the mission will be observed by SmartCamera).

Two suggestions:

- when transitioning from one unit to another, the camera climbs a lot instead of staying low. If it were to stay low, the transition would be more dramatic, and easier to watch (fewer camera direction changes). GCam2 has low transitions which look better IMO. Switching camera targets earlier to the new target during the transition would also help.

- I've been testing SmartCamera in a mission with involving fairly static defenders, including two crew-served TOW ATGMs and a M252 81mm mortar crew. SmartCamera never ever showed these units, even though the mortars fired two missions. Perhaps increase the "firing" weight a lot for units that are fully static, so the camera pays attention to AA, ATGM, and artillery units.

Thanks again,

William

Share this post


Link to post
Share on other sites

Thanks, _William. Yes, static weaponry is rarely chosen, may need some balancing. In fact - for some reason, that I do not remeber exactly (code is a bit old, just refreshed and released now), bait factor for static weaponry is artifically halved. Probably because in some tests turned out, that static was chosen too often, I guess. I'll pay some more attention on it.

High altitude transitions are here for a reason. At the beginning transitions was just, like you suggested - low. So why this way? Problem is, when between current and new target there is higher ground, hill or something. Camera is going straight, not taking into account terrain contour, so in such case eventually we see no dramatic transition, but annoying "wallow in the grass". On maps like Chernarus, this is fairly often issue. So, to avoid that, first there is determined max height between start and final position, if is higher, then difference is added to the first and second transition stage, including some hardcoded altitude for trees avoidance. Firstly camera is going to reach that level, and only then is moved towards new position.

EDIT:

Just did some preliminary tests, and it is looking good. For next version "handicap" for static should be removed. As for transition altitude - I prefer to keep terrain avoiding height, but I can resign from 35 meters added due to trees. For testing changed this for 3.5 meters, and indeed - transitions looks better and more dramatic. Or probably I just make this additional height customizable... Thanks again for that advice.

An Arma voyeurism script, I like it!

:)

Edited by Rydygier

Share this post


Link to post
Share on other sites
Thanks, _William. Yes, static weaponry is rarely chosen, may need some balancing. In fact - for some reason, that I do not remeber exactly (code is a bit old, just refreshed and released now), bait factor for static weaponry is artifically halved. Probably because in some tests turned out, that static was chosen too often, I guess. I'll pay some more attention on it.

High altitude transitions are here for a reason. At the beginning transitions was just, like you suggested - low. So why this way? Problem is, when between current and new target there is higher ground, hill or something. Camera is going straight, not taking into account terrain contour, so in such case eventually we see no dramatic transition, but annoying "wallow in the grass". On maps like Chernarus, this is fairly often issue. So, to avoid that, first there is determined max height between start and final position, if is higher, then difference is added to the first and second transition stage, including some hardcoded altitude for trees avoidance. Firstly camera is going to reach that level, and only then is moved towards new position.

EDIT:

Just did some preliminary tests, and it is looking good. For next version "handicap" for static should be removed. As for transition altitude - I prefer to keep terrain avoiding height, but I can resign from 35 meters added due to trees. For testing changed this for 3.5 meters, and indeed - transitions looks better and more dramatic. Or probably I just make this additional height customizable... Thanks again for that advice.

:)

Thanks for clarifying.

Looking forward to the update with improvements for the static weapons. They'd be interesting to switch to once their knowledge of threats reaches 'visibility'. Not sure if you can detect locking on, but that might be a bit late for a transition.

William

Share this post


Link to post
Share on other sites

Predicting a shot early enough to show it can be tricky. Of course, I can add more factors affecting potential target attractiveness, that would boost its chance to be shown, for example if given vehicle knows about some enemy, or if has some assigned target, and the closer enemy is, the bait factor is bigger. This will increase chance, that we sometimes could catch particular "fireworks" on time, of course nothing guaranteed, it is always about statistical chances.

Share this post


Link to post
Share on other sites

Version 1.1 released. Links updated, changelog added. New config variables are described in manual.

Static weaponry shouldn't be neglected anymore. There is better chance to see units about to fire (known enemy and assigned target factors), do not expect miraculous clairvoyance though... Also was done some attempts to minimize risk of "The Catcher in the grass" effect.

Edited by Rydygier

Share this post


Link to post
Share on other sites
Guest

Thanks for informing us about the update :cool:

New version frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Very nice, just cam across this, will give it a test tonight always enjoy taking screens and vids so this should do nicely, thanks for the work.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×