So im porting some props to Gmod from Life is Strange. The textures are in TGA format and I can see the object with textures in Blender, the problem comes when exporting, first off when I export the object to smd the textures don't apply, Blender only exports the prop but without the textures and when I open the model again to check it out I can see that have no textures and I don't want to unwrap it because it just fucks the whole textures when they are ready to go. Also when I open the model and the mtl and I try to export it I got the error that the object have no polygons.
You have to assign a material in Blender to your mesh with the same name as your texture .tga or .vmt - make sure in the .qc that the $cdmaterials path points to the correct path where you store your models textures also, e.g: "$cdmaterials models/yourfolder"
(keep in mind that $cdmaterials starts looking in the "materials" folder so you don't need to specify that in the line, so if you follow Valves own folder structure you put your folder containing your textures in "materials/models", hence why the line points to "models/yourfolder" if that makes sense)
Blender selects automatically the tga texture (since all the files are in one folder, that's why I can see the texture). When I go to materials in Blender the tga appears as it, I also gotta create the .qc which is another problem but im pretty sure I can see a video and solve it easily. I downloaded the models from DeviantArt so the textures came with the tga textures by default. So im gonna try what you said, go to materials and see if I can change the name and put it the same as appears in the tga file, but like I said, Blender detect it automatically so im not sure so it should have the name already right? Sorry if I sound kinda dumb, never tried to mess with smd and tga texture files.
You should visit the Valve Developer Wiki and look up an example .qc file, you can find every .qc command parameter you'll need and full documentation on everything there.
For the material in Blender, you'll want to make sure your entire mesh is assigned to the material - go into Edit mode and select the entire mesh - then select the material in the Materials tab on the right and hit Assign.
As for the name of the material, make sure its exactly the same as your .vmt file, for example if your .vmt file is named "yourmodelmaterial.vmt" and points to a texture called "thetexture.vtf" or "thetexture.tga", make sure the material is called "yourmodelmaterial" after the .vmt file and you're good to go aslong as you set up $cdmaterials in the .qc
Also, UV maps of ported objects sometimes are flipped for unknown reason. To fix this, just Unwrap the object ( UV will be ok ) and flip the UV. Always check how your texture look like directly in Blender
I saw the textures on Blender and everything is fine, the problem is when it comes to saving the textures on the model. Im still trying to do it lol.
Really all you should have to do is assign a material named after your .vmt on your mesh, that's it. You don't need to do anything fancy with the material or make sure it's the right texture or anything, just create a new material > select your mesh > hit assign > export .smd and it should be done, if not something may be wrong with the model or you're missing some step
As .vmt you mean the tga file right? I did that im pretty sure it didn't work since when I open the smd again in a new scene it appears without texture.
No no, a .vmt file is just a simple text file that you can edit with any text editor like notepad, it holds the information that determines how a texture should look when it's ingame with different shaders, etc. Textures themselves are .vtf files - you would convert your .tga textures to .vtf textures but I think .vmt can also recognize .tga textures in some cases.
I unfortunately can't explain it better right now, you should read the VDC page about Materials to get a better hang of it - in the end you want your Blender material to be named after your .vmt file, aka the file that holds the information. So if your .vmt file is named "mymodelstexture.vmt" your Blender material should be named "mymodelstexture" (take note that it shouldn't include the .vmt extension)
Sorry, you need to Log In to post a reply to this thread.