Anyone Know How To Convert Hl Models To Maya?

DeepShadowsDeepShadows Join Date: 2003-02-11 Member: 13408Members, Constellation
<div class="IPBDescription">simple question, appologies for thread</div> Finding a way to convert hl files to be utilized in maya has been rather difficult. I was wondering how anyone else does it, if they do, and if there were any programs they might suggest or link me to.



hl convert to maya, or vice versa, is what I need.

-Using windows xp

Thanks for any help you can provide <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile-fix.gif' border='0' style='vertical-align:middle' alt='smile-fix.gif' /><!--endemo-->

Comments

  • PerditionPerdition Join Date: 2004-07-02 Member: 29692Members
    I believe there are SMD plugins for Maya in the full SDK for Half Life.
  • DeepShadowsDeepShadows Join Date: 2003-02-11 Member: 13408Members, Constellation
    The plugins you reffer to only export maya files to halflife, but what we need is a way to transfer halflife files TO maya.

    Thank you though
  • PerditionPerdition Join Date: 2004-07-02 Member: 29692Members
    Then you might want to try loading the half life file up in MS3D, and exporting it to a file type that maya can read.
  • DeepShadowsDeepShadows Join Date: 2003-02-11 Member: 13408Members, Constellation
    Friend figured out. Nobody read this unless you want to know how to do it, so for those smart enough to actaully SEARCH on the topic, they might find the answer:




    A simple walkthrough

    I finally managed to convert Half-Life files into a format Maya can see and use. This is a good thing for anyone
    interested in either editing existing Half-Life models or for those, as is the position I am in, who want to
    pose the models to take shots of in a custom created 3D environment. These instructions are written for Maya,
    however the same process should work with 3D Studio Max or another 3D program, I have simply not tested them
    because I have no interest in ever using those again now that I have found and learned the glory that is Maya.
    ;-)

    In the case I am using this for, I was looking to use Natural Selection characters to create art for a
    Natural-Selection related Fan Fiction site. This process could be used for many other purpouses such as modding
    existing models from any Half-Life mod for your own mod (though I would STRONGLY suggest, if that is your
    intent, to contact the mod developers and OKing it with them first, heck they might even give you their original
    models if they want to really help which means you don't have to do any of this). This is my trial and error
    method and is the only one I've been able to make work successfully. Thanks go to Perdition Flamethrower for
    pointing me in the right direction.

    Now if only I could manage to get my grubby hands on the original high poly Natural-Selection models so I
    wouldn't even have to deal with this whole scenario. ;-)

    Step one: Find the model you wish to import to Maya.

    These can be found in the appropriate directory for whatever mod you are pulling the models from. For my
    example, I will use the Skulk from Natural-Selection. The model would be found in the following folder:

    C:\Valve\Steam\SteamApps\username\half-life\ns\models\player\alien1\

    There is one file, alien1.mdl which contains all of the animations, mesh information, bones, and textures for
    the model. Since the Skulk is a playable character, it has quite a few things under that one file. Less complex
    objects or props will have less. This file is not usable by Maya. In order to convert it you will need to
    Decompile it using Milkshape.

    Step two: Open Milkshape, go to Tools, select the Half-Life tool set, and press Decompile Half-Life MDL.

    I had an issue with running Milkshape on Windows XP. It may have been a bug only on my computer for some reason,
    or may be an issue with Windows XP. I have not tested. If you are unable to start Milkshape on a Windows XP
    system, then you will need to find a system running another operating system. I found it works beautifully on
    the Windows 98 system in my house.

    During this step, it may be a good idea to put the file itself into a seperate folder all by itself before
    running the command. And I would certainly copy it out of the mod folder so you are not filling that up with
    useless files. In decompiling the MDL, you will be pulling the mesh info and animations out into SMD files. In
    the case of the Skulk, as I mentioned with its many animations for all of its possible actions, there are a lot
    of SMD files. A less comples object, like weapons or static objects, have less of an issue with this.

    Step three: Find the mesh file.

    This gets a step all its own, as it is far more complex than it needs to be. You will need to find the mesh for
    the model out of all of these SMD files. In the case of the Skulk I am using for my example, the file is called
    alien_level1_reference.smd which is not terribly difficult to find. The thing is, other Natural-Selection models
    I have looked at to use this process on do not allways follow the same naming convention. Someone got lazy in
    the production process. For example, the gorge is simply called level2.smd and makes no comment on being the
    referance mesh. It gets worse, the Lerk mesh is titled lvl3_p_ref2.smd.

    Depending on how organized the naming conventions are for the mod you are applying this to, it may be easier or
    harder to find the name of the file you are looking for. Some rules of thumb to follow when sorting through them
    are to discount things that sound like animations or actions (because those are animation files, not mesh files)
    and to look for ref or referance in the title. Neither of these are hard and fast rules, so you will have to use
    your own discretion. If worst comes to worse, you can just allways test each one.

    Step four: Import the SMD file into Milkshape.

    Under File, Import, select the mesh file. You will know you have the right file beccause it will offer you a
    checkbox asking about importing joints and such. As well, when you click OK, it will import the model. If it
    asks about apending the Keyframes, then you selected an animation file.

    Step five: Export as an OJB file.

    Under File, Export, select, in the bottom half of the menu, the OBJ option. It will take you to a save window
    where you type in your file name. Make it something you can find later. In my case, I exported the file as
    SkulkMesh.obj.

    Step six: Open in Maya.

    You may wish, at this point, to take the important files out of whatever folder you put them in so you don't
    have to deal with the extraneous files. Find the file you exported make sure it ends in .obj and not .mtl. The
    export will save two files with your file name, one ending in each extention. The MTL file is useless for our
    purpouses. You will probably also want to get the texture for the model which was decompiled with everything
    else as a BMP when you did step two. In the case of the Skulk, the texture file is called alien_level1.bmp.

    Open Maya and open the .obj file. You will get a mesh.

    Step seven: Apply the texture.

    I am including this in the off chance that you don't allready know how to do this, though it is very basic and I
    imagine most people using Maya like this allready can, skip this if you know how.

    Open the Hypershader under Windows, Animation Editors, Hypershader. Create a new shader, probably a Lambert if
    you want to more correctly simulate the Half-Life engine with your renders. Double click the new texture to
    opent eh attribute editor. Find the color slider, on the right side is a connection button, click it to open a
    new window and select File from the list of buttons. Press the folder button and browse to the BMP texture
    associated with the model. Once this is done, select the mesh for the model and assign the material to it by
    right clicking on the texture and pressing Assign Material to Selection or by middle mouse clicking and dragging
    the texture onto the mesh.

    It is important to apply a shader to the mesh, even if it is just a basic grey lambert, as it does not seem to
    render until you have done so.

    Step eight: Just kidding, you're done, have fun.


    Known Shortcomings:

    There are a couple shortcomings to this approach. One, it takes a lot of manual work. Two, and probably more
    important to us, the skeletal system does not import with the mesh. If someone figures this out a way to import
    it as well, that would be great. This does mean that anyone looking to pose models must do one of two things. A)
    Manually recreate the joint setup for the models in Maya. B) Pose the models simply by moving and rotating sets
    of vertices. As a short term fix, the second approach is quickest. If you plan to do a lot of moving of the
    models then it would be definately worth your while to set up even a quick joint system.
Sign In or Register to comment.