wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > Modeling Tutorials
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 01-25-2004, 10:08 PM   #1
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

Introduction

Geoset merging is taking a piece of one model (called a geoset) and inserting it into a new model. I just figured out this particular method myself after not being able to find a tutorial, so I give no gaurentees whatsoever as to the efficiency.

In this tutorial, we will make a peasant with the head of a skeleton.

Tools

The Process

1) Extracting the models
Open Warcraft III Viewer. If war3.mpq isn't already open, go to File-Open MPQ and open war3.mpq, located by default in C:\Program Files\Warcraft III\war3.mpq. Using the small window with the list of folders, browse to find the Peasant, which is at Units\Human\Peasant\Peasant.mdx . Go to Current File->Extract MDX and save it somewhere. Do the same for the skeleton, located at Units\Undead\Skeleton\Skeleton.mdx .

2) Editting the models
Open 3ds Max. Go to the Utilities tab, the furthest right tab, and select "Run script." Choose the MDX importer/exporter, impexpmdx.mse. In the new area that appears, choose the option labeled Static * and uncheck Bone Rotation. Click import MDX and browse to select the peasant.

For convience, delete everything except the head group. Select the group that includes the his head. Go to the Modify tab and enter vertex sub-mode. Select all the head vertices and scale them down to nothing. Move them to the neck area so they don't stick out at all.
Exit vertex sub-mode and select the editted geoset. Back in the Utilities tab, choose "Export selected as MDX". Export it as peasant_chunks.mdx. I use the "chunks" suffix to distinguish between complete models and unanimated geoset information.
Hide the group. Now import the skeleton model. There are two skeletons in it, one of which is only for falling apart during the death animation. I used the one that is standing up straight and just deleted the other one. Again, enter vertex sub mode. Scale all the vertices except the head into nothing and put them into the neck area so they don't stick out.
Now, you need to position it correctly. Otherwise, it will not be on his neck. Unhide the peasant group. Again in vertex sub-mode for the skeleton, select all the vertices and move the onto the neck.
Exit vertex sub-mode, select the geoset, and export as skeleton_chunks.mdx.

