Source Filmmaker

Source Filmmaker

Vision Sep 25, 2018 @ 2:04pm
Removing bump map files from a model
Okay so I got a straight forward question.

I have a model in my usermod folder and that model has some bump maps materials in it for each body part.

My question is…if I remove all the bump map material files, will I end up with a material on the model that is a pure solid color?
< >
Showing 1-15 of 18 comments
Marco Skoll Sep 25, 2018 @ 2:26pm 
Originally posted by Vision:
My question is…if I remove all the bump map material files, will I end up with a material on the model that is a pure solid color?
No, quite aside from whether the model's diffuse maps are a solid colour.

(Also, doing it by simply removing the files would cause a missing texture problem, which would cause a checkerboard effect).

Bump maps are possibly the most literal "texture", in that they fake the shading of little bumps and crevices on the surface ("texture" here as in what the surface would actually be like to touch).
However, the overall shape of the mesh still affects lighting. The side of the model facing a light will still be brighter than the side facing away from it, so you do not have a pure solid colour.

If you want models that are not in anyway affected by lighting, then you need the UnlitGeneric shader, or the $selfillum parameter.
Last edited by Marco Skoll; Sep 25, 2018 @ 2:27pm
Vision Sep 25, 2018 @ 2:35pm 
Originally posted by Marco Skoll:
Originally posted by Vision:
My question is…if I remove all the bump map material files, will I end up with a material on the model that is a pure solid color?
No, quite aside from whether the model's diffuse maps are a solid colour.

(Also, doing it by simply removing the files would cause a missing texture problem, which would cause a checkerboard effect).

Bump maps are possibly the most literal "texture", in that they fake the shading of little bumps and crevices on the surface ("texture" here as in what the surface would actually be like to touch).
However, the overall shape of the mesh still affects lighting. The side of the model facing a light will still be brighter than the side facing away from it, so you do not have a pure solid colour.

If you want models that are not in anyway affected by lighting, then you need the UnlitGeneric shader, or the $selfillum parameter.

Ahh I see, but what’s the closest I can get to removing/hidding it so it will be a solid color?(if that is possible)
Capt Fuzzy Sep 25, 2018 @ 2:51pm 
Originally posted by Vision:
I have a model in my usermod folder...
Uh oh.., you goin' straight to hell for that one... lol

Seriously though, you should NEVER put your models in the usermod folder.
There are files in there that are key to SFM functioning properly and by dropping a model in there, you risk accidentally overwriting or even deleting those files which could totally bork SFM and force you to reinstall it and start over...
Pte Jack Sep 25, 2018 @ 4:52pm 
no you'll end up with a smoothed coloured model, why would you want to remove bumpmaps anyway?
Marco Skoll Sep 25, 2018 @ 4:55pm 
Originally posted by Vision:
Ahh I see, but what’s the closest I can get to removing/hidding it so it will be a solid color?(if that is possible)
It can be done, but will require permanent modification of the VMT material files, as it isn't an override that can be applied within SFM itself.

