Jump to content
Phantom Hawk

How to animate Rocket flames

Recommended Posts

I have been trying to make a working rocket flame for my missile model I want the flame to appear 1 second after launch does anyone know how to do this?

Share this post


Link to post
Share on other sites

I assume the rocket is firing from a weapon? This is the sort of setup we've used on RHS missiles and rockets.

 

config.cpp parameters in cfgAmmo class:

	inittime 	= 1;	//1 second delay before thrust begins
	thrustTime	= 3;	//Rocket will thrust for e.g. 3 seconds. Copy this value to Hide_Flame anim's `maxValue` in model.cfg
	thrust		= 390;	//Rate of acceleration ms^-2. Rocket will accerlerate this much until thrustTime ends. Will not exceed maxSpeed
	maxSpeed	= 1029; //Top speed that the rocket can reach.

maxSpeed/thrust = time to reach max speed. Params can therefore be set so that this thrustTime is longer than, shorter than, or equal to the time it will take to reach maxSpeed, depending on desired boost/sustain characteristics of the rocket.

 

Important take away is that you will use the same value for thrustTime in the config.cpp, in the source = thrustTime; animation to hide the rocket flames when the motor cuts out. Otherwise the flames just stay on if the values don't match.


Model.cfg:

//Unhide flame when thrust begins, after initIime
			class Unhide_Flame
			{
				type		= hide;
				source		= thrustTime;
				selection	= fire;
				hideValue	= 0.0;
				unhideValue	= 0.05+0.25;
				minValue	= 0;
				maxValue	= 1;
			};
//Hides flame again when thrustTime ends
			class Hide_Flame: Unhide_Flame
			{
				hideValue	= 1;
				unhideValue	= 1.15;
				maxValue	= #thrustTime Value#;
			};

If you're not using an initime to delay the launch characteristics of the rocket and thus the flame appearing: set unHideValue param on class Unhide_Flame anim, to 1 for the one second delay.

 

Not necessarily answering your question, but may be useful if you are using an inittime delay on the rocket:

config.cpp parameters in cfgWeapons class:

initSpeed = 0; //initial launch speed (m/s) of the munition when trigger is pulled

If you want a kick booster etc to push it away from the firer, set this to some reasonable value. 0 will just free fall until ammo's initTime clock runs down.

Share this post


Link to post
Share on other sites
On 2/8/2018 at 3:13 AM, da12thMonkey said:

I assume the rocket is firing from a weapon? This is the sort of setup we've used on RHS missiles and rockets.

 

config.cpp parameters in cfgAmmo class:


	inittime 	= 1;	//1 second delay before thrust begins
	thrustTime	= 3;	//Rocket will thrust for e.g. 3 seconds. Copy this value to Hide_Flame anim's `maxValue` in model.cfg
	thrust		= 390;	//Rate of acceleration ms^-2. Rocket will accerlerate this much until thrustTime ends. Will not exceed maxSpeed
	maxSpeed	= 1029; //Top speed that the rocket can reach.

maxSpeed/thrust = time to reach max speed. Params can therefore be set so that this thrustTime is longer than, shorter than, or equal to the time it will take to reach maxSpeed, depending on desired boost/sustain characteristics of the rocket.

 

Important take away is that you will use the same value for thrustTime in the config.cpp, in the source = thrustTime; animation to hide the rocket flames when the motor cuts out. Otherwise the flames just stay on if the values don't match.


Model.cfg:


//Unhide flame when thrust begins, after initIime
			class Unhide_Flame
			{
				type		= hide;
				source		= thrustTime;
				selection	= fire;
				hideValue	= 0.0;
				unhideValue	= 0.05+0.25;
				minValue	= 0;
				maxValue	= 1;
			};
//Hides flame again when thrustTime ends
			class Hide_Flame: Unhide_Flame
			{
				hideValue	= 1;
				unhideValue	= 1.15;
				maxValue	= #thrustTime Value#;
			};

If you're not using an initime to delay the launch characteristics of the rocket and thus the flame appearing: set unHideValue param on class Unhide_Flame anim, to 1 for the one second delay.

 

Not necessarily answering your question, but may be useful if you are using an inittime delay on the rocket:

config.cpp parameters in cfgWeapons class:


initSpeed = 0; //initial launch speed (m/s) of the munition when trigger is pulled

If you want a kick booster etc to push it away from the firer, set this to some reasonable value. 0 will just free fall until ammo's initTime clock runs down.

