Gunfire Rate of Fire

Currently the rate of fire for the Gunfire effect is controlled through a slider which goes from 0-100%. Is this based on time independently of the project frame rate?

The reason of my assumption has to do with the fact that I'm noticing inconsistent "On/Off" states over the time  of the effect.  As an example, this results on having it On for just 2 frames and On again for 3 frames and On for 6 frames, resulting on rate of fire "disconnected" from the project frame rate. 

Comments

  • Triem23
    Triem23 Posts: 20,288 Power User

    Excellent question. My guess is no, since the slider is a random number generator effected by the seed flipping an on/off switch, but maybe a dev has a definite answer. 

  • Triem23, thanks for your input! 
    If you and I are correct about this, then the rate of fire really needs to change how it's calculated in order to give consistent On/Off states over the different project possible frame rates.

  • Triem23
    Triem23 Posts: 20,288 Power User

    I'm not certain if the tool is DESIGNED to give "consistent" On/Off states since that's driven by a random generator. The times I've need consistent fire I've just gone ahead and set rate of fire to 100% and done a little keyframing. I think the full-random is really intended for when one is really in a hurry, or if doing a group shot. For a single weapon in a short shot keyframes don't take long.

    Let's tag... Oh, @CedricBonnier

  • SimonKJones
    SimonKJones Posts: 4,370 Enthusiast
    edited February 2016

    The rate of fire value determines the percentage chance of the flash being 'on' for the given frame. So framerate isn't actually factor.

  • Thanks Simon! As I suspected, if I need a regular rate of fire, I need to manually key frame it!

  • SimonKJones
    SimonKJones Posts: 4,370 Enthusiast

    Indeed. Remember that even if a gun was firing at a completely regular rate, if it's a fast regular rate there's a good chance the camera wouldn't pick up every flash, which would then result in an irregular-seeming flashing

  • Triem23
    Triem23 Posts: 20,288 Power User
    edited February 2016

    @SimonKJones (sheesh, I try to give a man a break) just to clarify, the rate of fire is calculated as a percentage chance *per frame* and has no temporal factors as all? 

    Edit: building off Simon's last point note in 80's action films (i.e . firing actual guns) you'll see a lot more casings getting ejected than flares. 

  • SimonKJones
    SimonKJones Posts: 4,370 Enthusiast

    That's correct - it's a random generator per frame. It doesn't factor in framerate, or other factors such as duration of the layer.

  • Hey Simon, my original question had to do with a video tutorial you did where I got the impression that this control would save some time when we'd need to make shot bursts but if we really need to control the cadence in relation to the frame rate, key framing is the way to go!

  • Triem23
    Triem23 Posts: 20,288 Power User

    @SimonKJones thanks, good sir. I just wanted to be 100% certain since we've recently had it come up in discussion that keyframes are calculated in milliseconds and not necessarily on frame counts. I suspect knowing what Hitfilm is timing via an "absolute" clock (milliseconds) vs a "relative" clock (framerate) would be somewhat interesting as well as useful. 

    Kind of like how knowing that Grade Layers split 3D spaces can help organize Comp Shots--example: if one has a whole bunch of layers below a Grade just under a 3D setup that whole low section is a good candidate to split off as an embedded composite shot and proxy. Since a Grade Layer is really every layer below flattened to a 2D render then sent to effects, why not bake it? ;-) 

  • Aladdin4d
    Aladdin4d Posts: 2,466 Enthusiast

    Milliseconds to Frames converter

    For an added bit of realism set up a spreadsheet to do the same calculations and add in the real rate of fire for the weapon(s) you're using. That'll give you some baseline line values to work from.

    An AK-47 is typically 600 rpm on full auto. Bursts would be at the same rate. That works out to be 10 rounds per second, 100 ms per round.  

  • @Aladdin4D, thanks for the tip!

    Just a side question because of your nickname, are you a C4D user?

  • Aladdin4d
    Aladdin4d Posts: 2,466 Enthusiast

    @ULTRADIGITAL Ummmm not exactly even though I have used C4D and still have the version 1.0 installation floppies in my basement somewhere. Aladdin 4D was (kind of still is) another 3D animation package way back in the day. It was known for being one of the first if not the very first package to offer both procedural textures and volumetrics. Here's a short demo video - The first part covers another product called OpalVision and the Aladdin 4D demo starts @3:57. I already had both by the time this was broadcast.

    Fast forward a couple of years and the Amiga and Adspec Programming were dead. I was trying to make a Yahoo user account and everything I tried was already taken even just_call_me_rich_dammit. The manual for Aladdin 4D was on my desk so I figured what the heck why not and it worked as a username. Been using it ever since.

    I originally got Aladdin 4D at an Amiga show direct from the original author. I was MUCH younger back then and didn't have any money to speak of. It was the last day of the show and I had been having fun fooling around with the demo system when Greg Gorby came up to me and said if you're enjoying it that much you should buy a copy to take home. I said I'd love to but I can't afford it I've only got like 60 bucks or so. He said sold and handed me a boxed copy. The going price was 300 I think.

  • @Aladdin4D, thank you very much for this history lesson! 

    I didn't know this program. Actually in 1992 My use of the computer (and my friends, for that matter) was for playing video games. 

    Gregory was very nice to give an 80% discount. I guess that he saw your eyes sparkling while looking  at what the software could do at the time!