Modifications
Titan Quest - Powered by vBulletin
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42

Thread: Using the Viewer to Attach Meshes

  1. #1
    Delayomancer Munderbunny's Avatar
    Join Date
    May 2008
    Posts
    5,413

    Using the Viewer to Attach Meshes

    I've used the viewer to do a number of things for my mod, from creating the sprites, to getting the shadow-link eyes to work. I'm very proud of this discovery, and (like the section 7 info) have wanted for a long time to tell others how to do it, but I promised myself I'd wait until I was finished with my mod so I'd have time to write up proper directions (as well as figure out exactly how I'm doing it--I've yet to confirm which exact directories need to have the resources, so I just have them everywhere). Also, I've been holding back partly because I've been sort of pissed at other modders who have refused to answer questions over the last year as I've worked on my mod, forcing me to figure a whole bunch of crap out myself (Kreeloo, again, the big exception, who has always been helpful--even showed me how to do animated textures!) But, since I released the first beta of my mod, I've been getting a higher-than-normal number of PM modding questions (NO MORE PMS!!! ASK IN PUBLIC FORUMS!!!)

    So, here's my crappy version that I'll hopefully be able to fix up more in the coming weeks:

    First thing is you'll need p0a's mesh compiler.

    Very simply, you can open a mesh with the viewer and see it's attachment info. The attachment points will be red squares as there's no underlying info about them available for the viewer. If you try to use the command "save mif data" command you'll get an error message. If you create a folder structure in your working/source directory that matches the path it's looking for, it'll save a file.mif (a blank text file).

    The mif data, it turns out, is all that attachment info at the end of a mesh from the first Attachment to the final bracket (don't ask me how long it took me to figure this out, it's ridiculous). So, cut and paste that info into that blank mif file. It'll look like this:

    Code:
    AttachPoint
    {
        name   = "SpecialHit01"
        parent = "Bone_Head"
        origin = (0.112440, 0.118757, 0.000000)
        xAxis  = (0.999947, -0.000008, 0.000000)
        yAxis  = (-0.000008, 1.000058, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "Upper Body"
        origin = (0.000000, 0.000000, 0.000000)
        xAxis  = (1.000000, 0.000000, 0.000000)
        yAxis  = (0.000000, 1.000000, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "BossAura"
        origin = (0.000000, -0.388673, -0.243117)
        xAxis  = (1.000000, 0.000000, 0.000000)
        yAxis  = (0.000000, 1.000000, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "HeadEffect"
        parent = "Bone_Head"
        origin = (0.086339, -0.029890, 0.000000)
        xAxis  = (-0.327140, -0.944975, 0.000000)
        yAxis  = (0.944962, -0.327140, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "Target"
        parent = "Bone_Spine02"
        origin = (0.171945, 0.119670, -0.008975)
        xAxis  = (1.000017, -0.000096, 0.000000)
        yAxis  = (-0.000096, 0.999972, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "Head"
        origin = (0.000000, 0.000000, 0.000000)
        xAxis  = (1.000000, 0.000000, 0.000000)
        yAxis  = (0.000000, 1.000000, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "R Hand"
        parent = "Bone_R_Weapon"
        origin = (0.000000, 0.000000, 0.000000)
        xAxis  = (1.000000, 0.000000, 0.000000)
        yAxis  = (0.000000, -1.000000, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "L Hand"
        parent = "Bone_L_Weapon"
        origin = (0.000000, 0.000000, 0.000000)
        xAxis  = (1.000000, 0.000000, 0.000000)
        yAxis  = (0.000000, 1.000000, 0.000000)
        zAxis  = (0.000000, 0.000000, 1.000000)
    }
    AttachPoint
    {
        name   = "Prey_Effect"
        parent = "MoveAXIS"
        origin = (0.000000, 0.000000, 2.745634)
        xAxis  = (1.000000, 0.000000, 0.000000)
        yAxis  = (0.000000, 0.020470, 0.999790)
        zAxis  = (0.000000, -0.999790, 0.020470)
    }
    RigidBodyDescription
    {
        parentName = "Bone_Root"
        childName = "Bone_Thorax"
        parentOrigin = (0.001674, 0.054337, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, 1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (-0.001674, -0.054337, 0.000000)
        childXAxis  = (-0.889415, -0.457101, -0.000002)
        childYAxis  = (0.457101, -0.889415, 0.000001)
        childZAxis  = (-0.000002, 0.000000, 1.000000)
        extents = (0.290000, 0.410000, 0.150000)
        collides = "true"
        density = "400.000000"
        playFallSound = "false"
        FusedBone
        {
            name = "Bone_Tail01"
            origin = (0.140669, 0.484891, 0.000000)
            xAxis  = (0.062473, 0.998047, 0.000000)
            yAxis  = (-0.998047, 0.062473, 0.000000)
            zAxis  = (0.000000, 0.000000, 1.000000)
        }
        FusedBone
        {
            name = "Bone_Waist"
            origin = (0.042616, 0.054337, 0.000000)
            xAxis  = (1.000000, 0.000000, 0.000000)
            yAxis  = (0.000000, 1.000000, 0.000000)
            zAxis  = (0.000000, 0.000000, 1.000000)
        }
    }
    RigidBodyDescription
    {
        parentName = "Bone_Thorax"
        childName = "Bone_Spine01"
        parentOrigin = (-0.196905, 0.000000, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, 1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.196906, 0.000000, 0.000000)
        childXAxis  = (0.807413, -0.589986, 0.000000)
        childYAxis  = (0.589986, 0.807413, 0.000001)
        childZAxis  = (0.000000, -0.000001, 1.000000)
        extents = (0.280000, 0.250000, 0.230000)
        collides = "true"
        density = "200.000000"
        playFallSound = "false"
        FusedBone
        {
            name = "Bone_R_AttkArm01"
            origin = (-0.064599, 0.206980, -0.178254)
            xAxis  = (0.538874, 0.842386, 0.000003)
            yAxis  = (-0.842386, 0.538874, -0.000002)
            zAxis  = (0.000003, 0.000001, -1.000000)
        }
        FusedBone
        {
            name = "Bone_L_AttkArm01"
            origin = (-0.064600, 0.206980, 0.178254)
            xAxis  = (0.538885, 0.842380, 0.000003)
            yAxis  = (-0.842379, 0.538885, -0.000002)
            zAxis  = (-0.000003, -0.000001, 1.000000)
        }
    }
    RigidBodyDescription
    {
        parentName = "Bone_Tail01"
        childName = "Bone_Tail02"
        parentOrigin = (-0.284125, 0.000000, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, 1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.284126, 0.000000, 0.000000)
        childXAxis  = (0.999597, -0.028377, 0.000000)
        childYAxis  = (0.028377, 0.999597, 0.000000)
        childZAxis  = (0.000000, 0.000000, 1.000000)
        extents = (0.280000, 0.150000, 0.150000)
        collides = "true"
        density = "100.000000"
        playFallSound = "false"
    }
    RigidBodyDescription
    {
        parentName = "Bone_Waist"
        childName = "Bone_R_FrLeg01"
        parentOrigin = (-0.116505, 0.137518, 0.101988)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, 1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.116505, -0.137518, -0.101988)
        childXAxis  = (-0.081125, 0.003603, -0.996697)
        childYAxis  = (-0.995714, 0.044255, 0.081205)
        childZAxis  = (-0.044401, -0.999014, 0.000003)
        extents = (0.220000, 0.420000, 0.360000)
        collides = "false"
        density = "200.000000"
        playFallSound = "true"
        FusedBone
        {
            name = "Bone_R_MidLeg01"
            origin = (0.138289, 0.125735, -0.114398)
            xAxis  = (-0.068103, 0.003024, -0.997674)
            yAxis  = (-0.996690, 0.044297, 0.068170)
            zAxis  = (-0.044400, -0.999014, 0.000003)
        }
        FusedBone
        {
            name = "Bone_R_BkLeg01"
            origin = (0.141162, 0.417270, -0.101988)
            xAxis  = (-0.078055, 0.003466, -0.996943)
            yAxis  = (-0.995960, 0.044267, 0.078132)
            zAxis  = (-0.044403, -0.999014, 0.000003)
        }
        FusedBone
        {
            name = "Bone_L_MidLeg01"
            origin = (0.138289, 0.125735, 0.318373)
            xAxis  = (-0.062999, 0.002803, 0.998010)
            yAxis  = (-0.997025, 0.044316, -0.063061)
            zAxis  = (-0.044404, -0.999014, 0.000003)
        }
        FusedBone
        {
            name = "Bone_L_BkLeg01"
            origin = (0.141162, 0.417270, 0.305963)
            xAxis  = (-0.089651, 0.003987, 0.995965)
            yAxis  = (-0.994983, 0.044224, -0.089740)
            zAxis  = (-0.044403, -0.999014, 0.000003)
        }
        FusedBone
        {
            name = "Bone_L_FrLeg01"
            origin = (0.116505, -0.137518, 0.305963)
            xAxis  = (-0.089632, 0.003986, 0.995967)
            yAxis  = (-0.994985, 0.044224, -0.089720)
            zAxis  = (-0.044403, -0.999014, 0.000003)
        }
    }
    RigidBodyDescription
    {
        parentName = "Bone_R_AttkArm01"
        childName = "Bone_R_AttkArm02"
        parentOrigin = (-0.386109, 0.000000, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, -1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.386109, 0.000000, 0.000000)
        childXAxis  = (0.995552, -0.094215, 0.000000)
        childYAxis  = (-0.094215, -0.995552, 0.000000)
        childZAxis  = (0.000000, 0.000000, 1.000000)
        extents = (0.380000, 0.100000, 0.100000)
        collides = "true"
        density = "100.000000"
        playFallSound = "false"
    }
    RigidBodyDescription
    {
        parentName = "Bone_L_AttkArm01"
        childName = "Bone_L_AttkArm02"
        parentOrigin = (-0.386109, 0.000000, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, 1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.386109, 0.000000, 0.000000)
        childXAxis  = (0.995549, 0.094246, 0.000000)
        childYAxis  = (-0.094245, 0.995549, 0.000000)
        childZAxis  = (0.000000, 0.000000, 1.000000)
        extents = (0.380000, 0.100000, 0.100000)
        collides = "true"
        density = "100.000000"
        playFallSound = "false"
    }
    RigidBodyDescription
    {
        parentName = "Bone_Spine01"
        childName = "Bone_Spine02"
        parentOrigin = (-0.115123, 0.000000, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, 1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.115123, 0.000000, 0.000000)
        childXAxis  = (0.999342, -0.036260, 0.000000)
        childYAxis  = (0.036259, 0.999342, 0.000000)
        childZAxis  = (0.000000, 0.000000, 1.000000)
        extents = (0.110000, 0.150000, 0.150000)
        collides = "true"
        density = "100.000000"
        playFallSound = "false"
    }
    RigidBodyDescription
    {
        parentName = "Bone_R_MidLeg01"
        childName = "Bone_R_MidLeg02"
        parentOrigin = (-0.663023, 0.000000, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, -1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.663023, 0.000000, 0.000000)
        childXAxis  = (0.998102, 0.061591, 0.000000)
        childYAxis  = (0.061590, -0.998101, 0.000000)
        childZAxis  = (0.000000, 0.000000, 1.000000)
        extents = (0.660000, 0.100000, 0.100000)
        collides = "true"
        density = "100.000000"
        playFallSound = "false"
    }
    RigidBodyDescription
    {
        parentName = "Bone_R_FrLeg01"
        childName = "Bone_R_FrLeg02"
        parentOrigin = (-0.607801, 0.000000, 0.000000)
        parentXAxis  = (1.000000, 0.000000, 0.000000)
        parentYAxis  = (0.000000, -1.000000, 0.000000)
        parentZAxis  = (0.000000, 0.000000, 1.000000)
        childOrigin = (0.607801, 0.000000, 0.000000)
        childXAxis  = (0.998420, 0.056186, 0.000000)
        childYAxis  = (0.056186, -0.998420, 0.000000)
        childZAxis  = (0.000000, 0.000000, 1.000000)
        extents = (0.600000, 0.100000, 0.100000)
        collides = "true"
        density = "100.000000"
        playFallSound = "false"
    }
    JointDescription
    {
        rigidBody0 = "1"
        rigidBody1 = "6"
        jointType = "universal"
        jointConnection = "1"
        jointAxis0 = "y"
        loStop0 = "0.000000"
        hiStop0 = "0.142414"
        jointAxis1 = "z"
        loStop1 = "-0.389540"
        hiStop1 = "0.352871"
        breakable = "false"
        breakChance = "0"
    }
    JointDescription
    {
        rigidBody0 = "3"
        rigidBody1 = "7"
        jointType = "universal"
        jointConnection = "1"
        jointAxis0 = "y"
        loStop0 = "-2.480666"
        hiStop0 = "-0.985988"
        jointAxis1 = "z"
        loStop1 = "0.000000"
        hiStop1 = "2.643629"
        breakable = "false"
        breakChance = "0"
    }
    JointDescription
    {
        rigidBody0 = "3"
        rigidBody1 = "8"
        jointType = "universal"
        jointConnection = "1"
        jointAxis0 = "y"
        loStop0 = "-2.201233"
        hiStop0 = "-1.120507"
        jointAxis1 = "z"
        loStop1 = "-2.876202"
        hiStop1 = "2.454523"
        breakable = "false"
        breakChance = "0"
    }
    JointDescription
    {
        rigidBody0 = "3"
        rigidBody1 = "9"
        jointType = "universal"
        jointConnection = "1"
        jointAxis0 = "y"
        loStop0 = "-2.458254"
        hiStop0 = "-0.991860"
        jointAxis1 = "z"
        loStop1 = "-2.677324"
        hiStop1 = "2.694491"
        breakable = "false"
        breakChance = "0"
    }
    CreateEntity
    {
        attach = "BossAura"
        entity = "Records\Effects\Boss Effects\Boss Aura.dbr"
    }
    Don't use this actual info, as I've deleted a lot of it for space reasons.

    Now, once you save that info into the related mesh's mif file, open the viewer again and open that mesh. You'll notice the attachment points are now green, and if they call for any other meshes or particle effects, you'll see them in the viewer. You can now use the attach point commands and move the attachments around. Also, you can create a new attachment. The bone you affix it to will be the bone it moves from. So, if you fix an attachment point to the head, in game it'll move along with the head regardless of the distance from the head, dig?

    So, create a new attachment point and then move it to where you want (I find it easier to use just one axis arrow at a time to move an attachment into position.) Once you have it where you want, select its properties and choose "add." This will let you browse for another record to attach there. You can attach effects or other meshes (even other creatures, but if you want them in a particular animation, you'll need to change their default idle animation).

    Once you got whatever you want to attach in there (I recommend starting with something simple, like a weapon--lol, don't even ask how many different crazy weapon-monsters my gf and I made when I first figured this out--somewhere on my computer there's a gallery of screenshots of juvenile affixed monsters ).

    So, now with your mesh in there, and on your attachment point, you can rotate the item around (click the recycle-looking arrow to the right of the 4-arrow button). Again, you'll have each axis color coded.

    Once you got your mesh or effect in position, save mif data. Then, open the mif data and copy and paste it over the mif data in your decompiled mesh file. Then you need to change the section count to whatever it is now. Thanks to Kreeloo, I now know that you can just select the text in Notepad++ and it'll tell you how big it is. My method before was to cut and paste the section into a blank text file then save it, then right-click on it and show properties to show the exact byte count (when I used to work on meshes, I'd have like 93487593485748 of these files littering my desktop--god bless the Kreeloo for ending this madness).

    Then recompile the mesh and add it to a resource archive. You can use the archivetool to do this. Link your creature or item record item to this new mesh, and it'll show up in game that way.

    Now, for xpack records and whatnot, I have all the all extracted and available in my source directory, my working directory, and in my tq install directory. In addition, for working with custom-made effects and meshes, you have to build them into the IT install DB then replace the TQ DB with it so it'll show up in the viewer.

    Sorry I don't have time to do newbie directions for those who just want to play around with it, full of links and sub-directions on how to use the related programs. If you don't know what the archive tool is, or you don't know how to use the art manager (or how to build changes into a database), you have other stuff to learn loooooong before you learn how to do this--trust me; this can be a pain in the *** even if you do know what you're doing.

    If you're a modder working on a project, and you're having trouble getting this to work, feel free to ask me here, in this thread. I really can't do PM "how?" questions anymore because of the duplicate/similar questions, and I don't want to be a **** who starts to ignore PMs. Especially since I've benefited from PM questions before.

  2. #2

    Re: Using the Viewer to Attach Meshes

    011010010110111101010100101100010100110100

    *overload*
    *crashes*

  3. #3
    Delayomancer Munderbunny's Avatar
    Join Date
    May 2008
    Posts
    5,413

    Re: Using the Viewer to Attach Meshes

    lol

    Now you know why I've procrastinated posting these directions for so long. I always imagined I would do some crazy colorful and clear posting like Kreeloo would do, and it would be super awesome. And every I sit down to do it, I just sort of huff and roll my eyes and am like, "Ugh...maybe some other day."

    But, on the bright side--for people who've already made efforts to mess with the viewer before, and have changed skins and stuff on meshes, what I've written will be very easy for them to follow.

  4. #4

    Re: Using the Viewer to Attach Meshes

    Sorry to bother you again - would you please elaborate on the "Then you need to change the section count to whatever it is now. " - part?

    I edited the mif's new attachement point into the mesh (just one point, left the rest as they are) and tried your saving method to get the section count by bytes (Notepad doesn't show size for me) - and it's the same size as before. Yet, CSV2MSH will not convert the file, it just goes into a loop creating a huge file. How do I measure the size anyway, should I count the "Section Count=x and "size=x" rows too? And do I need to edit Section count, or just size? What does section count means, anyway?

    Please help me out here, I thought I was close to creating a weapon attachment point for the empusa...

  5. #5
    Delayomancer Munderbunny's Avatar
    Join Date
    May 2008
    Posts
    5,413

    Re: Using the Viewer to Attach Meshes

    Well, first the section size is the total number of characters. I believe I recommend notepad++, which will show your char count for any selection. Select from the first "AttachPoint" to the end of the section. If you use notepad, you can do it like I did, which is save that section to it's own txt file, then right-click on the file and look at the total bytes.

    But, there are some xpack meshes that neither p0a's converter, nor meshdrawcs can seem to work with, and the empusa mesh might be one of them.

  6. #6

    Re: Using the Viewer to Attach Meshes

    For counts, do I need to count the spaces too? WEll if that's the case, then I think the compiler cannot edit this mesh, as it still doesn't work.

  7. #7
    Demigod lufe's Avatar
    Join Date
    Jan 2008
    Posts
    1,000

    Re: Using the Viewer to Attach Meshes

    Quote Originally Posted by Swift View Post
    For counts, do I need to count the spaces too? WEll if that's the case, then I think the compiler cannot edit this mesh, as it still doesn't work.
    Swift, are you using Notepad++? It's NOT notepad. Notepad might add weird characters at the end of the file and create troubles.

    You can find Notepad++ here: http://notepad-plus.sourceforge.net/uk/site.htm
    Try AllSkins mod, enhance your character's looks!!!

  8. #8
    Delayomancer Munderbunny's Avatar
    Join Date
    May 2008
    Posts
    5,413

    Re: Using the Viewer to Attach Meshes

    Quote Originally Posted by Swift View Post
    For counts, do I need to count the spaces too? WEll if that's the case, then I think the compiler cannot edit this mesh, as it still doesn't work.
    Yeah, the spaces too. If you just right-click on the text file you saved with the mif data and hit "properties" it'll tell you (in parenthesis) the actual count. Use that number. And notepad doesn't add weird characters.

  9. #9

    Re: Using the Viewer to Attach Meshes

    Hi guys,

    I have a question about this part:

    So, create a new attachment point and then move it to where you want (I find it easier to use just one axis arrow at a time to move an attachment into position.) Once you have it where you want, select its properties and choose "add." This will let you browse for another record to attach there. You can attach effects or other meshes (even other creatures, but if you want them in a particular animation, you'll need to change their default idle animation).
    My Viewer doesn´t have anything I could attach to my Creature´s mesh? What do I have to do?


  10. #10
    Demigod lufe's Avatar
    Join Date
    Jan 2008
    Posts
    1,000

    Re: Using the Viewer to Attach Meshes

    *removed since the information was wrong*
    Try AllSkins mod, enhance your character's looks!!!

Page 1 of 5 123 ... 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
  •