Difference between revisions of "Spot fx animations and effects"
(→Spot_fx) |
|||
Line 21: | Line 21: | ||
The .cas files for spot_fx are placed in data/models_building/spot_fx. | The .cas files for spot_fx are placed in data/models_building/spot_fx. | ||
+ | |||
+ | ===Changing spot_fx cas files=== | ||
+ | Versions of [[IWTE]] from v21_11_c.exe onwards will correctly export and import the fx cas files to .dae for Blender/Max. | ||
+ | |||
+ | The important thing to note is the mesh naming and the transforms. The transforms tell the game where the effect should be moved to. | ||
+ | To add a new mesh create a flat plane at 0,0,0 if you need to include a rotation change the shape in EDIT mode so you can tell which way you've turned the plane. Then in OBJECT mode move and rotate the plane so it is centered where you want the effect. DO NOT apply the transforms, the end result in Blender still needs to show the transform values, see pic below: | ||
+ | |||
+ | [[File:Spot fx.jpg|200px|How the spot_fx file should look in object mode in Blender]] | ||
==Models_spot== | ==Models_spot== |
Revision as of 06:24, 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.
Changing spot_fx cas files
Versions of IWTE from v21_11_c.exe onwards will correctly export and import the fx cas files to .dae for Blender/Max.
The important thing to note is the mesh naming and the transforms. The transforms tell the game where the effect should be moved to. To add a new mesh create a flat plane at 0,0,0 if you need to include a rotation change the shape in EDIT mode so you can tell which way you've turned the plane. Then in OBJECT mode move and rotate the plane so it is centered where you want the effect. DO NOT apply the transforms, the end result in Blender still needs to show the transform values, see pic below:
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.