Results 1 to 30 of 75

Thread: Settlements: File Formats; Take 2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Settlements: File Formats; Take 2

    I thought they were both Cas files. So there is no way of editing battle map buildings in M2TW yet?

  2. #2
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Settlements: File Formats; Take 2

    I think I concur with Alpaca, as much as Caliban has helped we are
    probably on our own as regards settlements. Sorry, haven't been
    monitoring this thread as I haven't done much. Here's where I've
    gotten to: can now read large_towns and it just gets worse. More
    data after the complexes/structures, the deployment outline is much
    larger etc. I've also been leaning towards the realization that Milkshape
    just doesn't have the data structures needed to hold the extra vertex
    information that is in the complexes/structures (these are the two
    "mystery blocks" that Caliban said were lighting and animations, I forget
    the integer codes but they are in an e-mail somewhere).

    So I'm stepping back and looking at 3dsmax as the only viable container
    for this. I don't own a copy of 3dsmax but Bwian has pointed me to gmax
    to learn MAXScript. I've slacked off on settlements to try and support
    animations and try and get models into 3dsmax via MAXScript.
    If I can just learn how to do a simpler problem then maybe settlements
    won't seem so insurmountable. (At least settlements don't have bones,
    my current headache in gmax.) However, to me it looks like the best
    outcome would be: we should be able to modify an existing structure
    (meaning a set of buildings, i.e. change the meshes to get a different
    architecture, change textures, etc.) but adding new ones probably
    involves changes to all the data the follows the complex/structures
    section that I just don't see how it could be done without some magic
    CA tutorial. (Not even possible I would think, that data is probably all
    granny driven anyway.)

    Real life problems, the tensioning spring on my lawn mower broke tonight
    so tomorrow evening is a hunt around for repair parts. Check back on
    Friday.

  3. #3

    Default Re: Settlements: File Formats; Take 2

    KE, I'm concerned about the fact that you're trying to import a whole settlement into Milkshape, and failing to do that given the constraints, find yourself necessary to go to another 3d platform. Remember my suggestion, that milkshape be only used as a kind of 3d reference tool, to know where to place buildings. If I gave you a set of coordinates and a bunch of building models, would you be able to produce a .model file from that? That's all that's really necessary here.

    Also why do you trouble yourself with converting all of the scripts to 3dmax form?? If for some reason we NEED 3dmax to do settlement editing, then let it be used only for settlement editing. I would be loathe to think that you wanted to do so much for the community and then got discouraged and left it half way... The modeling and animation scripts work (almost) perfectly (see my post in anims thread), so just merely having a way to do buildings, in 3dmax or otherwise, is the last piece of the puzzle. Because with Vercingetorix script we can already import RTW buildings into 3dmax, and thus being able to insert them into Medieval 2 would be just a dream.

  4. #4
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Settlements: File Formats; Take 2

    If only we had access to CA's blocksets. This would make it much easier to figure out which part of the file is which.

  5. #5
    feed me! Member Ashdnazg's Avatar
    Join Date
    Dec 2006
    Location
    Haifa, Israel
    Posts
    54

    Default Re: Settlements: File Formats; Take 2

    @KE: I'm currently working on a MAXscript importer/exporter for mesh files. Unfortunately I can only work on it in my vacations from the army so progress is rather slow
    If you want my WIP script, or any assistance, PM me and I might be able to help.
    Last edited by Ashdnazg; 10-11-2007 at 12:40.
    a.k.a Lord hokomoko @ the Lordz Modding Collective

  6. #6
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Settlements: File Formats; Take 2

    @ashdnazg
    Actually I'd love some help. I've got bones now using point nodes
    and skinops.addbone to add them into the mesh. I've got named
    selection sets which seem to be like Milkshape's groups. The problem
    right now is I can't do vertex weighting because the skin modifier
    I associated with the mesh says it has no vertices even though the
    mesh does. Here's the code snippet:

    Code:
    		theskin              = skin()
    		theskin.rigid_vertices = false
    		select themesh 
    		max modify mode
    		addModifier themesh theskin
    		for j = 1 to nbones do
                       (
    		   skinOps.addbone theskin (getNodeByName pnodes[j].name) 1
                       )
                    nb                   = skinops.getNumberBones theskin
                    print( "Number of bones in the skin = " + nb as string )
    
                    nv                   = skinops.getNumberVertices theskin
                    print( "Number of vertices in the skin = " + nv as string )
    I get 26 for the number of bones so that's working but 0 for the number
    of vertices. The documentation says it should return the number of its
    associated mesh. When I loop over the number of vertices and try
    to do

    skinOps.SetVertexWeights theskin i boneId_array[i] primaryweight_array[i]

    I naturally get an error. This is where I'm stuck.

    @SigniferOne
    Oh, I agree, no need to redo the Python animation utilities. You can
    anim merge and then import the new .ms3d file into 3dsmax so no need
    for that one. Would need an exporter though for any animations made
    in 3dsmax but that shouldn't be hard (famous last words). The other
    export skeleton functions in Python should be fine as is.
    Last edited by KnightErrant; 10-11-2007 at 17:30.

  7. #7
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Settlements: File Formats; Take 2

    Found the magic incantation:

    Code:
          selbitall            = #{1..themesh.numverts}
          themesh.selectedVerts = selbitall
          skinOps.resetSelectedVerts theskin
    This forces the skin to update internally and now it
    has vertices and the weighting part doesn't die.

    N.B. I first tried

    Code:
    skinOps.Invalidate theskin 1
    because the documentation said it would have the same
    effect but this killed gmax dead as a doornail.

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