You may be able to get away with opening the VMT files in a text editor and replacing the first line "VertexLitGeneric" with "UnlitGeneric" (the quotes are not necessary, but if there's any other opening line do NOT replace it).
A lot of the file's parameters will be immediately ignored by changing the shader, so a lot of the file will become entirely redundant, but there's no sense in removing anything. It'd only make things harder to change, as well as change back.

~~~~~

On the note of what Capt Fuzzy said - indeed, you really shouldn't install content in usermod. It might not immediately cause problems, but it can seriously break things in the long run.
Marco Skoll Sep 25, 2018 @ 4:59pm 
Originally posted by Pte Jack:
no you'll end up with a smoothed coloured model, why would you want to remove bumpmaps anyway?
I'm guessing from their avatar that they may have a pony model that they want to look more cartoonish look.

Removing lighting won't really achieve that, as the model really needs to be engineered from the ground up for that... but then, I am guessing, so they may want something else entirely.
Vision Sep 25, 2018 @ 9:15pm 
Originally posted by Marco Skoll:
Originally posted by Vision:
Ahh I see, but what’s the closest I can get to removing/hidding it so it will be a solid color?(if that is possible)
It can be done, but will require permanent modification of the VMT material files, as it isn't an override that can be applied within SFM itself.

You may be able to get away with opening the VMT files in a text editor and replacing the first line "VertexLitGeneric" with "UnlitGeneric" (the quotes are not necessary, but if there's any other opening line do NOT replace it).
A lot of the file's parameters will be immediately ignored by changing the shader, so a lot of the file will become entirely redundant, but there's no sense in removing anything. It'd only make things harder to change, as well as change back.

~~~~~

On the note of what Capt Fuzzy said - indeed, you really shouldn't install content in usermod. It might not immediately cause problems, but it can seriously break things in the long run.


Do I gotta edit
all of the bump map files in the model?(VMT)

I thought on using VTFedit
Last edited by Vision; Sep 25, 2018 @ 9:41pm
Marco Skoll Sep 25, 2018 @ 9:58pm 
1) Pte Jack's question about why you want to remove the bump maps is kind of relevant, as there may be a better solution.

2) I don't recommend using VTFEdit for editing VMT files. It's rather rubbish at it, so I just use Notepad.

~~~~~

all of the bump map files in the model?(VMT)
You're mixed up here.

Firstly, unless you can explain what Pte Jack asked, the bump maps are probably not relevant.
Second, Bump maps are VTF files.

VTF files are "textures" - they're images. They may be about what colour the surface is ("diffuse maps", or sometimes "albedos"), or they may be surface contours ("bump maps"), surface shininess ("specular maps"), etc.

VMT files are material files. These are text files that tell Source how to use the texture files. It says "Use these texture files, which are these types of textures".
A single material file may reference many different types of texture.

Right now, what you need to do is probably material rather than texture related, but unless you can explain the specific problem, I can't say for sure.
Last edited by Marco Skoll; Sep 25, 2018 @ 9:59pm
Vision Sep 25, 2018 @ 10:46pm 
Originally posted by Marco Skoll:
1) Pte Jack's question about why you want to remove the bump maps is kind of relevant, as there may be a better solution.

2) I don't recommend using VTFEdit for editing VMT files. It's rather rubbish at it, so I just use Notepad.

~~~~~

all of the bump map files in the model?(VMT)
You're mixed up here.

Firstly, unless you can explain what Pte Jack asked, the bump maps are probably not relevant.
Second, Bump maps are VTF files.

VTF files are "textures" - they're images. They may be about what colour the surface is ("diffuse maps", or sometimes "albedos"), or they may be surface contours ("bump maps"), surface shininess ("specular maps"), etc.

VMT files are material files. These are text files that tell Source how to use the texture files. It says "Use these texture files, which are these types of textures".
A single material file may reference many different types of texture.

Right now, what you need to do is probably material rather than texture related, but unless you can explain the specific problem, I can't say for sure.

Mind if I add you on steam so we can communicate a bit more easily?
Pte Jack Sep 25, 2018 @ 11:15pm 
If your looking to change a skin for a model to be all one colour, create a 16x16 image of the colour you want and convert it to a VTF file then stick the VTF in a mod folder's materials folder that SFM knows about. Find the vmt for the texture you want to change and edit the $basetexture statement to find the texture's path and filename you created and saved.

OR

Create the VTF texture and save it as stated above. Load the model into SFM and add a Override Materials then send the model to the element viewer. Expand the materials and find the material you want to change. Add a a string Attribute and name is $basetexture. The areas of the model that use that material will go b&P checkerboarded. Beside the new string attribute add the path to the new texture you saved. The area of that material will turn the color you saved.

$bumpmaps and $normalmaps statements add the details to the model, like fake welts and creases. pitches and valleys, I don't think you really want to remove those.
Vision Sep 26, 2018 @ 12:20am 
Originally posted by Pte Jack:
If your looking to change a skin for a model to be all one colour, create a 16x16 image of the colour you want and convert it to a VTF file then stick the VTF in a mod folder's materials folder that SFM knows about. Find the vmt for the texture you want to change and edit the $basetexture statement to find the texture's path and filename you created and saved.

OR

Create the VTF texture and save it as stated above. Load the model into SFM and add a Override Materials then send the model to the element viewer. Expand the materials and find the material you want to change. Add a a string Attribute and name is $basetexture. The areas of the model that use that material will go b&P checkerboarded. Beside the new string attribute add the path to the new texture you saved. The area of that material will turn the color you saved.

$bumpmaps and $normalmaps statements add the details to the model, like fake welts and creases. pitches and valleys, I don't think you really want to remove those.

I think that the bump maps are what I want to remove because what I’m trying todo is a head hacking method and the texture of the model is not as same as the other one which leaves a huge visible line/marker that I have been head hacking. Which I want to remove so it’s not visible. When I for example take white color on both models it still shows a visible marker that I have been head hacking.
Pte Jack Sep 26, 2018 @ 9:51am 
Now that you've explained what you're trying to do, in the Head material (the VMT), find the statements that says, $bumpmap and/or $normalmap (it can be one, the other or both) and place 2 backstroke in front of them like // $bumpmap or // $normalmap . This will comment them out and the will disappear from the model.

OR

Find a VTF that is a plain blue normal map like this one SourceFilmmaker\game\tf\materials\models\player\shared\shared_normal.vtf, Load the model and add an override material, send the model to the element viewer, expand the materials and find the head material Right click it and add a new string attribute and name it $bumpmap then point the data column for it to that material. The bump will be gone.

Marco Skoll Sep 26, 2018 @ 10:03am 
Originally posted by Vision:
Mind if I add you on steam so we can communicate a bit more easily?
Sorry, but I prefer to keep things on the forum unless it's a matter that only I can reliably answer (such as a question about my own art).

I don't pretend to be entirely infallible, and here people can fill in things I've got wrong and not thought of.

Originally posted by Vision:
what I’m trying todo is a head hacking method and the texture of the model is not as same as the other one which leaves a huge visible line/marker that I have been head hacking.
Again, terminology mix-up. This is really an issue with the overall material, not a texture.

This is always a challenge with head-hacking, but removing bumpmaps often isn't the best solution. The best way to fix it really depends on what it looks like and the parameters of the VMTs in question, so screenshots would be helpful.
That's not to say that disabling bumpmaps definitely won't help, but it will cause a big loss of visual fidelity, and so there may well be better ways to deal with it.

Originally posted by Pte Jack:
This will comment them out and the will disappear from the model.
I'd point out that doing it this way will cause phong and ambient occlusion to be disabled.

That may be a desirable side-effect, but as the $bumpmap is by default the material's phong mask, removing it entirely rather than using a plain normal map or using $basemapalphaphongmask instead will disable the phong effect (and, by extension, things that rely on it, like AO)
Last edited by Marco Skoll; Sep 26, 2018 @ 10:04am
Vision Sep 26, 2018 @ 11:32am 
Originally posted by Pte Jack:
Now that you've explained what you're trying to do, in the Head material (the VMT), find the statements that says, $bumpmap and/or $normalmap (it can be one, the other or both) and place 2 backstroke in front of them like // $bumpmap or // $normalmap . This will comment them out and the will disappear from the model.

OR

Find a VTF that is a plain blue normal map like this one SourceFilmmaker\game\tf\materials\models\player\shared\shared_normal.vtf, Load the model and add an override material, send the model to the element viewer, expand the materials and find the head material Right click it and add a new string attribute and name it $bumpmap then point the data column for it to that material. The bump will be gone.


For what model? The human model or the other one?
Marco Skoll Sep 26, 2018 @ 12:00pm 
Originally posted by Vision:
For what model? The human model or the other one?
Presumably both, but if it is a case of one or the other, you haven't actually explained which models you're using and which way around, so we couldn't pick either.
< >
Showing 1-15 of 18 comments
Per page: 1530 50

Date Posted: Sep 25, 2018 @ 2:04pm
Posts: 18