Page 2 of 4 FirstFirst 1234 LastLast
Results 21 to 40 of 67

Thread: Naval models editing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    Cannons in previous XML are wrong, I accidentally printed x,y,x instead of x,y,z. And there were a few other errors, as expected from first version of anything.

    Anyway, that's now all fixed. Converter both ways is ready in etwng repository. No errors on round trips in any model from any of 4 games tested.

    Attached are (fixed) unpacked XMLs.

    That mostly ends my role in this. It's up to you guys to now turn these XMLs into something useful.

    Of course if you figure out what various things I label "a"/"b"/"c"/"something"/"zero"/etc. are, drop a message in this thread and I'll update converters to use better names.

    (I'm still taking requests for formats if anybody needs them, I'd love to figure out UI formats too, but without some xml example that might be too hard)
    Attached Files Attached Files

  2. #2

    Default Re: Naval models editing

    Fantastic work. I am watching with great anticipation.

    So in theory what will these new developments allow us to do?
    I see the cannon grouping / gun type part and EF lines, so we may be able to change gun configurations and crew movement areas? Has there been any developments on the re-conversion of the ship models so that edited models can be re-imported?

    Keep up the great work!

  3. #3
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    Quote Originally Posted by pappagoat View Post
    Fantastic work. I am watching with great anticipation.

    So in theory what will these new developments allow us to do?
    I see the cannon grouping / gun type part and EF lines, so we may be able to change gun configurations and crew movement areas? Has there been any developments on the re-conversion of the ship models so that edited models can be re-imported?

    Keep up the great work!
    Converter works both ways, XMLs can be reconverted back.

    It's going to be a major pain to edit something as complex as ship model in XML by hand, so another level of conversions will probably be required, but 3D modelling is not really my area of expertise.

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

    Default Re: Naval models editing

    Quote Originally Posted by pappagoat View Post
    Fantastic work. I am watching with great anticipation.

    So in theory what will these new developments allow us to do?
    I see the cannon grouping / gun type part and EF lines, so we may be able to change gun configurations and crew movement areas? Has there been any developments on the re-conversion of the ship models so that edited models can be re-imported?

    Keep up the great work!
    Well, in theory this means that you are now able to implement new ships (*cough*Ironclads*cough*), since we can now add new cannon positions. In practice this is still a lot of work. The best workflow would be, to export a ship using the assembly kit for shogun (without cannons), and then converting it with taws exporter, add the cannon lines, and reimport it again.

    Whats now left, is a script for 3ds max, which exports the data, like decks, pipes, bobbys, etc. I already have a script for buildings, which writes xml files and eflines. This one could be expanded to get the job done.

    Quote Originally Posted by taw View Post
    Converter works both ways, XMLs can be reconverted back.

    It's going to be a major pain to edit something as complex as ship model in XML by hand, so another level of conversions will probably be required, but 3D modelling is not really my area of expertise.
    Stupid me I should have cleaned the registry to delete remnants of old versions. Now it works.

    ---
    Edit:

    Taw, are you sure that the coordinates of the cannons get converted correctly? Because if I use the coordinates on those brownish boxes to simulate cannons, they are placed like this (which doesn't make much sense):
    Click image for larger version. 

Name:	test.jpg 
Views:	39 
Size:	28.8 KB 
ID:	324657
    Last edited by Primergy; April 27, 2015 at 02:44 PM.

  5. #5
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    Quote Originally Posted by Primergy View Post
    Edit:

    Taw, are you sure that the coordinates of the cannons get converted correctly? Because if I use the coordinates on those brownish boxes to simulate cannons, they are placed like this (which doesn't make much sense):
    Click image for larger version. 

Name:	test.jpg 
Views:	39 
Size:	28.8 KB 
ID:	324657
    LifeProTip: If you want to ask question, ask it in new post, I don't see any notifications that someone edited a post.

    As for the answer: No, cannons in attached XML are wrong, I accidentally XYX them instead of XYZ in first version. Just rerun current version of converter. If you have problems with current version of the converter, now that would be interesting.

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

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Naval models editing

    It allow to convert models_naval db tables to xml.
    Then you can eventually modify data "by hand".
    For example, you can already modify gun position.

    If you look at data such as deck, you can see that each deckxx define a face (a triangle).
    It would be a hell to modify such data by hand.

    But to create a complete converter, we would need a xml <> .max or any 3d file format to modify data.


    Taw do a very great job, and he really earn +Rep.
    The models_naval tables was the last tables that cannot be modded.
    No, we can already do some slight modification.
    Last edited by wangrin; April 26, 2015 at 12:05 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

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

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Naval models editing

    The latest JRuby version is the 9.0.0.0.pre1
    The current version for install of the JRuby 1.x series is the JRuby 1.7.19.

    So, I suppose I have to uninstall the old 1.5.6 and install the 1.7.19.

    Installing the 1.7.19 package install the 1.9.3
    Code:
    jruby -v
    jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 +jit [Windows 7-amd64]
    
    jruby -e 'puts RUBY_VERSION'
    io/console not supported; tty will not be manipulated 
    1.9.3
    
    jruby -e 'p wtf: :seriously'
    io/console not supported; tty will not be manipulated
    {:wtf=>:seriously}
    
    jruby --2.0 -e 'puts RUBY_VERSION'
    io/console not supported; tty will not be manipulated
    2.0.0
    Last edited by wangrin; April 26, 2015 at 02:12 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
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    Jruby 1.5.6 is definitely too old. Jruby 1.7.x or 9.x should work just fine.

    (if you happen to use 1.6, passing --1.9 argument would make it work, but just save yourself work and upgrade)

  9. #9
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    In case anybody is interested, I wrote a post on how I did all that DB decoding.

    Primergy: No, cannons in attached XML are wrong, I accidentally XYX them instead of XYZ in first version. Just rerun current version of converter :-)

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

    Default Re: Naval models editing

    Well, i think it's the actual version i downloaded from github

  11. #11
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    Which model is that? I'll take a look. It's possible I messed something up, the only thing I know for sure is that unpacker and packer do things the same way since I'm testing that round trip generates identical file. They could have same error :-)

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

    Default Re: Naval models editing

    I tried it with the 3 cannons of the chiyadogata_2 model

  13. #13
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    From ship-chiyodagata_2.xml, latest github version:

    <cannons>
    <cannon cannon_id="1" deck_id="1" type="cannon" x1="0.0" x2="0.0" y1="1.82" y2="1.822" z1="13.824" z2="14.076"/>
    <cannon cannon_id="4" deck_id="2" type="cannon" x1="-1.728" x2="-1.98" y1="1.199" y2="1.199" z1="-6.248" z2="-6.248"/>
    <cannon cannon_id="5" deck_id="2" type="cannon" x1="1.695" x2="1.947" y1="1.237" y2="1.237" z1="-8.328" z2="-8.328"/>
    </cannons>


    So x is left-right, y is height, and z is back-front?

    So cannon 1 is pointing front (z=13.8 to 14.1) on center of the ship on upper deck (y=+1.8).

    Cannons 4/5 are on lower deck (y=+1.2) pointing directly left (x=-1.7..-1.98) and right (x=1.69..1.94), but not located in the same place (z=-6.248 for left one, z=-8.328 for right one)

    All that sounds perfectly logical.

    (words "left", "right", "front", "up", "down" might be totally backwards)

    The only thing that looks weird is that script orders attributes alphabetically (x1 x2 y1 y2 z1 z2) instead of logically (x1 y1 z1 x2 y2 z2).

    Am I horribly confused here?

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

    Default Re: Naval models editing

    Ah okay, you are right. I see my error. 3ds Max is using the Z-axis as height axis instead of the y-axis. If i paste the values in the correct way, it makes more sense

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

    Default Re: Naval models editing

    yay, now it works - bow kobaya with cannons:



  16. #16
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    Quote Originally Posted by Primergy View Post
    yay, now it works - bow kobaya with cannons:


    So much win.

  17. #17

    Default Re: Naval models editing

    Quote Originally Posted by Primergy View Post
    yay, now it works - bow kobaya with cannons:


    Congratulations, my 4 years guerilla war against The CA was finally won by me
    ------ An American Civil War Modification for Total War : Shogun 2 ------

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

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Naval models editing

    ETW models_naval tables seems to use at least one more object : it define path to ship destruction .rigid_model_animation after defining path to rigging_model.xml and before naval cams.


    Trying to use the converter, I get error :
    Code:
    D:\TAW_models_naval_converter>jruby models_naval_unpack --empire test_etw_models_naval_tables test_etw_models_naval_xml
    io/console not supported; tty will not be manipulated
    Converting --empire
    Converting test_etw_models_naval_tables
    Converting test_etw_models_naval_xml
    Errno::EACCES: Permission denied - D:/TAW_models_naval_converter/test_etw_models_naval_tables
      initialize at org/jruby/RubyFile.java:362
            open at org/jruby/RubyIO.java:1177
            open at org/jruby/RubyKernel.java:349
      initialize at models_naval_unpack:35
          (root) at models_naval_unpack:477


    I get the same error when trying to convert TWS2 models_naval tables.
    Running the command prompt as administrator doesn't change anything.

    Code:
    D:\TAW_models_naval_converter>jruby models_naval_unpack test_tws2_models_naval_tables test_tws2_models_naval_xml
    io/console not supported; tty will not be manipulated
    Converting test_tws2_models_naval_tables
    Converting test_tws2_models_naval_xml
    Errno::EACCES: Permission denied - D:/TAW_models_naval_converter/test_tws2_models_naval_tables
      initialize at org/jruby/RubyFile.java:362
            open at org/jruby/RubyIO.java:1177
            open at org/jruby/RubyKernel.java:349
      initialize at models_naval_unpack:35
          (root) at models_naval_unpack:477
    No files from TAW_models_naval_converter seem to be accessed by an other program.
    The db file I use was extracted from TWS2 packs as binaries using PFM.


    « 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

  19. #19
    Artifex
    Patrician

    Join Date
    Oct 2008
    Location
    London, UK
    Posts
    1,332

    Default Re: Naval models editing

    It really sounds like "Run as administrator" kind of problem.

    Converting --empire
    Converting test_etw_models_naval_tables
    Converting test_etw_models_naval_xml
    Why does it say that? I don't remember this message.

    What's jruby -v ?

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

    Join Date
    Feb 2005
    Location
    France
    Posts
    4,397

    Default Re: Naval models editing

    First, I've ran console as user, but after getting this error, I run it as administrator.
    But I still have the same issue.

    jruby -v result :
    Code:
    D:\TAW_models_naval_converter>jruby -v
    jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 +jit [Windows 7-amd64]


    « 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

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

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