Texures
Quote from portal2companioncube on February 26, 2012, 11:11 amIs there a way to modify a texture? I'm putting a grass texture in my map, but it's letting me shoot portals on it. Is there a way to make it a non-portalable surface? And, yes, there is a non-portalable surface underneath it.
Is there a way to modify a texture? I'm putting a grass texture in my map, but it's letting me shoot portals on it. Is there a way to make it a non-portalable surface? And, yes, there is a non-portalable surface underneath it.
Quote from CamBen on February 26, 2012, 11:19 amMy best guess is to put a nodraw texture or anything else non-portable and invisible a tiny layer over the grass.
My best guess is to put a nodraw texture or anything else non-portable and invisible a tiny layer over the grass.
Aperture Science: We do our science asbestos we can!
Quote from Lpfreaky90 on February 26, 2012, 11:43 amYes, 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:
- Code: Select all
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>scriptssurfaceproperties_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
- Code: Select all
"%noportal" 1That was easy!
Then it's time to do the actual modification:
- Code: Select all
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
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:
- Code: Select all
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>scriptssurfaceproperties_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
- Code: Select all
"%noportal" 1
That was easy!
Then it's time to do the actual modification:
- Code: Select all
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
Quote from CamBen on February 26, 2012, 11:49 amI was just about to edit my post after messing w/ a vmt, trying to make a companion cube poster into my "chell's house" map. (and it worked!)
I was just about to edit my post after messing w/ a vmt, trying to make a companion cube poster into my "chell's house" map. (and it worked!)
Aperture Science: We do our science asbestos we can!
Quote from portal2companioncube on February 27, 2012, 5:37 pmCamBen 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.
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.
Quote from portal2companioncube on February 27, 2012, 5:40 pmlpfreaky90 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:
- Code: Select all
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>scriptssurfaceproperties_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
- Code: Select all
"%noportal" 1That was easy!
Then it's time to do the actual modification:
- Code: Select all
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
~LpOkay, 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?
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:
- Code: Select all
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>scriptssurfaceproperties_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
- Code: Select all
"%noportal" 1
That was easy!
Then it's time to do the actual modification:
- Code: Select all
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?
Quote from BEARD! on February 27, 2012, 5:49 pmIs the texture file inside one of the gcfs vpks? They're located in steamappscommonportal 2portal2 and GCFScape can read them.
EDIT: as pointed out, Portal 2 uses vpks
Is the texture file inside one of the gcfs vpks? They're located in steamappscommonportal 2portal2 and GCFScape can read them.
EDIT: as pointed out, Portal 2 uses vpks
Co-operative: Lightspeed Upstairs Downstairs
Quote from Spam Nugget on February 27, 2012, 6:48 pmYeah it will be in there, but remember that in portal 2 they are in vpks, not gcfs. GCFScape will still open them. The one you will want to open is pak01_dir.vpk, this is the only one you will need to bother with.
Yeah it will be in there, but remember that in portal 2 they are in vpks, not gcfs. GCFScape will still open them. The one you will want to open is pak01_dir.vpk, this is the only one you will need to bother with.

I think in terms of boolean variables. Generally, it makes things easier.
Quote from Lpfreaky90 on February 27, 2012, 9:31 pmBoth the vmt and vmf files are not in your folders, they are in pak01_dir.vpk. But that doesn't really matter, just adding this custom vmt file to your portal 2/portal2/materials/<something>/ should work
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.
Both the vmt and vmf files are not in your folders, they are in pak01_dir.vpk. But that doesn't really matter, just adding this custom vmt file to your portal 2/portal2/materials/<something>/ should work ![]()
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. ![]()
Quote from portal2companioncube on February 28, 2012, 6:48 pmI think it's because the map is so spread out. It's not big, really; it's just spread out, if that makes sense. Eventually I got it to compile. I tried compiling at different points in the map and eventually got it to work. I made some changes and now I'm having trouble finding that spot, again. I got that disabled, but it's still not working. Again, I tried loading the pointfile, now it's showing a red line going from the top of the map, to the bottom, and back to the top again without touching any brushes or entities. WHAT'S GOING ON?!?!?!?!?!
![]()
![]()
![]()
I think it's because the map is so spread out. It's not big, really; it's just spread out, if that makes sense. Eventually I got it to compile. I tried compiling at different points in the map and eventually got it to work. I made some changes and now I'm having trouble finding that spot, again. I got that disabled, but it's still not working. Again, I tried loading the pointfile, now it's showing a red line going from the top of the map, to the bottom, and back to the top again without touching any brushes or entities. WHAT'S GOING ON?!?!?!?!?!
![]()

