Jump to content
Vorontsov

.VMT and .VMF Help Thread

Recommended Posts

I'm not sure if there is one so I guess I'll start one where people can come and go and ask questions / anwser them.

 

My question: in VTFEdit when you create a .VMT file there are no obvious options, atleast not how I understand them. I have a diffuse texture, normal map, specular map and a displacement map. I do not know how to implement these properly in the .VMT creator. There are also confusing options like there being "Bump Map 1" and "Bump Map 2" as well as "Normal Map", so if I wanted to add the normal map to my texture which option should be chosen? And how do I implement all my maps into one texture? 

Share this post


Link to post
Share on other sites

Your title is a bit wrong; I believe you meant VMT and VTF thread (not VMF) (VTF is the texture format while VMF is the map source file format)

 

Your answers lie in the Valve Developer Community wiki

 

https://developer.valvesoftware.com/wiki/$bumpmap

 

https://developer.valvesoftware.com/wiki/$envmap

 

https://developer.valvesoftware.com/wiki/$envmapmask

 

https://developer.valvesoftware.com/wiki/$normalmap

 

My advice to you is to open stock textures of Valve in VTFEdit and see what they ticked; for exmaple if you are creating a cobblestone texture with bumpmap then open up some cobble roads textures from de_cbble in CSS or CSGO and check the options and try to mimick them in yours (like anisotropic, no mipmap, clampS, clampT, normal map and so on)

 

Hope this helps

Edited by will2k

Share this post


Link to post
Share on other sites

normal maps are pretty straightforward in source.

 

Once you prepare the normal map vtf, make sure to tick the "normal map" checkbox.

 

The vmt declaration is very simple especially for a brush-based texture

 

example vmt:

 

"LightmappedGeneric"
{
    "$basetexture" "folder_name/texture_name"
    "$surfaceprop" "rock"
    "$bumpmap" "folder_name/texture_name_n"
}

 

You can name your bumpmap anything but to keep things tidy, just add _n or_normal to the diffuse texture name.

Edited by will2k

Share this post


Link to post
Share on other sites

here is a sample vmt's to make things clearer (stock texture from office):

 

LightmappedGeneric
{
    "$basetexture"    "plasteroffwllb"
    "$surfaceprop" "plaster"
    "$bumpmap" "plaster/offwllb_normal"
     "$envmap" "env_cubemap"
    "$envmapcontrast" "1"
    "$normalmapalphaenvmapmask" "1"
}
 

To test your normal maps in-game, open the console and type mat_normalmaps 1; all your textures with normal maps will turn to the blue normal map. If a certain diffuse texture that you are sure you made a normal map for it does not turn into the blue normal map then you know something is wrong either in the vtf or the vmt switches.

 

To test spec maps in-game, open the console and type mat_specular 0 to temporarily turn off specularity and reflections (so you can check which textures are changing)

 

These are boolean command so 0 to toggle off and 1 to toggle on.

Share this post


Link to post
Share on other sites

Alright thanks fixed my normals, but how do I know the specular in it's alpha channel is being used? Do note that everything now is set up 100% correctly and should work, I just want to know for a fact that the speculars work too. Mat_specular 0 / 1 are not avaible commands in CSGO. Maybe some other command to check it? 

Share this post


Link to post
Share on other sites

Yes, unfortunately Valve locked the 2 cmds in CSGO :| (mat_specular and mat_bumpmap), despite being very helpful in quickly checking spec and normal maps in-game.

 

For normal maps in CSGO, my earlier post clarified the new method to check them in-game (mat_normalmaps); you can also try mat_fastnobump 1/0 to quickly enable/disable bumpmapping.

 

For specular maps, first type r_showenvcubemap 1 to turn your glove and pistol model to a reflective texture. Run around the map and you should see that the reflection is changing depending on the cubemap in that particular area. If your cubemaps are not loaded correctly, then the texture will reflect only the skybox or not reflect at all. This is to ensure that your reflections are enabled and correct.

 

Now for your particular texture, I guess you can inspect it visually to check reflectivity. Make sure all video settings are on high in CSGO (low settings disable reflections by default), then wander near your texture and you should easily see that it is reflecting light. If in doubt create a small test map in CSS and use this particular texture then you can use mat_specular to toggle reflectivity and check the texture closely.

 

Hope this helps

Edited by will2k

Share this post


Link to post
Share on other sites

You are awesome for doing this, so mad love to you, don't really know what I would do otherwise, just a shame that I'm the only one asking questions :D.

 

Either way, what is the difference between $bumpmap and $normalmap?

 

One would assume that you should use $normalmap for your normalmaps, but everyone seems to use $bumpmap. What's the difference? 

Share this post


Link to post
Share on other sites

Maybe I should create a new thread, but this one should actually fit.

I'm having some trouble seeing bumpmaps in csgo.
I've followed tutorials on the net (like TophatWaffle's one) and carefully traced the different steps.

-Create vtf of base texture

-Create normalmap and make vtf aswell (checking the flag "normal map")

-Creating a .vmt with the following:

"LightmappedGeneric"
{
    "$basetexture" "custom/de_samba/broken_brick_plaster_bottom"
    "$bumpmap" "custom/de_samba/broken_brick_plaster_bottom_bump"
    "$surfaceprop" "Brick"
    "$surfaceprop2" "Default"
}

Then I applied the texture to a brush in Hammer and compiled the whole map (is a full compile necessary?)

When I go in the game and look at the texture, I see no difference at all. When I check with " mat_normalmaps 1", I see no blue textures or whatever.

 

Can someone help me with my problem?

Thanks in advance.

Edited by Tomato

Share this post


Link to post
Share on other sites
12 hours ago, tomm said:

Check your in-game console, it might be yelling at you to build cubemaps for the bump to show up.

Nothing strange in the console, just some normal errors of things about bots and GUI elements of the main menu
and something about the chickens.

and then this:

No pure server whitelist. sv_pure = 0
PutClientInServer: no info_player_start on level
๖ۜ[email protected] | ße | connected.
Ethan connected.
Orin connected.
Adam connected.
Greg connected.
Nate connected.
Colin connected.
Wyatt connected.
Josh connected.
Martin connected.
] sv_cheats 1
] noclip 
noclip ON
] noclip 
noclip OFF
] mat_normalmaps 1

 

Which looks all normal whenever I start the map

Edit: I didn't thought building cubemaps was necessary for bumpmaps. NEver saw that in one of the tutorials. Or is it changed for GO?

Edited by Tomato
Extra question

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...