Error exporting materials

Started by TooL, June 21, 2014, 09:10:24 AM

Previous topic - Next topic

TooL

Hey it's been a while.

So I just started getting back into trying source related mapping and I'm just figuring out the workflows and got Wallworms again for assisting in the mdl making etc.

So I made just a teapot and applied a tga UVChecker image to it (just a very simple model, even tried a box as well since I just want to make sure I know how to get models in hammer etc.) Export the model no problem, but exporting the material gives me an error in the cmd window of the following

Failed to load keyvalues file cfg/mount.cfg!
and another saying
Error: problem figuring out outputdir for material


Any ideas on what's going on?

Joris Ceoen

I have 2 possible solutions for this, but I'm not experienced enough in fixing these particular errors since I have never had them. For the first one, I'm not sure what could be wrong with the .cfg, so perhaps you should simply try to refresh your cache from Garry's Mod.

For the second error, I think it's figuring out the output directory because it appears you didn't update the output directory in the first place. Are you sure you want to output your texture file in a folder named "Map _1"? When you export your texture with the "Export VTA's" button, you should be able to click an arrow which should automatically set your preferred material output path. It may that in the Material Sledge Editor you forgot to give the texture a decent name and to put the output path in the material's dialogue block. Because you're learning 3DS Max and WWMT I take it this may sound like Chinese at the moment, but I'm sure Shawn will come to your assistance when he has the time (which to my experience never takes long!) and explain all of this clearly to you :)!

wallworm

This is my best initial guess:

VTEX.exe (made by Valve) will only compile bitmaps that reside in specific folders. In other words, if you want to create a bitmap at /game/materials/mypath/bitmap.vtf then the TGA you are creating it from must reside as /gamecontentfolder/materialsrc/mypath/bitmap.tga .

See if moving the TGA to that path (and updating the material in Max to point to that bitmap) eliminates the problem.

TooL

Tried putting the tga in the cstrike/materialsrc/myproject/UVChecker.tga  Changed the texture source in the material in max and then exported again and got the same errors.

Does the VTEX.exe auto run when we do the export in wallworms or is that an extra step I missed somewhere along the way?

@jorisceoen Not exactly learning max though, I've been using max for the last several years (game dev bachelor that I just graduated from :D )

wallworm

#4
OK... I just looked at the code and the above advice is no longer valid. The location of the bitmap inside Max is irrelevant (it used to be and I made a habit of never placing textures in the game materials folder). Scratch that and don't worry. (It's no longer valid because WW now copies bitmaps to the SDK folders).

Change the name of the bitmap node in the material editor to the local output path. So change it from "Map #1" to "myproject" (or you can change it to "myproject/UVChecker.tga" (which is not documented), making it a little easier for managing names if you have many--but the filename must match exactly the bitmap filename.) I'm only saying this to make the output paths for bitmaps make more sense.

Next, check that your global path settings are correct. For my system's Garry's Mod:

materialsrc: C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\content\cstrike\materialsrc
Game Info: C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\cstrike

I think these are what you need.


NOTES:

1) The gameinfo.txt file did not exist in my cstrike folder initially. I had to copy it from CSS/cstrike.

2) For future reference, sometimes studiomdl.exe or vtex.exe are missing from the bin directory in some mods. If this is the case for you, you can usually just copy from a mod that does have it.




Quote from: TooL on June 21, 2014, 10:32:10 AM
Does the VTEX.exe auto run when we do the export in wallworms or is that an extra step I missed somewhere along the way?

It is automated. The command window itself is VTEX trying to run.

TooL

#5
Yeah I followed your newest Gmod video to get everything setup again and indeed, changing the texture name to be myproject did make it so the outputdir error is gone but the first one is still there (also had to change my materialsrc path cause for some reason it was pointing to mapsrc...)




Just tried putting it in hammer and doesn't show up but the bounding box for the model looks correct size...soo close man haha all I wanna do is make a map :(

wallworm

In many circumstances, models will not show up if compiled/recompiled while Hammer is open. Try restarting Hammer.

Or be like me... and don't use Hammer at all :)

TooL

#7
I would love to not have to use hammer haha.  But I'm aiming to make a TTT map so I think at some point I'll have to use hammer for something but I could of course be wrong...I'm a UDK/Unity guy mainly so hammer is bleh...

Yeah I made sure not to have hammer open when I was dropping the mdl and such in the folder for hl2

Also found the cfg/mount.cfg file but not sure why it's complaining about it cause it is there and exists (in the gmod folder unless it's looking for it somewhere else I guess?)

wallworm

Hammer shouldn't be necessary. I usually compile straight into Source with the VMF exporter in WW. I do sometimes test scenes in Hammer... but that is only when I'm testing updates to the VMF Exporter itself and opening Hammer is faster than loading games.

I don't have time to check it out more ATM. I know that exporting into GM is often a little wonky because the game folders are nested in with GM stuff. You might find it easier to export into CSS directly, and later copy your level over to GM. I'll look into it some more again this week and see if I can find the optimal settings for GM. I know I've gotten it to work, but GM isn't what I primarily use so often forget the settings it needs.

TooL

That'd be cool, really appreciate the help you give and effort you put into all this. I'll give it a shot with CSS for the time being then. Is there no HL2 setup or is CSS pretty much the same in this respect?

wallworm

The easiest way to setup for CSS is to open up the global settings, click the Import button at the bottom right and browse for CSS\bin\GameConfig.txt . Then click on the CSS entry that appears in the setting presets. There will be a brief pause while WW generates your entity cache (can take up to a couple minutes depending on the system specs... for me takes around 10 seconds).

TooL

Can confirm that doing the export with the CSS config works, I can see my model in hammer.

TooL

Next question (unless you want me to make a new thread for it)
I'm making a ship with a hollowed interior so the player can go inside etc. I was watching the collision hull videos but I don't have access to convexity and I can't seem to find another one for making hulls without the convexity plugin.


Every time I've tried the hull part of WW I end up getting a convex mesh for the whole thing in the end (building the model the batch says there's a problem with the geometry (I'm assuming collision mesh since first export without it didn't have the complaint)



I tried doing the detach geometry steps but since there's an inner/outter piece that isn't directly joined not sure what I should do for source to not complain about it.

wallworm

#13
The need for Convexity to make hulls is now long-past. Watch the newer video at top of Collision Hulls in 3ds Max for Source. The other video that discusses Convexity if older and no longer valid.

You have to remember that too many hulls in a model can be problematic. Your hull count is not too high, but if it gets higher you may need to change your global WW settings to use $maxconvexpieces for costly collision models.

Be wary of planar elements in a mesh when using Hull Helper... as all hulls generated from planar elements will cause errors.

Also, this thread may prove informational:

http://www.wallworm.net/index.php/topic,1057.0.html


TooL

Yeah I figured the planar part would be a problem so I guess just making some give or take boxes that match close enough will have to do (and I guess I will just limit players from going to the bottom hull anyways in the end too)

I'll also read that thread as well.

Thanks so much for the insight and help, WW is definitely making this a lot less of a headache than I was first thinking it was going to be (mapping/modeling for source)

SMF spam blocked by CleanTalk