Texures
Most important thing to know about source textures: they consist of a vmf and vmt file.
VMF = the image (Dimensions need to be a power of 2. (so 1,2,4,8,16,32,64,128,256,512 (or 1024 but this might need some more tweaking))
VMT = a text file to describe how a texure must be in-game.
The VMT is what you want to edit in this case. Just open the VMT file with notepad and you'll see something like this:
As an example I took nature/forest_grass_01:
LightmappedGeneric
{
$baseTexture "nature/forest_grass_01"
$surfaceprop dirt
"%keywords" ep2
}
$baseTexture is the texture (the vmf file) that is used by this material.
$surfaceprop is the type of texture this is. This determines the sounds that you make on them. This behaviour is regulated by <game>\scripts\surfaceproperties_manifest.txt
%keywords is something you can set so it's easier to find.
Because you don't want to overwrite other people's textures, I ALWAYS put my custom materials in a special sub-folder (in my case portal 2/portal2/materials/Lp.)
So, next step is to copy/paste this text in a new notepad file. (I'll call this one grass_forest_01_noportal.) And save it in portal 2/portal2/materials/Lp.
To actually tell the engine that you can't place portals on a surface add
"%noportal" 1
That was easy!
Then it's time to do the actual modification:
LightmappedGeneric
{
$baseTexture "nature/forest_grass_01"
$surfaceprop dirt
"%keywords" noportal
"%noportal" 1
}
And now you should have a nice piece of grass where you can't place portals on.
Hope that was helpful 
~Lp
CamBen wrote:
My best guess is to put a nodraw texture or anything else non-portable and invisible a tiny layer over the grass.
When I tried that, it made all the colors smear together. If you've played "Weighted Wonderland" it kind of does the same thing. It only happened on the area where I put the "nodraw" texture. Everywhere else it was fine, but on the ground everything just smeared together.
lpfreaky90 wrote:
Yes, you can edit textures.Most important thing to know about source textures: they consist of a vmf and vmt file.
VMF = the image (Dimensions need to be a power of 2. (so 1,2,4,8,16,32,64,128,256,512 (or 1024 but this might need some more tweaking))VMT = a text file to describe how a texure must be in-game.
The VMT is what you want to edit in this case. Just open the VMT file with notepad and you'll see something like this:As an example I took nature/forest_grass_01:
```
LightmappedGeneric
{
$baseTexture "nature/forest_grass_01"
$surfaceprop dirt
"%keywords" ep2
}
> $baseTexture is the texture (the vmf file) that is used by this material.
> $surfaceprop is the type of texture this is. This determines the sounds that you make on them. This behaviour is regulated by <game>\scripts\surfaceproperties_manifest.txt
> %keywords is something you can set so it's easier to find.
>
> Because you don't want to overwrite other people's textures, I ALWAYS put my custom materials in a special sub-folder (in my case portal 2/portal2/materials/Lp.)
>
> So, next step is to copy/paste this text in a new notepad file. (I'll call this one grass_forest_01_noportal.) And save it in portal 2/portal2/materials/Lp.
>
> To actually tell the engine that you can't place portals on a surface add
> ```
"%noportal" 1
That was easy!
Then it's time to do the actual modification:
```
LightmappedGeneric
{
$baseTexture "nature/forest_grass_01"
$surfaceprop dirt
"%keywords" noportal
"%noportal" 1
}```
And now you should have a nice piece of grass where you can't place portals on.
Hope that was helpful
~Lp
Okay, this is so weird. The texture you used shows up in the texture browser, but it doesn't show up in Windows Explorer. It's like it's using a texture that doesn't exist. I checked the cache files for Portal 2 Authoring Tools and Portal 2; they both had a few files missing that were then downloaded, but I checked for that texture again and it still wasn't there. Do you know why this is?
EDIT: as pointed out, Portal 2 uses vpks
For portal 2 it doesn't matter if the texture is in the vpk or in the materials/ folder. And references to textures in the vpk work perfectly fine. 