3) Combining the models
Convert the following four files to MDL: Skeleton.mdx, Peasant.mdx, Skeleton_chunks.mdx, Peasant_chunks.mdx.
  • Editing the peasant to be headless
    Open the Peasant.mdx and Peasant_chunks.mdx. Peasant_chunks.mdx contains all the vertex information you need, but Peasant.mdx contains all the essential animations as so on. You have to copy the vertex animation from one to the other. In Peasant_chunks, search for "Geoset" (no quotes). You should find an area like this:
    Code:
    Geoset {
        Vertices 302 {
            { 2.84348, 0.0383234, 74.9834 },
            { 2.84347, 0.0383427, 74.9835 },
            { 2.84344, 0.0383686, 74.9834 },
            { -6.64947, 7.36909, 27.8454 },
            { 1.56159, 13.7381, 35.8622 },
            { 0.86169, 12.2178, 29.2713 },
            { 8.90468, 6.93236, 27.4755 },
            { 10.265, 6.63715, 36.1995 },
            { -3.69442, 0.34387, 32.9351 },
            { -10.9366, -0.62374, 44.2371 },
            ......(lots more).......
            { 15.5051, 2.94313, 0.008 },
            { -9.65277, 15.4167, -0.0337 },
            { 11.5467, 17.3316, 0.20145 },
            { 1.01264, 16.2429, 8.70893 },
            { 6.97408, 9.91933, 9.11298 },
        }
    It continues like that. Copy starting from behind Vertices 302 to the line with the line "}".
    Now, in Peasant.mdx, search for Vertices 302. Select the area from there (Vertices 302) to when it closes (the lone "{"). Paste what you copied over it. You have now replaces the vertex information. If you where to convert this file to MDX and view it, it should be a headless peasant.
  • Adding the skeleton head
    Open skeleton_chunks.mdx. Search for geoset. Copy from there down to where there is a "}" not indented at all. You should pass Vertices, Normals, Tvertices, VertexGroup, and finally SelectionGroup. Paste it into Peasant.mdx just after the last geoset. To do that search for "Bone "gutz00" {" (no quotes again). That is the first bone, just below the last geoset. Paste the stuff you copied just before that line.
  • Making the head move correctly
    The head must move with the head bone. To accomplish that, scroll up just a few lines to find...
    Code:
        Groups 1 1 {
            Matrices { 1 },
        }

    It is that one that must be changed. It indicates which bone it should follow, so we need to find the head bone. Search for "bone_head" (no quotes).
    Code:
    Bone "Bone_Head" {
        ObjectId 18,
        Parent 10,	// "Bone_Chest"
        GeosetId 0,
        GeosetAnimId None,
    It is the ObjectID that we are after. Change the "Matrices { 1 }," bit to "Matrices { 18 },"
    Code:
        Groups 1 1 {
            Matrices { [b]18[/b] },
        }
  • Getting the right texture
    The skeleton head is designed to for the skeleton texture, so we need to point to it.
    Open Skeleton.mdx and look in the textures section (search for "Textures" to find it). In it, you'll see this:
    Code:
        Bitmap {
            Image "Textures\Skeleton.blp",
        }
    That point to the skeleton texture. Copy it and paste it into Peasant.mdx just after the last texture is listed there. Also change the 3 to 4 because that is how many texture there now are.
    Code:
    Textures [b]4[/b] {
        Bitmap {
            Image "Textures\Peasant.blp",
        }
        Bitmap {
            Image "",
            ReplaceableId 1,
        }
        Bitmap {
            Image "Textures\gutz.blp",
        }[b]
        Bitmap {
            Image "Textures\Skeleton.blp",
        }[/b]
    }

    Materials point to textures and are actually applied to geosets. Copy the first texture out of Skeleton.mdl and copy it into Peasant.mdl after the last one. Change the number of materials from 3 to 4. The TextureID need to be changed as well to point to the number of the texture we just pasted in. The counting starts at 0, placing the new one at 3.
    Code:
    Materials [b]4[/b] {
        Material {
            [i]Stuff[/i]
        }
        Material {
            [i]Stuff[/i]
        }
        Material {
            [i]Stuff[/i]
        }[b]
        Material {
            Layer {
                FilterMode Transparent,
                TwoSided,
                static TextureID [u]3[/u],
            }
        }[/b]
    }

    Finally, we have to point to the material in the new geoset. Scroll down the the new geoset and find MaterialID, near the bottom. Change it to 3, the number of the material we just made (starting from 0 again).

Convert to MDX using Yobguls' Converter and everything should work correctly.

In the future, I'll probably clarify sections and add pictures.

Last edited by Oinkerwinkle : 09-18-2004 at 11:49 PM.
Oinkerwinkle is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 01-25-2004, 10:13 PM   #2
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

MDX Importer/Exporter
Oinkerwinkle is offline   Reply With Quote
Old 01-25-2004, 10:13 PM   #3
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

Final result picture:
Oinkerwinkle is offline   Reply With Quote
Old 01-25-2004, 10:14 PM   #4
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

Final result MDX:
Oinkerwinkle is offline   Reply With Quote
Old 01-26-2004, 01:46 PM   #5
Mystique
User
 
Join Date: Nov 2003
Posts: 197

Mystique has little to show at this moment (0)

Default

When making the Peasent headless you say: First delete everything exept the head. Then scale the head down to nothing. Wouldnt that leave you with nothing left?
Mystique is offline   Reply With Quote
Old 01-26-2004, 10:25 PM   #6
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

Thanks for reading and pointing that out, but I said delete everything except the head group. That leaves the body and the head. Scaling the head down to nothing then would leave just the body.
Oinkerwinkle is offline   Reply With Quote
Old 01-27-2004, 01:45 AM   #7
Power
User
 
Join Date: Jan 2004
Posts: 42

Power has little to show at this moment (0)

Default

This should be stickied. but still, no one will see it. no one looks in the tutorials sections that i know of
Power is offline   Reply With Quote
Old 01-27-2004, 04:06 AM   #8
John_Drake
User
 
John_Drake's Avatar


Project Leader: DoC
 
Join Date: Jul 2003
Posts: 353

John_Drake will become famous soon enough (73)John_Drake will become famous soon enough (73)John_Drake will become famous soon enough (73)

Default

Thanks Oinker, this helped a lot!


I used this tutorial to take the head of a villager and put it on a peasant for The Dawn of Chaos.

Here was the end result:
__________________
John_Drake is offline   Reply With Quote
Old 01-27-2004, 05:19 AM   #9
Toxicseaweed
User
 
Join Date: Feb 2003
Posts: 447

Toxicseaweed is on a distinguished road (15)

Default

is it possible to do this with Gmax? *from reading your tut i didn't see anything that Gmax with the Dex script couldn't do.* Also when u say scale the head group down what do you mean by group? do you mean just that area, or in 3ds is each body part a seperate mesh?
Toxicseaweed is offline   Reply With Quote
Old 01-27-2004, 02:00 PM   #10
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

Quote:
is it possible to do this with Gmax?

It probably would be, but I don't use it myself so I don't know for sure. The Dex script is a lot more powerful (from what I understand) than the one I linked to, so I don't see why it wouldn't work.
It's not each body part that's a separate mesh, but there are separate meshes for things like corpse, hero glow, actual body, etc. I think it will be clear what I mean when you see the imported one.

Quote:
Thanks Oinker, this helped a lot!

I'm glad I could help. :)
Oinkerwinkle is offline   Reply With Quote
Old 01-31-2004, 12:12 AM   #11
iceslushee
User
 
Join Date: Jul 2002
Posts: 625

iceslushee is on a distinguished road (10)

Default

do u need 3dsmax to use this? I thought u could just use notepad
iceslushee is offline   Reply With Quote
Old 01-31-2004, 12:59 AM   #12
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

I guess it would be possible to merge whole geosets using only Notepad. Xaran Alamos or someone would probably know more about it. Gmax and Dex importer might would as well.
Oinkerwinkle is offline   Reply With Quote
Old 02-01-2004, 08:13 AM   #13
megaerathia
User
 
megaerathia's Avatar
 
Join Date: Aug 2003
Posts: 1,056

Submissions (1)

megaerathia will become famous soon enough (30)megaerathia will become famous soon enough (30)

Default

I wanted to replace the peasants head with the arthas head look wath happened i cant convert it to mdx!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
__________________
megaerathia is offline   Reply With Quote
Old 02-01-2004, 04:49 PM   #14
Oinkerwinkle
User


Respected User
 
Join Date: Jan 2003
Posts: 937

Submissions (1)

Oinkerwinkle will become famous soon enough (30)Oinkerwinkle will become famous soon enough (30)

Default

I don't know what was wrong with yours, but I did one myself for you.
Oinkerwinkle is offline   Reply With Quote
Old 02-01-2004, 05:48 PM   #15
megaerathia
User
 
megaerathia's Avatar
 
Join Date: Aug 2003
Posts: 1,056

Submissions (1)

megaerathia will become famous soon enough (30)megaerathia will become famous soon enough (30)

Default

Quote:
Originally posted by Oinkerwinkle
I don't know what was wrong with yours, but I did one myself for you.

Lol that looks funny:ggani: :ggani: :ggani: good job...........

But how can i change the archer's bow into an axe of a grunt?
__________________

Last edited by megaerathia : 02-01-2004 at 05:48 PM.
megaerathia is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 05:08 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services