Wall Worm Forums

Design Tools => Wall Worm Model Tools => WWMT Questions => Topic started by: McFlyGold on July 13, 2012, 06:11:59 PM

Title: Problem exporting a texture
Post by: McFlyGold on July 13, 2012, 06:11:59 PM
Hello. I've made a model and I've gotten it to export using the Wall Worm Tool. (Super Duper Thanks for that!!!)

I can view it in the Model Viewer, but I can seem to export the textures. I get this far but when I hit "Export Selected Textures" nothing happens.

Any help would be appreciated.  :)
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 13, 2012, 10:11:08 PM
So I've been playing with this for hours now trying to figure this out and it seems as though a batch file gets created that's supposed to make the VTM file for me... or at least that's what I'm coming away with so far. Well I tried to delete the batch file and windows won't let me because it says that it's in use by 3DS Max. So I think what's happening is it's creating the batch file, but it's not being executed... maybe? I don't know for sure, but that's the best I can come up with right now. Perhaps there's something I'm doing wrong? Here's a screenshot of where I'm at so far.
Title: Re: Problem exporting a texture
Post by: wallworm on July 13, 2012, 10:14:35 PM
I just sent you a PM.

Also, that problem of the batch file not running means one of two things. Either there is an uncaught exception that is causing the failure... or you do don't have the latest versions of Max. Can you make sure that you have installed all the service packs for your version of Max (http://usa.autodesk.com/adsk/servlet/ps/dl/index?id=2334435&linkID=9241178&siteID=123112#section2)?
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 13, 2012, 10:44:20 PM
Thanks for the reply. I checked my PMs but there's nothing there. But you were right, I didn't update to SP2.

So I did the update, but now I have a new error. Strangely enough, the model shows up in the model viewer with textures now! (Unfortunately, I have to make the 2nd LOD version of the model and figure out how to export it all over again. ;) )

Here's what the new error says.
Title: Re: Problem exporting a texture
Post by: wallworm on July 13, 2012, 11:16:25 PM
I have seen that error before. It happens when the file is still locked (which is what caused the 3ds Max 2012 pre SP2 to fail).

I would try this: close Max. Then look in the task manager and see if there is still a version of 3dsmax.exe still running. If so, kill it. If not, restart the computer. Let me know how that works.
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 14, 2012, 12:15:00 PM
Ok, I've tried both restarting Max and restarting windows. Both still give me the error message when exporting a texture.

Now when I view the model using the "Model Viewer" from Source SDK, everything looks fine. The model shows up and with textures!

As a 2nd test, I started up Team Fortress 2, loaded a test map and spawned a Heavy with my test torusknot as an item.

