Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Spot fx animations and effects"

From TWC Wiki
Jump to navigationJump to search
(Created page with "Effects such as smoke, or animated effects such as the gatehouse flags are added to RTW and Rome Remastered using the spot_fx system. The spot_fx is a .cas model which gives...")
 
Line 1: Line 1:
 
Effects such as smoke, or animated effects such as the gatehouse flags are added to RTW and Rome Remastered using the spot_fx system.
 
Effects such as smoke, or animated effects such as the gatehouse flags are added to RTW and Rome Remastered using the spot_fx system.
  
 +
==Spot_fx==
 
The spot_fx is a .cas model which gives the location and rotation of the effect - the name of the mesh/es inside the .cas match the name of the effect to be called.  If you need two versions of the same effect you'd use 'smoke00' and 'smoke01' etc.
 
The spot_fx is a .cas model which gives the location and rotation of the effect - the name of the mesh/es inside the .cas match the name of the effect to be called.  If you need two versions of the same effect you'd use 'smoke00' and 'smoke01' etc.
  
Line 16: Line 17:
 
  '''spot_fx ''' barbarian_armourer_spot_fx.CAS
 
  '''spot_fx ''' barbarian_armourer_spot_fx.CAS
 
  }
 
  }
 +
 +
The gatehouse buildings have examples of spot_fx files which call animated 'models_spot' which give the animated flag effects.
 +
 +
The .cas files for spot_fx are placed in data/models_building/spot_fx.
 +
 +
==Models_spot==
 +
Data/models_building/models_spot/flag_horizontal_large.cas is an example of an animated spot effect.  The flag uses an armature and keyframes that are contained in the same file as the model, and does not use an external skeleton.
 +
 +
The models_spot need to be added to the game in the same way as building items. The existing ones are found in data/descr_items/di_spot_items.txt.  The horizontal flag is coded as:
 +
type flag_horizontal_large
 +
lod
 +
max_distance 200
 +
'''model_anim''' models_spot/flag_horizontal_large.CAS
 +
lod
 +
max_distance 4000
 +
model_rigid models_spot/flag_horizontal_large_low.CAS
 +
Note that the model_anim setting is needed for the high lod to use its animation.  The model_rigid version is provided to stop the game having to animate the object when out of viewing distance.

Revision as of 06:11, 23 November 2021

Effects such as smoke, or animated effects such as the gatehouse flags are added to RTW and Rome Remastered using the spot_fx system.

Spot_fx

The spot_fx is a .cas model which gives the location and rotation of the effect - the name of the mesh/es inside the .cas match the name of the effect to be called. If you need two versions of the same effect you'd use 'smoke00' and 'smoke01' etc.

The blacksmiths and armourers have examples of spot_fx using smoke. The .cas is added to the buildings dbb listing after the physical_info line:

barbarian_armourer
{
	stat_cat medium_wooden
	localised_name barbarian_armourer
	level
	{
		min_health 1
		battle_stats
		item		barbarian_armourer
		physical_info	info_barbarian_armourer.cas
		spot_fx		barbarian_armourer_spot_fx.CAS
	}

The gatehouse buildings have examples of spot_fx files which call animated 'models_spot' which give the animated flag effects.

The .cas files for spot_fx are placed in data/models_building/spot_fx.

Models_spot

Data/models_building/models_spot/flag_horizontal_large.cas is an example of an animated spot effect. The flag uses an armature and keyframes that are contained in the same file as the model, and does not use an external skeleton.

The models_spot need to be added to the game in the same way as building items. The existing ones are found in data/descr_items/di_spot_items.txt. The horizontal flag is coded as:

type					flag_horizontal_large
lod
max_distance				200
model_anim					models_spot/flag_horizontal_large.CAS
lod
max_distance				4000
model_rigid					models_spot/flag_horizontal_large_low.CAS

Note that the model_anim setting is needed for the high lod to use its animation. The model_rigid version is provided to stop the game having to animate the object when out of viewing distance.