Results 1 to 5 of 5

Thread: How do you assign materials to a mesh using DotA 2 workshop tools (alpha).

  1. #1

    How do you assign materials to a mesh using DotA 2 workshop tools (alpha).

    Not sure if right sub forum but here goes.

    I started learning blender and such in order to make my own custom maps. For starters i want to at least import some Final Fantasy models into the Workshop Tools. It was released fairly recent, and so even the Valve wiki is blank, on how to import models.

    I have a smd file + 3 texture pngs + rda (animation) file. I imported the smd to Blender, i did a bone weight transfer from the obj model to the smd model, unwrapped, and applied the two textures by making two image materials. Now from here, i have no idea what to do.

    Because i am not making a cosmetic mod, i just went fk it, so i downloaded the DotA 2 Workshop Tools to experiment with it. It seems i have to import the smd/dmx and then it gets saved as a vmdl. Great now i open the model editor, and i choose to make a new VDML file from mesh file. So i upload the obj file because smd i have no idea but the model is facing down even though i exported with commands -uv flip and -rotate 90 (so it appears straight in Blender).

    I can't even select it, rotate it, move it or anything.

    So i double click on one of the 'error' materials of the mesh...

    Basically all you can do is change the variable color. So i decide to make a new material, which is saved as a .vmat file. And upload the texture. But i can't find how to assign it to a part of a model, nevertheless, break the model down like i can in Blender - so i can apply both 2 textures (3 for facial expressions). It turns out like this in Blender if you uv map it on a smd file as it thinks it's just 1 mesh or something, unlike obj. (this is my noob analysis, only started modeling a few days ago)

    So i change the red material that's there, says it can't be changed because it's default, but i change it anyway to hero shader since it's already assigned to the main mesh. Upload the tga. Instant crash.

    I know this was released not long ago, but if someone who has knowledge in importing models to this tool. I would really like help. Or if a Valve employee can give a heads up if he/she is updating the wiki 'how to import models...'

  2. #2
    Nvm. I think i did it. Close thread mod.

  3. #3
    Basic Member
    Join Date
    Aug 2014
    Why not post your solution then

  4. #4
    Basic Member Toyoka's Avatar
    Join Date
    Oct 2013
    Current position co-ordinates non-tracable. Unknown space.
    Here's my solution from the OP's thread in the r/Dota2Modding sub-reddit:

    Importing models into Hammer is not too difficult, here goes!

    * Open Vconsole (this is important for debugging the texture-loading issue).

    * Import your model as OBJ or FBX (preferably FBX, not but necessary). Make sure you have the model somewhere in your dota_ugc/content/dota_addons/<addon name>/models/<model name> (ie. khearts_sora, or whatever) directory before you import it. Texture should be in a similar folder structure, but replace \models\ with \materials\.

    * Look through Vconsole and see what the texture name the model is looking for (and subsequently can't load) is. From here, you'll need to create a .vmat in the material editor, of the same name as the missing texture:


    Go to the material editor and create a new file. "Save as" as the texture name that's required by the model (under dota_ugc/content/dota_addons/<addon name>/materials/<model name>). Then in the "Variables" tab, in the middle of the material editor, under the "Color" tab, browse to the model's source (.tga or .psd) texture (also under dota_ugc/content/dota_addons/<addon name>/materials/<model name>, if you've moved it there). Your texture should appear in the preview viewport. If not, hit ctrl+s to save, and it should appear.


    * Now, your model should have the texture appear on it! If not, you'll need to add a Material Group onto the .vmat and add the texture from there. For this, do the following:


    * Go to your model editor window, and go to the "Model" tab at the top.

    * Select "Add Material Group"

    * Go to the Outliner on the left and expand the "Material Group List"

    * There should be 2 materials there, default and materialGroup_1. Do not touch default. Select materialGroup_1 instead.

    * On the opposite side of the model editor window, there should be a "Materials (1 items)" tab. If not, click the blue + on the very right.

    * From here, expand the tab and browse for your .vmat file that you made earlier from the source texture if it's not already there.

    * If it IS already there, you might need to take the .vmat and put in your root addon folder (move it up to dota_ugc/content/dota_addons/<addon name>, instead of dota_ugc/content/dota_addons/<addon name>/materials/<model name>)
    Last edited by Toyoka; 08-20-2014 at 10:38 PM.

  5. #5
    Yup. This guy helped me texture it. Now i want to import custom animations in the grand scale of porting a custom hero (as far as i'm aware, no one has actually successfully made a finished custom hero, not even the guys porting LoL and that Teemo and Luna was made as a sfm), trying to add separate animation groups atm. A simple walk animation is, '_007A' which is 103 frames long.

    My FBX has all the animations and bones, so 500 something frames of animation. I can play the animation. I can't seem to do divide the whole into each own animations. Like animation 1 (idle) = frame x to frame x. It's just one whole sequence. I think i need to an activity(s) or animation event(s) but not sure.

    Now from here i don't get what to do. As in to spawn this custom hero and in some plain map. Like what is the folder structure of a custom hero and where does the qc and ability lua scripts and all fit into this?
    Last edited by coldtoaster; 08-23-2014 at 07:53 AM.

Posting Permissions

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