Results 1 to 12 of 12

Thread: Examining raw building models & Primergy's EFLINE tool

  1. #1
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Examining raw building models & Primergy's EFLINE tool

    CA provided several raw files in its previous "Assembly Kit", some of them being buildings.

    BASIS
    NON GARRISONABLE vs GARRISONABLE BUILDINGS

    First, we have to consider two buildings types :

    1. Non garrisonable building are models where units cannot enter, they can be considered as simples "sets"
    2. Garrisonable building are models where units can enter and use such as coastal battery, castle walls, etc.



    Depending of building type, model design and organization are different.


    FROM RAW FILES TO GAME FILES

    First, you will find buildings files inside …\raw_data\art\battle\land\models\architecture\buildings directory

    Raw files are :
    • .max : 3d models
    • .xml : extra information such as EFlines



    Intermediate conversion process files :
    • .CS2 : results of the export of .max and .xml files using CS2 converter.
      BoB import .CS2 to generate all files and data (db tables) needed by the game engine



    S2TW game file formats :
    • xxxxx.rigid_model_v2 : 3d model (shape)
    • xxxxx_cs2.parsed : collision model
    • xxxxx.rigid_model_header : ?




    OBJECTS
    EXAMINING OBJECTS COMPOSING BUILDING MODEL

    NAMING CONVENTIONS
    • Model pieces : …_piece01a_..., …_piece01b_..., etc.
      A piece can be composed of several components, such as framework, walls and roof. They will be respectively name piece01a, 01b and 01c.
    • Destruction levels : …_destruct01_..., …_destruct02_..., etc.
    • Lods : …_lod01, …_lod3, and …_lod5
      Lods [Level of Detail) are decreasing complexity variants for a model. Lod1 is the best detailed model used at short distance from camera when lod5 is the lowest detailed model, used when far from camera.
    • Model piece name look like <piece name>_<destruction level>_<lod level>
      Example : piece01b_destruct02_lod1 means piece01b, second destruction, lod1 (highest definition)



    COMPONENTS COMMON TO GARRISONABLE AND NON GARRISONABLE BUILDINGS:
    • piece01a_destruct01_lod01 : model piece shape
    • IP_fire, IP_smoke : define effects such as fire, smoke, light.


    NON GARRISONABLE BUILDING MODEL SPECIFIC COMPONENTS:
    • piece01_destruct01_collision3d : 3d shape representing collision model, eg. Information
      about where are solid volumes (unpassable areas) ;
    • piece01_destruct01_hard : 2d spline following the edges of the building
    • render_plane :


    GARRISONABLE BUILDING MODEL SPECIFIC COMPONENTS:
    • EFline_piece01_destruct01_line001 : an feline is a 2d object (spline) that is used to define where units can stand. The object called EFline in .max model is not the true efline, but is used to represent it and is tied to eflines defined in the … _tech.xml file.
    • …_tech.xml : this file contains data about eflines, it is possible that it contains too information about how to place guns.


    BRIDGE BUILDING MODEL SPECIFI COMPONENTS:
    Bridge models are similar to non-garrisonable buildings one, but use a specific object.
    • ..._platform : this object seems to be used to define passable area such as a bridge




    LAYERS

    Objects defined above are grouped in several layers.
    Layers Depends of building type (garrisonable, non-garrisonable and bridges).


    1. NON-GARRISONABLE BUILDINGS

      Objects are organized into several layers as shown in the printscreen below :


      • DEFAULT :
      • RAINSKIRT :
      • _EXTRAS :
        • RENDERPLANE : Seems to be use to "store" a render plane, representing ground

      • _TECH
        • IP_SMOKE_SMALL : particle effect, smoke
        • IP_SMOKE_LARGE : particle effect, smoke
        • IP_FIRE_SMALL : particle effect, smoke
        • IP_FIRE_LARGE : particle effect, smoke
        • FIRELIGHT : effect, fire light
        • PIECExx_DESTRUCTxx_COLLISION3D : collision model
        • PIECExx_DESTRUCTxx_HARD : collision surface at ground level (?)


      • PIECExx_DESTRUCTxx_LODxx

        Contain the different pieces composing the model.

        Example 1 : piece01_destruct01_lod01 layer contain 6 objects composing the farm


        • piece01a_destruct01_lod01
        • piece01b_destruct01_lod01
        • piece01c_destruct01_lod01
        • piece01d_destruct01_lod01
        • piece01e_destruct01_lod01
        • piece01f_destruct01_lod01


        Example 2 : piece01_destruct02_lod01 layer contain only 2 objects representing the destroyed farm (2d destruction level)



        • piece01a_destruct02_lod01
        • piece01b_destruct02_lod01


        You will have one layer for each destruction level (here destruct01 (non-destroyed), destruct02 and destruct03) and for each lod (here : lod1, lod3 and lod5).
        In this case, as we have 3 destruction levels and 3 lods, we will have 9 layers.
      • TECH_XML : seems to been unused here
        Maybe is it possible to define EFlines, even if this model is not garrisonable.


    2. GARRISONABLE BUILDINGS
    3. BRIDGES




    EFLINES

    About EFLines, it is necessary to have both .max model and _tech.xml files to use CS2 converter.
    _tech.xml file contains informations about Efline.

    BUT, I don't know how CA create the xml file.

    Moreover, if you have a look to EFline from .max model, particularly Object Properties > User Define, you can see that EFline in .max model are not the same than what seem to come from _tech.xml.
    For example, EFline_piece01_destruct_01_line001 seems to correspond to EFline_piece01_destruct_01_line016 from _tech.xml
    But when you look at _tech.xml and EFline_piece01_destruct_01_line016 this is completely different.

    user defined properties : EFline_piece01_destruct_01_line001
    EFLine_Name = EFline_piece01_destruct01_line029
    EFLine_Action = Low wall
    EFLine_Info = x:"-18.622" y:"3.295" z:"3.071"
    EFLine_Direction = x:"-0.381" y:"0.0" z:"0.0"
    _tech.xml
    <ef_line name="EFline_piece01_destruct01_line029" action="Overflow">
    <end x="3.531" y="-12.274" z="5.711"/>
    <end x="-3.279" y="-12.274" z="5.711"/>
    <direction x="0.0" y="-0.38" z="0.0"/>
    When I compare EFline position in 3ds max and EFline coordinates from _tech.xml, I think that they corresponds.
    So, I don't understand what is the use of "user defined properties" data, probably none.



    Some eflines are represented using their coordinates from stronghold_temple_building_tech.xml file.
    Line had been created using SPLINE > LINE and KEYBOARD ENTRY to define x,y,z coordinates




    What could be useful would be a tool that create eflines coordinates in _tech.xml from the .max model.
    The process could be like this :
    1. drawing line corresponding to eflines in .max model
    2. exporting coordinates to _tech.xml
      • x,y,z coordinates for both segment [AB] extremities
      • calculate direction

    3. eventually export efline type (low wall / overflow), maybe converting color into type ?


    xml format look like this :

    <ef_line name="EFline_piece01_destruct01_line080" action="Low wall">
    <end x="-18.467" y="19.261" z="3.071"/>
    <end x="-4.088" y="19.261" z="3.071"/>
    <direction x="0.0" y="0.381" z="0.0"/>
    </ef_line>


    An interesting find in tech.xml file is about artillery :
    <ef_artillery_info>
    </ef_artillery_info>
    Sadly, I can't find more information as CA didn't provide raw file for model using artillery (such as coastal battery or tower).
    So, I don't know how to format data.


    PRIMERGY'S EFLINE TOOL

    Usage:

    Extract the folder and copy it to 3dsMaxdirectory/scripts/
    Run by clicking on Maxscript, run script --> EFtoolsbuttons - this opens the dialog.

    Create a new Spline with only two points. First set the properties (which building piece, which destruction level) and which type it has. Different types have different effects. "Low wall" makes soldiers kneel while firing and so on.
    Then use the add direction button, afterwards you are good for exporting. Choose a directory and a name which fits with the building name (like acw_eftest_tech.xml")

    Use Bob and have fun with your garrisonable building.

    Attachment 307336

    Example:

    Spoiler Alert, click show to read: 


    Primergy (#109)
    Last edited by wangrin; August 15, 2014 at 02:54 AM. Reason: adding Primergy's EFLINE tool


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  2. #2
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining raw building models

    [RESERVED] NON GARRISONABLE BUILDING
    Last edited by wangrin; June 23, 2013 at 04:00 PM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  3. #3
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining raw building models

    [RESERVED] GARRISONABLE BUILDING


    First trial : creating a redoubt

    Objective : create a garrisonable building able to house one unit (150-200men)

    The model is intended to be composed of 3 pieces and 2 destruction levels
    • piece01a : earthwork
    • piece01b : entrance protection
    • piece01c : footbridge

    If possible, the model is also intended to use a feature from bridge buildings : platform object
    This object seems to be use to define passable area.
    The idea would be to use it to allow unit to enter using breaches.


    Unit will be place along eflines :

    As I don't know how CA create EFlines (xml file), the only solution I have tight now is to do it "by hand".
    But it's is a long and boring process :
    • drawing splines (segments) representing eflines and note their coordinates
    • placing EFline object at the center of the segment
    • writing the xml file


    Last edited by wangrin; June 24, 2013 at 07:00 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  4. #4

    Default Re: Examining raw building models

    Interesting stuff. +rep. Is it possible to use them in TEd?

  5. #5
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining raw building models

    I never used TeD, so, I don't know how the tool list available buildings.
    Last edited by wangrin; June 24, 2013 at 04:08 AM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  6. #6
    Indefinitely Banned
    Join Date
    Nov 2011
    Location
    The western part of an Island They thought a kind of Coffee...
    Posts
    1,932

    Default Re: Examining raw building models

    Hmmh, CA didn't provide raw models for both building nor ships with artillery in it...(They only provided Kobaya ship model...)

    Although, there are some buildings that exists, but not available normally on TEd, which are can be made to be usable through some db modding...Its Frodo's EMFAB, I think...

  7. #7
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining raw building models

    It is possible to export S2TW building using UU3D + ETW plugin.
    It's not perfect, but it is possible.
    Problem is that we have no informations about how to place guns.
    I didn't find informations in models_building tables, so I suppose that such informations are stored in cs2.parsed files.

    We really need that CA release some more raw models.
    I would suggest :

    • coastal battery (should be useful to know how to place guns)
    • castle tower (same as above)
    • castle gate (should be interesting to know how gates work)
    • castle wall (interesting model to work on EFlines)
    • torpedo boat (who want a submarine ^^)
    • a ship with guns
    • a ship with sail (to know how to create them)


    I would add a parrot gun too, because we have had problem to import raw models I've created for I.S (ETW mod).
    Last edited by wangrin; July 09, 2013 at 03:22 PM.


    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  8. #8
    wangrin's Avatar Unguibus et Rostro
    Patrician Artifex

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Examining raw building models & Primergy's EFLINE tool

    UPDATE : adding Primergy's EFLINE tool

    sources : [Resource] Examining models_naval tables and CA's ship model (#109)

    PRIMERGY'S EFLINE TOOL

    Usage:

    Extract the folder and copy it to 3dsMaxdirectory/scripts/
    Run by clicking on Maxscript, run script --> EFtoolsbuttons - this opens the dialog.

    Create a new Spline with only two points. First set the properties (which building piece, which destruction level) and which type it has. Different types have different effects. "Low wall" makes soldiers kneel while firing and so on.
    Then use the add direction button, afterwards you are good for exporting. Choose a directory and a name which fits with the building name (like acw_eftest_tech.xml")

    Use Bob and have fun with your garrisonable building.

    Attachment 307336

    Example:

    Spoiler Alert, click show to read: 



    « Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES

  9. #9
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining raw building models & Primergy's EFLINE tool

    Ah, thanks for collection the information!

  10. #10

    Default Re: Examining raw building models & Primergy's EFLINE tool

    the ETW-plugin was updated on 02.October...now we can load ALL of the Shogun2-Building-models into Ultimate Unwrap 3D, no longer only some of them...now all of them.

  11. #11
    Primergy's Avatar Protector of the Union
    Join Date
    Mar 2009
    Location
    Augsburg
    Posts
    2,491

    Default Re: Examining raw building models & Primergy's EFLINE tool

    Thats great, thanks for the information!

  12. #12

    Default Re: Examining raw building models & Primergy's EFLINE tool

    Any updates on this? Has anyone been able to get a custom garrisonable building working??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •