Results 1 to 10 of 10

Thread: Unit 3d meshes

  1. #1
    Father of the EB Isle Member Aymar de Bois Mauri's Avatar
    Join Date
    Nov 2003
    Location
    Staring West at the setting sun, atop the Meneltarma
    Posts
    11,561

    Default Unit 3d meshes

    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...

  2. #2
    Father of the EB Isle Member Aymar de Bois Mauri's Avatar
    Join Date
    Nov 2003
    Location
    Staring West at the setting sun, atop the Meneltarma
    Posts
    11,561

    Default Re: Unit 3d meshes

    Anyone?

  3. #3
    Senior Member Senior Member hoggy's Avatar
    Join Date
    Feb 2004
    Location
    Adel, Britannia
    Posts
    565

    Default Re: Unit 3d meshes

    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.

  4. #4
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Unit 3d meshes

    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.

  5. #5
    Modding Godfather Member Vercingetorix's Avatar
    Join Date
    Oct 2004
    Location
    I am but a figment of your imagination
    Posts
    453

    Default Re: Unit 3d meshes

    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
    I have found God.

  6. #6
    Father of the EB Isle Member Aymar de Bois Mauri's Avatar
    Join Date
    Nov 2003
    Location
    Staring West at the setting sun, atop the Meneltarma
    Posts
    11,561

    Default Re: Unit 3d meshes

    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...

  7. #7
    Father of the EB Isle Member Aymar de Bois Mauri's Avatar
    Join Date
    Nov 2003
    Location
    Staring West at the setting sun, atop the Meneltarma
    Posts
    11,561

    Default Re: Unit 3d meshes

    Quote Originally Posted by hoggy
    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.

  8. #8
    Father of the EB Isle Member Aymar de Bois Mauri's Avatar
    Join Date
    Nov 2003
    Location
    Staring West at the setting sun, atop the Meneltarma
    Posts
    11,561

    Default Re: Unit 3d meshes

    Quote Originally Posted by Vercingetorix
    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.

  9. #9
    Modding Godfather Member Vercingetorix's Avatar
    Join Date
    Oct 2004
    Location
    I am but a figment of your imagination
    Posts
    453

    Default Re: Unit 3d meshes

    Yep but it's currently not possible, my suggestion was if you had no other way...
    I have found God.

  10. #10
    Father of the EB Isle Member Aymar de Bois Mauri's Avatar
    Join Date
    Nov 2003
    Location
    Staring West at the setting sun, atop the Meneltarma
    Posts
    11,561

    Default Re: Unit 3d meshes

    Too bad. Thanks anyway.

    And thanks to all the others that have replied too.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO