How do I use custom textures?

Harry :)

L1: Registered
Aug 31, 2015
12
0
I imported my own texture* into Hammer and made a Minecraft map. When I tried using the map on my server, my friends couldn't see the texture (it was black and purple), but I could.

I apologise if this is a thread duplicate, I was having trouble getting good results.

*Technically SourceCraft imported the textures and generated the VMF. The reason I didn't say this above is because you might not understand the problem.
 

killohurtz

Distinction in Applied Carving
aa
Feb 22, 2014
1,016
1,277
If the textures are visible to you, then you are using them correctly. That's the good news!

However, in order for other people to see them, there's another step - packing them into your map. VIDE is a popular tool for this. Basically, since the textures you used don't ship with TF2, your friends don't have the files, and so they see them as missing textures (the purple and black checkerboard). Embedding the files into the .bsp with a packing tool allows everyone else to see them without downloading the file itself.
 

Harry :)

L1: Registered
Aug 31, 2015
12
0
Thanks!
I also just realised I derped really badly, cause I have Pakrat and I probably could have easily figured it out with a few more tries.
 

Harry :)

L1: Registered
Aug 31, 2015
12
0
Actually, I still need help. I don't really want to use another program, and I still don't know how to use Pakrat. It might be because it's not finding the Minecraft files.
 

Harry :)

L1: Registered
Aug 31, 2015
12
0
Also, if there's a way to just add the materials to my server instead of the map, then packing the textures isn't vital.
 

killohurtz

Distinction in Applied Carving
aa
Feb 22, 2014
1,016
1,277
I've only ever used VIDE so someone else may be able to answer this question better than me. I can at least ask, though, if you have Pakrat configured to scan the tf directory? You could also try moving your custom files from tf/custom to tf/materials or vice versa, and then try scanning again.

I would not recommend forcing clients to download the textures because they may be using the in-game option that suppresses custom file downloads.
 

KlashFire

L1: Registered
Sep 2, 2015
17
1
with pakrat, its just as easy as VIDE I believe.
you open the bsp file, click the "Add..." button, and navigate to the tf/ folder where you stored those textures.
select the vtf AND vmt files that you used with the map, hit enter, save the map, done
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Adding materials to the server is actually a lot more work because you have to compress each of them as a BZ2, then made a resource file that instructs the client to download them. It also takes longer because the operation is split in to many, rather than the single operation of downloading the map with everything packed inside.

Pakrat and VIDE are both a bit funny. I keep my assets in tf/custom/wormatty (for example) and then in materials, sounds, models and so on. When I want to scan my map for custom things in Pakrat, I have to point its search field to tf/custom/wormatty for it to find all my custom things. Once it does that you have to confirm you want those files packed in to your BSP. When you have done it and saved your map, you can check to see if it worked by opening the map in GCFscape!
 

Snowbat

L4: Comfortable Member
Apr 23, 2013
165
74
I've always used Pakrat. It's a simple yet effective program. It's really not advised to upload them on the server. It's better to pakrat them into your BSP.
You just have to run that pakrat.jar thing, load your map's BSP and then click the add button. Navigate to your textures folder, select it and add it.
Then save your BSP (File--> Save)

It's advised to take a backup of your BSP before packing anything in it. Also, small detail, I think it's important to first run buildcubemaps on your map before packing anything in it. Not sure about this one though.

EDIT: why the **** does the spell checker at work always change the word "Always" to have a capital letter?
 

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
Pakrat automatically makes a backup of the .bsp in the same directory. I think it gets an extension like .bak or something similar.

Yeah, following on from what Snowbat says, Pakrat can corrupt your map if you use it more than once on the same map, so maybe it is better to buildcubemaps first before packing. VIDE doesn't have that problem (neither does bspzip or CompilePal, which just uses bspzip anyway).
 

Harry :)

L1: Registered
Aug 31, 2015
12
0
Buildcubemaps?

you open the bsp file, click the "Add..." button, and navigate to the tf/ folder where you stored those textures.
select the vtf AND vmt files that you used with the map, hit enter, save the map, done
It asked me if it should correct the path, and since I'm not completely sure what that does, I clicked no (all 400+ times, even though I'm not using all of the Minecraft textures).
 

PyroDevil

L3: Member
Sep 19, 2014
123
141
Cubemaps are used for textures with reflective surfaces, such as water. If a map isn't using cubemaps, or they have not been build, the surface will have a black purple checker board to the surface. Buildcubemaps is a command used to build the cubemaps when you are in-game. You want to make sure the map has identified the textures and creates a file for it before packing it Since I haven't ever used the minecraft texture pack, I do not know if any require cubemaps.

I've used VIDE and Pakrat, and both are pretty good programs. Personally, I have recently used VIDE because of some trouble with PakRat. With VIDE, you first need to select the bsp with the Pakfile Lump Editor, then select "scan", and tell the program to scan a folder. (I usually scan the tf folder) After the scan, most files will come up with a yellow-ish background. This means these files are in the map, but not official. Then you can either select a file and click "add" or use "auto" to automatically add those files. Lastly, press "apply" and then "save"
 
Last edited:

worMatty

Repacking Evangelist
aa
Jul 22, 2014
1,257
999
When a map is loaded, the packed assets are mounted to the game and it pretends they are installed in tf/materials, or tf/models, etc. So the things inside your map need to have the same directory structure, which is where the packing program might ask you about correcting the directory. So in a packed map, rather than a file living in C:\User\Matty\Documents\TF2 Mapping\Materials\blahblahblah... they need to live in materials/ or models/ or sounds/ and so on. If you open up a custom map in GCFscape you will see how the map author has packed the custom assets. Try opening one of the Gun Mettle maps.

You could save yourself a lot of time if you tried CompilePal. It takes care of all of the packing for you (when it works).
 

Harry :)

L1: Registered
Aug 31, 2015
12
0
Where am I supposed to put the materials? CompilePal didn't work for me. It said it I referenced a texture that doesn't exist.
 

Harry :)

L1: Registered
Aug 31, 2015
12
0
Oh. Just realised I moved the textures so I could see if the map worked. The textures did show. I think it works now! Yeess!!!
 

sniperstyx

L1: Registered
Nov 16, 2018
27
3
I used VIDE before I repacked the BSP file from my map, but people couldn't see the textures. I went to see if the textures were deleted in the process of the repacking and they were gone, I reinstalled the textures into the map but my friends still don't see the textures. Can I have some help from someone? I will give positive rating, I promise.
 

DrSquishy

we've all had better times to die
aa
Feb 10, 2017
1,297
974
I used VIDE before I repacked the BSP file from my map, but people couldn't see the textures. I went to see if the textures were deleted in the process of the repacking and they were gone, I reinstalled the textures into the map but my friends still don't see the textures. Can I have some help from someone? I will give positive rating, I promise.
Have you read this? It should detail all you need to know about setting up VIDE
also, why did you necro a 4 year old thread instead of just making a new one