Jump to content
Sign in to follow this  
rübe

[demo] camera- & soundscript demo

Recommended Posts

Warning: it's a demo and not a mission you can play. If you're interessted in the latter, you're wrong here. This demo is primarily addressed to scripters/missionmakers.

preamble:

The idea was to quickly build a little demo to showcase two little cam-scripts. Well, it got a bit out of hands and ended up in a full blown camera & sound demo. Still, the core (or main things to share) are cam_panShot.sqf & cam_panShotFollow(Clocked).sqf.

The idea would be to put something like this into a module to assist the creation of cutscenes, intros and such stuff.. Though I can't guarantee that I ever will do it... It's just a proof of concept for now.

cam_panShot.sqf:

this script is for single pan-shots, where you target a position or an object, and define the start- and end-values of the relative distance, height and angle. Thus you can make nice non-linear panShots (circular, oval, whatever..).

If you have trouble with cam-scripting, this little script might be of great use to you, since you don't have to deal with all that camSet/Commit-stuff or any trigonometry...

cam_panShotFollow(Clocked).sqf:

this script builds on top of our cam_panShot.sqf and is an enhanced way to follow a given unit/vehicle, since we don't simply attach the cam to the unit/vehicle in question. (it's a bit randomized, and we react on the units movement a bit, to make it look more natural... hopefully). Also there's a clocked version, which I needed for the demo to synchronise the shots to the music, but I don't think, that this script will be of much use anyone...

The above scripts have some fancy accessory like `critical death` counteractive measures which replaces the target-object with a game-logic in case it died (projectiles tend to do such things.. hehe).. so we should never end up with ugly `[0,0,0] sea-shots`.

Second, we can pass an offsetMatrix (aswell as a mempoint) along with the target-Vehicle. Thus we can have shots, where that target isn't always centered, but for e.g. nicely placed a bit to the side...

And last but not least, we can pass a time-mapping function to our defining transitions (distance, height, angle) to get non-linear transitions.

Camera and soundscript demo:

What we have now is a bit more than a simple cam-script demo. It's a tool to watch a laid out mission with nice camera shots and synchronized music and it should work with any mission you have (just copy the init.sqf and the needed scripts/music-files, clear the immediateShotStack and there you go..)... And it could become a handy tool (module anyone?) to create or assist the creation of intros, cutscenes or thelike..

  • camera3.chernarus.pbo.zip (v.1.0)
    (hm, if this link doesn't work, copy it and paste it manually into the addressbar of your browser.. or visit http://armaii.verwalten.ch and click on the link there... (sorry, it's a free host.. but hey, no annoying popups or banners for you!)

About the mechanics:

Basically we pick a random unit (allUnits) and take that unit as target for the next shot. We have several different shot-types (extendable pool if you will...) and we pick them based on the units class (if defined) and to another part randomly again. Also there is a high chance to pick a unit of the same group for the next shot, to get a bit of consistency/to allow some understanding, hehe.

  • message-stack
    We can fill a message-stack. Messages will be poped and displayed (synchronised) at the beginning of the next shot.
  • blacklist, whitelist, immediate-shot-stack
    Now, to get back control, we have a blacklist (thus units will never get picked for our shots) and we have a whitelist (we only pick units from this pool). Then we have an immediate-shot-stack (if not empty, any unit in this stack will be poped next with highest priority). Those three pools can be modified throughout the mission (e.g. blacklisting some units at t0, unlisting them at t1, and whitelisting them at t2 or whatever). If something interessting happens, and you can note that by script, .. there you go, put the unit in question onto the immediate-shot-stack and it will be seen next. (you may put something ontop or at the bottom of the immediate-shot-stack! (in case there already are shots queued))
  • target selection
    The immediate-shot-stack may be used in several ways: besides objects/units, you may aswell pass a nullObj (random selection) as a target and still define the shot-type/-settings or submit some shot-code. Also you may limit the randomization and pick a random unit of a certain class (air, men, etc. work aswell as exact classnames such as USMC_Soldier_TL or RU_Soldier_Sniper).. thus you may randomise your cutscene a little each time it runs, and still have total control over it. (imagine three attacking teams to be shown in a cutscene, then you alternate with usmc teamleaders and east teamleaders or something like that!)
  • shot-code
    Every shot can have a shot-code, which will be executed exactly at the start of the shot. The shot-duration is passed to this shot-code. This is extremely usefull to perfectly time things like micro-movements (binocular) or speech or stuff like that.
  • scene dependend camera filters
    We may place some markers and define subtile camera filters for each. Then - every new shot - we pick that filter, whose marker is nearest to the camera. This should support the understanding of what-the-heck is going on here, if you have multiple scenes/distant places... So the recipient may instinctly know, we have switched the scene, etc..
    In the demo, we have two scenes, one with a blue-ish another with a red-ish filter. This should help a bit... hopefully. (btw. you can run cam-filters with shot-codes for single/special use)
  • synchronised music
    The idea is to synchronise music to the cam-shots and as a second goal, to have some progression going on. Synchronization is more or less ensured, since we know how fast our music is, so we can clock the shots accordingly on 1/4, 4/4, ... (or whatever). For the progression: there are several music-blocks (from slow/slight, to medium, to hard/fast) all with the same music-bits. Those music-bits are all on one note (E-bit, A-bit, C-bit, etc...) and thus, we can rearrange this music-bits into a song, and have some variance by means of switching the music-blocks. Unforunately scripting isn't that much fun with such time critical tasks, but IMHO it doesn't work too bad.

