PDA

View Full Version : Unit 3d meshes



Aymar de Bois Mauri
11-19-2004, 16:07
I would like to know if we can add different meshes (for different factions) for the same unit. I know we can have different textures for different factions within the same unit, but can we do that for 3d meshes too?

Thanks in advance... :bow:

Aymar de Bois Mauri
11-28-2004, 00:30
Anyone? :help:

hoggy
11-28-2004, 09:44
If you create a new unit for each variant by prefixing the unit name with something like the faction name it would be possible ie. Seleucid Spearmen, Greek Spearmen then you could basically create new identical stats for each but use different CAS and texture files.

Duke John
11-28-2004, 10:07
In export_descr_units.txt is an entry for an unit which only has a single model.
In model_battle.txt there is an entry for the model which dictates a single CAS file but multiple textures.

I hope you understand now the hierachy. Or another try:
export_descr_units -> 1 unit entry = 1 model
model_battle.txt -> 1 model entry = 1 CAS file + multiple textures

So if you want a different model for the same unit, then you have to make a new unit entry. You can make the unit entirely identical except for model/texture, but for the engine the units are still different. So you cannot merge them.

Vercingetorix
11-28-2004, 11:30
You could get really creative do the following (just idea, probably works but not optimal)

1) Combine the two meshes and export them (no changes to skeleton)
2) Fix the texture so the first model is on the left and the 2nd on the right, what I mean is have both models use the same texture.
3) Alpha out the opposite model that you want.
4) Add in the textures to battle_models.txt

So it's not using two different cas files but you get the same effect. Problems I see with this is large texture files and also slow performance because even though the mesh may be invisible it's still being rendered down the pipeline which means you're basicly rendering twice as many units.

This is more of a "shit hit the fan we need to squeeze in an extra unit" solution

Aymar de Bois Mauri
12-01-2004, 21:59
What I meant was that in the export_descr_unit we have:

type barb archer dacian
dictionary barb_archer_dacian ; Archer Warband
category infantry
class missile
voice_type Light_1
soldier barb_archer, 40, 0, 0.9
attributes sea_faring, hide_improved_forest
formation 1.2, 1.2, 2.4, 2.4, 3, square
stat_health 1, 0
stat_pri 7, 2, arrow, 120, 30, missile, archery, piercing, none, 25 ,1
stat_pri_attr no
stat_sec 3, 2, no, 0, 0, melee, simple, piercing, knife, 25 ,1
stat_sec_attr no
stat_pri_armour 3, 4, 0, leather
stat_sec_armour 0, 0, flesh
stat_heat 2
stat_ground 2, -2, 3, 2
stat_mental 4, normal, untrained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 270, 170, 30, 40, 270
ownership dacia


And in the descr_model_battle we have:

type barb_archer
skeleton fs_fast_archer, fs_fast_dagger
indiv_range 40
texture dacia, data/models_unit/textures/unit_barb_warband_archer_dacia.tga
texture scythia, data/models_unit/textures/unit_barb_warband_archer_scythia.tga
texture slave, data/models_unit/textures/unit_barb_warband_archer_slave.tga
model_flexi data/models_unit/unit_warband_archer_high.cas, 8
model_flexi data/models_unit/unit_warband_archer_med.cas, 15
model_flexi data/models_unit/unit_warband_archer_low.cas, 30
model_flexi data/models_unit/unit_warband_archer_lowest.cas, max
model_sprite slave, 60.0, data/sprites/slave_barb_archer_sprite.spr
model_sprite scythia, 60.0, data/sprites/scythia_barb_archer_sprite.spr
model_sprite dacia, 60.0, data/sprites/dacia_barb_archer_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f

Couldn't this be altered to:

type barb_archer
skeleton fs_fast_archer, fs_fast_dagger
indiv_range 40
texture dacia, data/models_unit/textures/unit_barb_warband_archer_dacia.tga
texture scythia, data/models_unit/textures/unit_barb_warband_archer_scythia.tga
texture slave, data/models_unit/textures/unit_barb_warband_archer_slave.tga
model_flexi dacia, data/models_unit/unit_warband_archer_dacia_high.cas, 8
model_flexi dacia, data/models_unit/unit_warband_archer_dacia_med.cas, 15
model_flexi dacia, data/models_unit/unit_warband_archer_dacia_low.cas, 30
model_flexi dacia, data/models_unit/unit_warband_archer_dacia_lowest.cas, max
model_flexi scythia, data/models_unit/unit_warband_archer_scythia_high.cas, 8
model_flexi scythia, data/models_unit/unit_warband_archer_scythia_med.cas, 15
model_flexi scythia, data/models_unit/unit_warband_archer_scythia_low.cas, 30
model_flexi scythia, data/models_unit/unit_warband_archer_scythia_lowest.cas, max
model_sprite slave, 60.0, data/sprites/slave_barb_archer_sprite.spr
model_sprite scythia, 60.0, data/sprites/scythia_barb_archer_sprite.spr
model_sprite dacia, 60.0, data/sprites/dacia_barb_archer_sprite.spr
model_tri 400, 0.5f, 0.5f, 0.5f

That was specifically what I was asking for...

Aymar de Bois Mauri
12-01-2004, 22:02
If you create a new unit for each variant by prefixing the unit name with something like the faction name it would be possible ie. Seleucid Spearmen, Greek Spearmen then you could basically create new identical stats for each but use different CAS and texture files.
The problem is: I want to save unit space. Therefore, I wanted identical stats and completelly different 3d mesh and textures per faction, but all in the same unit.

Aymar de Bois Mauri
12-01-2004, 22:04
You could get really creative do the following (just idea, probably works but not optimal)

1) Combine the two meshes and export them (no changes to skeleton)
2) Fix the texture so the first model is on the left and the 2nd on the right, what I mean is have both models use the same texture.
3) Alpha out the opposite model that you want.
4) Add in the textures to battle_models.txt

So it's not using two different cas files but you get the same effect. Problems I see with this is large texture files and also slow performance because even though the mesh may be invisible it's still being rendered down the pipeline which means you're basicly rendering twice as many units.

This is more of a "shit hit the fan we need to squeeze in an extra unit" solution
Well, besides being a complicated process it has the negative part of decreased performance. That wouldn't be good.

Vercingetorix
12-02-2004, 06:47
Yep but it's currently not possible, my suggestion was if you had no other way...

Aymar de Bois Mauri
12-13-2004, 15:51
Too bad. Thanks anyway.

And thanks to all the others that have replied too.

:bow: