Need assistance when generating material library

Started by MASSIVELIVEFUN, July 05, 2016, 07:08:18 PM

Previous topic - Next topic

MASSIVELIVEFUN

Right now I have a very simple material library set up just to learn how everything works.

From what I understand the material library generator just looks at the vmt files and makes a material from it. The textures that I am converting are the tools textures from csgo.
The material library runs fine and finds all of the vmt files in the specified folder from the filter. However when I bring out the materials into the slate editor the bitmap associated with the material has no texture.

I understand how to change the bitmap's path, but there are a few things that I need help with...

1. Do I have to keep changing the bitmap box's path that links to my material box?

2. How do I keep the changes to the path? Because when I restart max then the material, for instance, tools/toolsnodraw, doesn't have the classic valve nodraw texture.

3. What is the Wall Worm Texture properties path? Is that the path to the vmf or the vtf? And if this path doesn't correctly point to the vtf file is that why the bitmap is blank.

4. Do I have to associate a new bitmap everytime max starts?

wallworm

Making a material library is generally straightforward if you follow all the instructions on the Material Library Generator page.

A few tips:

If you do not have WW Pro installed, you need to have a TGA version of the VTF files located in the MatGen/Material Root path. If you have WW Pro, WW can simply use the VTF files as long as they actually exist in the mod's material folders. WW cannot yet read from VPK/GCF files.... which is why you need to extract them from VPK files. It is best to create some folder on your computer like:

C:\materials\

Inside which will be
C:\materials\Brick
C:\materials\Concrete
Etc
And inside all of these are both VMT and TGA (or just VTF is using WW Pro)

The make sure your global settings has C:\materials\ as the MatGen path.

Now when using the material library generator, enter the folder/file filters for the library you are making, check the Recursive option and then hit Create. That's all there is to it.

No, you should not have to associate bitmaps each time Max starts. As long as the libraries are created correctly, they will have all the bitmaps forever.

MASSIVELIVEFUN

Okay nevermind, my bad. The generator is actually super easy. It's just that the folder's names that I was using for my material path didn't match up with how the folders are set up when you extract these textures to begin. Like how the folders are set up inside of the gcf files.

wallworm

Ahh, I see.

WW needs the paths to match up or else if doesn't know what file to use. Consider this scenario:

Brick/window01.vtf
Wood/Cabins/window01.vtf

Just because the vtf files are named the same doesn't mean they are the same image. And if the files are not in the expected paths, it means that the lookups could take a long time. So the system simply requires you to place the files in the expected subfolders as defined in the VMT.

MASSIVELIVEFUN

I wondering what your preference is with organizing textures, but do you sort your textures like this?...

materials
       csgo <---- [material root for current project/game I'm level editing for...]
              concrete
              brick
              etc...
       halflife2
              concrete
              brick
              etc...
       more source games...


or like this?...


materials <--- [general material root]
      '(all) concrete (textures from halflife, csgo, dota2, insurgency, etc)'
      '(all) brick (textures from halflife, csgo, dota2, insurgency, etc)'
      etc...


because some textures repeat in other source games that have the same file name. I want to preserve the uniqueness of each file without accidently overwriting some important vmt or vmf that to a specific game, but I think that the second option is just more convenient for generating and makes some consistency with all types of textures.

wallworm

That's a good question.

At this time, the best way to separate your games is to extract their contents to separate folders, and make a separate Game Preset in the global settings per game. For example, my global settings have a preset for Black Mesa, another for CSGO, another for CS 1.6, etc. Each preset can have it's own material library root folder. This works for many cases. So when I'm working on Black Mesa, I click that preset and WW uses all it's paths; click my CSGO preset, and it switches up to CSGO paths.

Some games have multiple bases, however. For example, Black Mesa uses both HL2 materials AND Black Mesa materials that are stored in their own VPK files. This creates a problem with the single material library root folder.

The workaround for this case is to make a folder on your computer that is an extracted source of each game you want to re-use, except this one should be represent the mod root instead of the material root that the material library root uses. Now you can add that mod path to the Extra Paths field in the global settings.

For Example:

If I extracted Black Mesa to my computer, it would look like this:

Assuming that game was extracted to:

c:\blackmesa

There would be many folders, including:

c:\blackmesa\bms
c:\blackmesa\bms\materials
c:\blackmesa\hl2
c:\blackmesa\hl2\materials

If I set my extra paths to:

c:\blackmesa\bms;c:\blackmesa\hl2

Then WW will use both material folders for texture lookups.

This means that the HL2 extra path could be re-used in any other game preset I have WW setup to use that uses HL2 assets.

SMF spam blocked by CleanTalk