mission notes (read or you'll probably end up confused):

I probably should have used the whitelist a bit more (at all, that is) in the beginning, to introduce the recipient a bit better to the mission.. I'm not sure, one can follow that easily what's going on.. but for a `technical demo`, this shouldn't be too bad.

Anyway, quick briefing: there is a russion camp on a hill (main scene) and some west units attack. Second, there is an east artillery located west to this camp (side scene). This artillery will illuminate the main scene and begin to shoot smoke and HE too... of course, there is another west team (frostbite) which will try to disable this artillery.. Frostbite (aswell as most of the arty-units/guards) will be blacklisted for some time... Once frostbite begins to attack the artillery, those units there will be whitelisted, so we watch only the side scene until the scene is released (the arty blown up)...

There is also a arty-projectile-shot (immediate-shot)... though not half that nice as the bulletcam-script :/, hehe

Have a quick look, that should do it:

demo-mission.jpg

There are some immediate-shots in the beginning and some later inserted by script.. (paratrooper anyone?) But most of the time, you will watch random shots. Now remember, this is only a poor demo. You can easily make 100% controlled intros/cutscenes with this! (e.g. binocular-shot in the beginning, arty-radio-shot a bit later, ...)

remarks:

  • this demo has a crapload of AI (of course!), constant camFilters and scripts running... and thus could assrape your poor computer, though it doesn't work too bad here on a freaking laptop... in windowed mode. :/
  • have some patience.. though the shots are pretty cool (hehe) it's still no hollywood (thus things need some time to evolve, mission-wise).. Also, you might watch it a second time, for it will be totally different.
  • unpbo the demo and have a look at the scripts/comments, setup your own mission and give it a try! :D
    Or just take what you possibly might find usefull..
  • you can also deactivate the debug-info (general debug and the projectil-shot debug text)
  • any suggestions or feedback in general would be welcome.

I hope some will enjoy this. You may use and abuse any of the scripts as you like. If someone likes to put this nicely into a module (probably without the music stuff.. but the cam/shot-code stuff), go on and do it! (because I will not guarantee that I ever will... (bwahaha), though I really do feel something like this could be a handy module..)

tweak on!

rübe

Edited by ruebe

Share this post


Link to post
Share on other sites
Looks very useful but unfortunately the file download seems corrupted :(

theres a second one in the line below

Share this post


Link to post
Share on other sites

Huh... I'm talking about the demo one:Camera3.Chernarus.pbo zip file. I've dl'ed it about 5 times but every time I try to extract it I get one of those Winrar "unexpected end of archive errors"

Share this post


Link to post
Share on other sites
Huh... I'm talking about the demo one:Camera3.Chernarus.pbo zip file.

m2 lol. in the line below ( (hm, if this link doesn't work, copy....... ) theres a site linked that did the trick for me ;)

Share this post


Link to post
Share on other sites

hm, sounds like your version of winrar might be outdated. Anyway you can try to download this file: camera3.chernarus.zip (again, you probably can't directly click on the link...). I've packed it with another (older) application, so your winrar should be able to unpack it. Good luck ;)

Share this post


Link to post
Share on other sites

Thats weird :p

yeah, you mean at this site: http://armaii.verwalten.ch/

For some reason, my Winrar gives me an error everytime :confused:

Oh well, I'll wait for another mirror.

---------- Post added at 03:38 AM ---------- Previous post was at 03:34 AM ----------

Hehe, ok got it with the right click/save as

Time to update the old Winrar I guess.

Share this post


Link to post
Share on other sites

Wow, this was fantastic. Further over my head than that artillery shell shot, but still fantastic, great 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  

×