It shows up in the game just fine. (Kinda big, but I don't yet know the scale to use.)  -  First image

So here's my current problem, the reason I wanted to make a model in the first place is to use it in Source Filmmaker.

So I copy both the model and material directories to "C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\marty" and start up the SFM. Now when I "Create Animation Set For New Model" and find it in the model browser, it shows up on the list but not in the viewer.  -  Second image

Any idea how I can fix this?
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 14, 2012, 03:12:04 PM
While searching for answers I found this page: http://sourcefilmmaker.wikia.com/wiki/Fixes,_Tips,_and_Other_things (http://sourcefilmmaker.wikia.com/wiki/Fixes,_Tips,_and_Other_things)

In the middle of the page there's a section called "custom maps" that mentions "Source Filmmaker cannot accept the newer version of VTFs (material files)"  Can this have something to do with my problem?

Also on the bottom of the page is a section called: "Spawning Props and other Models". I can't really follow it too much as this is all completely new to me, but maybe it will make more sense to someone here?
Title: Re: Problem exporting a texture
Post by: wallworm on July 14, 2012, 05:31:03 PM
I'll have to get back with you as I haven't used SFM yet. I think Cihan (Craokola here) has so maybe he can chime in.
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 15, 2012, 12:44:15 PM
Ok, I'm still working on this problem...  :)

I tried out a tutorial last night that had step by step instructions on how to model a "hat" and use "Item test" to get it into Team Fortress 2.  I followed it step by step and it all worked great. But when I copied the files to Source Filmmaker, it didn't show up! :(

I have a new theory now. I noticed while following the tutorial that the .vmt file has file paths set inside. I'm guessing that the other files have file paths as well. So I'm guessing that the model isn't showing up in Source Filmmaker because of this. What I'm wondering is how people make models for Garry's Mod and they work in SFM just fine.

I've also noticed that SFM is installed in "C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker" and not in "C:\Program Files (x86)\Steam\steamapps\<username>\SourceFilmmaker"   Is this significant in some way?

Can I possibly use the "Game Info" button to make it complie just for SFM? Is there a way to compile that makes the models work independant of directory placement?  :-\
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 16, 2012, 05:39:59 PM
So I've a little success in importing a model into Source Filmmaker, but without the help of Wall Worm... :(

Using a titorial I found online, I used "Item test" from the Source SDK.

This has it's limitations since it wants to "bind" the item to a certain class of characters like a Medic or Scout. I'm guessing it's because it's more for making weapons or hats and things. I just want to make standard "props".

Although this is limited, I was able to get the model into SFM. (Also with having to edit the .vmt)

I've learned that my problem was definitely revolving around directory placement.

Item Test exported to: "C:\Program Files (x86)\Steam\steamapps\<username>\team fortress 2\tf\models\player\items\demo\0x0105dd2e\<modeldir>"

I copied it to:C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\models\player\items\demo\0x0105dd2e\<modeldir>"

I did the same thing with the "materials" directory and it worked!  Pic 1

I tried to do the same thing with Wall Worm, but I got an error when exporting the materials.    Pic 2

Here's the batch file for the materials made by Wall Worm:

@echo on
cd "c:\program files (x86)\steam\steamapps\d0y3n\sourcesdk\bin\orangebox\bin>"
vtex.exe -mkdir  -shader VertexLitGeneric -vmtparam "$model" "1" "C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\materials\models\player\items\demo\0x0105dd2e\ball2\ballthingie_uvw.tga"
@pause
Title: Re: Problem exporting a texture
Post by: wallworm on July 16, 2012, 05:58:44 PM
So I am only throwing this out here as it is what I would try. But again I don't have SFM so haven't tested this.

Since I can't see the folder structure I am shooting in the dark. I'd look for a folder called sdk_content somewhere under SourceFilmmaker and if there are no folders called modelsrc and materialsrc in there, create them.

Set up WW settings Something LIKE this:

Game Info Dir: C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod\
Model Source: Game Dir: C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\sdk_content\modelsrc
Material Source: Game Dir: C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\sdk_content\materialsrc

And Bin dir somewhere in there too.
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 16, 2012, 06:05:48 PM
Here's the directory list:
Title: Re: Problem exporting a texture
Post by: wallworm on July 16, 2012, 06:12:11 PM
Well that doesn't really answer it... I'd look in all the directories and see where there is an sdk_content folder. It might be in the mod folders (lik tf) or maybe you have to create it in this directory you shared. I don't know.

I'm downloading SFM and will test it later on tonight.
Title: Re: Problem exporting a texture
Post by: wallworm on July 16, 2012, 09:06:53 PM
As it turns out SFM is downloading very slowly. I have a feeling I won't have an answer for you until tomorrow.
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 16, 2012, 09:08:07 PM
That's quite alright, I know it's a big download. I'm very grateful that you're taking the time to help me in this situation. :)
Title: Re: Problem exporting a texture
Post by: wallworm on July 16, 2012, 11:02:56 PM
So here is what I did to get models and textures into SFM:


Incidentally, I found a bug in WW tonight. I may load a patch tonight or tomorrow. If you get a message in the MAXScript console that says

"-- No "">"" function for undefined"
Then you are problably having this bug.

NOTE ABOUT SFM:

I discovered that SFM does not honor the $origin command. As such, you cannot use the Use Local Origin as Origin option in WW when exporting directly into SFM for static props. I may find a workaround in the future.
Title: Re: Problem exporting a texture
Post by: wallworm on July 16, 2012, 11:07:29 PM
Oops... I missed a step... about to add/edit to the list to set the gameinfo dir to C:\Program Files (x86)\Steam\steamapps\common\SourceFilmmaker\game\usermod
Title: Re: Problem exporting a texture
Post by: McFlyGold on July 17, 2012, 01:27:59 AM
Quote from: wallworm on July 16, 2012, 11:02:56 PM
I discovered that SFM does not honor the $origin command. As such, you cannot use the Use Local Origin as Origin option in WW when exporting directly into SFM for static props. I may find a workaround in the future.

First of all, Thanks so much for helping me on this issue! I finally got a model exported directly from 3DS Max without the need for running external programs on my own.

Now you mentioned something about $origin not being supported and I'm guessing this has something to do with the central pivot point of the model being exported. Well while listening to a tutorial online about SFM, he mentions that SFM is using an older version of TF2 than the version that everyone is playing. So since it's older, certain things from the current TF2 are not completely compatable with SFM's version of TF2. That may be why $origin doesn't work in SFM. I'm also guessing this is the reason the model I've imported doesn't have a centered pivot point. (a minor nuisance)

Thanks again for your help.

Now I'm off to try and learn me some new things about SFM.  ;D
Title: Re: Problem exporting a texture
Post by: wallworm on August 16, 2012, 02:00:46 PM
I am addressing the $origin issue in an update today or tomorrow. It will fix offset models in SMF and CS:GO.