Interesting. If I may ask, how many Lods did you guys have in the RHS grad (A2 Grad had 1, but I can't seem to figure out when the different Lods are triggered. Also, did you have shadow volumes or not? ), and how did you do the rocket flame part? (The A2 ones were just a vertical and a horizontal plane with a texture applied to them). Finally, what are the differences between the _He and _Fly versions of the rockets? The only thing I can think of is the rocket flames, or are there more differences? 

Share this post


Link to post
Share on other sites

For most of our missiles and rockets in RHS _fly is a variant of the model that is the projectile seen when fired (cfgAmmo model). And the other version is the model seen when the rocket is in the pod (cfgAmmo proxyShape) - it disappears once fired and switches to the model. _fly is the one that will typically have a model.cfg and animations for rotating the flames, fins etc. where the other model is usually static and has no model.cfg and may have some parts missing if the full rocket is not visible when inside the launcher

But in the case of the grad rocket model we use _fly for the submunitionAmmo created when the artillery simulation type reaches its terminal phase

So we have the rhs_r_m21OF_in model for the rocket as displayed in the GRAD barrel, the rhs_r_m21OF model with exhaust flames modelled for the firing phase, and the rhs_r_m21OF_fly model for the terminal phase with no exhaust flames (rocket motor should have burned out by then so no point modelling it)

IIRC projectile models always use the lowest LOD, so those model tend to only have one. But proxyshape might want several to aid performance when displayed on the carrier vehicle

m21OF_in has 3 resLODs, m21OF and m21OF_fly just have the one

They do have a very basic shadowLOD but IIRC the game doesn't render the shadow for the projectile so they're probably optional. We might just have one for the sake of firmly establishing that the game should not attempt to use the complex resLOD mesh for shadow generation by forcing it to use a simple svLOD instead if it ever does cast a shadow. However I guess a shadow can be useful if someone is spawning the model for display in a mission using createSimpleObject etc. Obviously the flame part is not in the shadow meshes - just the body of the rocket

Rocket flame model is a sort of cone-shaped 3D mesh on our grad rocket rather than just 2D planes, but on a lot of other things like R-77 missiles etc. it's a series of 2D planes. I'm not sure where the flame model originated for the grad (and other rockets like S-24, S-13) but it's probably based on something we found in Arma 2 data

  • Like 1

Share this post


Link to post
Share on other sites
On 2/17/2023 at 4:38 PM, da12thMonkey said:

For most of our missiles and rockets in RHS _fly is a variant of the model that is the projectile seen when fired (cfgAmmo model). And the other version is the model seen when the rocket is in the pod (cfgAmmo proxyShape) - it disappears once fired and switches to the model. _fly is the one that will typically have a model.cfg and animations for rotating the flames, fins etc. where the other model is usually static and has no model.cfg and may have some parts missing if the full rocket is not visible when inside the launcher

But in the case of the grad rocket model we use _fly for the submunitionAmmo created when the artillery simulation type reaches its terminal phase

So we have the rhs_r_m21OF_in model for the rocket as displayed in the GRAD barrel, the rhs_r_m21OF model with exhaust flames modelled for the firing phase, and the rhs_r_m21OF_fly model for the terminal phase with no exhaust flames (rocket motor should have burned out by then so no point modelling it)

IIRC projectile models always use the lowest LOD, so those model tend to only have one. But proxyshape might want several to aid performance when displayed on the carrier vehicle

m21OF_in has 3 resLODs, m21OF and m21OF_fly just have the one

They do have a very basic shadowLOD but IIRC the game doesn't render the shadow for the projectile so they're probably optional. We might just have one for the sake of firmly establishing that the game should not attempt to use the complex resLOD mesh for shadow generation by forcing it to use a simple svLOD instead if it ever does cast a shadow. However I guess a shadow can be useful if someone is spawning the model for display in a mission using createSimpleObject etc. Obviously the flame part is not in the shadow meshes - just the body of the rocket

Rocket flame model is a sort of cone-shaped 3D mesh on our grad rocket rather than just 2D planes, but on a lot of other things like R-77 missiles etc. it's a series of 2D planes. I'm not sure where the flame model originated for the grad (and other rockets like S-24, S-13) but it's probably based on something we found in Arma 2 data

Thank you very much. That was very helpful. I have another question, what are the differences between the base classes used for rockets (RocketBase, MissileBase, and SubmunitionBase)? From my testing, only the third can be used as an "artillery rocket," while the rest seem to fly infinitely before starting to fall, only to explode in the air. However, I want to create a "lob bomb," a rocket that accelerates shortly after launch before turning into a glide bomb. The problem with things that inherit from SubmunitionBase is that they can't have any attributes that deal with thrust, as that would make the rockets not appear in the game. Increasing the trigger distance seems to have a somewhat desired effect. Finally, is there any way to alter the launch angles calculated by the artillery computers in Arma 3, as the angles are always a bit steep? 

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

×