Changing Gel Colours

Avatar
Enraged
18 Posts
Posted Jun 04, 2011
I've never attempted to replace an existing texture before so excuse me if this is a really stupid question.

So I need to change the colour of the white portal-surface-painting gel. I believe that the original texture being used is a 4x4pixel texture, paintblobs/blob_surface_portal. So I created a pure black 4x4 vtf file and placed it in the '\common\portal 2\portal2\materials\paintblobs' where I had to create the paintblobs folder. I then loaded the game but the paint is still white both when it falls and when it lands on the ground.

Any help on this matter would be appreciated.

Note, I did NOT also place a vmt file in there. I am assuming it will use the one in the VPK, wherever the hell it is located.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Aldéz
221 Posts
Posted Jun 04, 2011
Replied 3 hours later
Does your texture have the same name and is placed in the same folder as the one you're trying to replace? Did you reload the materials or restarted the game?
Avatar
Enraged
18 Posts
Posted Jun 04, 2011
Replied 7 minutes later
Yeah it's exactly the same and since the initial post the VMT file was taken from the VPK and pasted into the override folder with the new texture. It did not solve the problem. I've restarted the game 3 times with the ingame standard levels and recompiled my own map a few times.

Edit: Note, the paintblobs folder is the one under materials, not the paintblobs under material>particle

Avatar
Skotty
671 Posts
Posted Jun 04, 2011
Replied 23 minutes later
Try to pack your new gel textures in a custom VPK (http://developer.valvesoftware.com/wiki ... rtal_2_Map) and put it to your addons folder. Maybe this will overwrite the original VPKs.

VPKs are higher ranked in Portal. If you have a map in a custom VPK and as single BSP in your maps folder, it will always use the VPK file.

Avatar
Enraged
18 Posts
Posted Jun 04, 2011
Replied 4 minutes later
Ok, that's a good point. Trying this now.

Update: Included the VTF and the VMT for the blob_surface_portal but unfortunately it's still coming up white. :/

Avatar
WinstonSmith
940 Posts
Posted Jun 04, 2011
Replied 58 minutes later
I believe to replace an ingame texture--at least for now--you have to actually edit pak01_dir.vpk. See this post for instructions.
Avatar
gompasta
109 Posts
Posted Jun 04, 2011
Replied 3 hours later
If your replacing an ingame texture in the _dir.vpk, would it not be permanent, and through all maps?
Avatar
WinstonSmith
940 Posts
Posted Jun 04, 2011
Replied 2 hours later

gompasta wrote:
If your replacing an ingame texture in the _dir.vpk, would it not be permanent, and through all maps?

Yes, that's the drawback. I'm not sure how to replace textures on a map-by-map basis.

Avatar
Enraged
18 Posts
Posted Jun 05, 2011
Replied 9 hours later
I just need it for a demonstration I'm planning to develop. I can revert it afterwards.

I deleted the old vpk I created and made a new one, this time with a map in it to see if the modification would work on that map alone. Unfortunately it did not.

I'm a bit weary of editing the standard .vpk's. I remember reading somewhere it was a VAC bannable offence. Obviously this is for innocent, singleplayer use but I don't know if that's still taken into consideration.

Avatar
gompasta
109 Posts
Posted Jun 05, 2011
Replied 40 minutes later

Enraged wrote:
I'm a bit weary of editing the standard .vpk's. I remember reading somewhere it was a VAC bannable offence. Obviously this is for innocent, singleplayer use but I don't know if that's still taken into consideration.

I believe it would only be bannable, in multiplayer, if it is network manupulation or cheats. I would have thought it would be fine to do so, within singleplayer.

Avatar
Enraged
18 Posts
Posted Jun 05, 2011
Replied 28 minutes later

Until I'm sure I'd prefer to avoid taking the risk.

Update, I've heard talk of a launch option, '-override_vpk' and attempted to use it to no avail. It was used both with the custom vpk and with actual files in the portal2/materials folder. Neither worked.

mapping-help/modifying-vpk-files-t2336.html

http://forums.steampowered.com/forums/s ... ?t=1427390

http://forums.steampowered.com/forums/s ... ?t=1888439

http://www.widescreengamingforum.com/fo ... 06start=0

Update: It should be noted the texture works absolutely fine as normal when it is renamed to be a unique texture of it's own, so it's NOT a problem with that.

&&&
Avatar
WinstonSmith
940 Posts
Posted Jun 05, 2011
Replied 7 hours later
As far as I know, editing VPKs to allow skins isn't illegal; in the past I've modified the pak01_dir VPK to change the portal colors and no alarms were tripped or anything. Of course, that was in singleplayer. I'm fairly certain it's perfectly fine, but I understand your reservations. Let me mess around a bit with addon VPKS and -override_vpk and see if something works.
Avatar
Grim Tuesday
8 Posts
Posted Jun 05, 2011
Replied 23 minutes later
Is Portal 2 even VAC protected?
Avatar
WinstonSmith
940 Posts
Posted Jun 05, 2011
Replied 7 minutes later
I would assume coop...

Actually I don't know.

Anyway, I tried packing a map and custom textures in a VPK, adding the -override_vpk parameter, and it still doesn't work. The best I can discern is that there's no way to override stock files of any sort without modifying pak01_dir.vpk.

Avatar
Enraged
18 Posts
Posted Jun 05, 2011
Replied 7 minutes later
Well I guess I'll have to do it then to get this done.

Next point of interest I found in researching the paints, if you create a info_paint_sprayer, turn off smart edit and set the paint type to 1 you'll have purple paint. However, the blobs are NOT textured and use the black/purple chequerboard error texture. In the blobs folder I've been working in this makes sense as there are only the textures for speed, bounce, cleanse and portal. However, if the floor is still being covered in purple paint this means there is another texture/code somewhere that will also need to be edited. I cannot guess what it is as I have tried all the obvious search terms to find it. (Gel, paint, blob, stick, purple, etc. in the filter field.)

All of your guys help is massively appreciated!

Avatar
WinstonSmith
940 Posts
Posted Jun 05, 2011
Replied 1 hour later

Enraged wrote:
Well I guess I'll have to do it then to get this done.

Next point of interest I found in researching the paints, if you create a info_paint_sprayer, turn off smart edit and set the paint type to 1 you'll have purple paint. However, the blobs are NOT textured and use the black/purple chequerboard error texture. In the blobs folder I've been working in this makes sense as there are only the textures for speed, bounce, cleanse and portal. However, if the floor is still being covered in purple paint this means there is another texture/code somewhere that will also need to be edited. I cannot guess what it is as I have tried all the obvious search terms to find it. (Gel, paint, blob, stick, purple, etc. in the filter field.)

All of your guys help is massively appreciated!

Wait for it...
18ZMM6XPcQY

Might want to talk to reepblue, he can probably help you out.

Avatar
Enraged
18 Posts
Posted Jun 06, 2011
Replied 15 hours later
I am attempting to make contact with him aswell as omnicoder who is well known around these parts. Apparently he was involved in the paints development, atleast according to the youtube videos details.

Another note, I have confirmed that the paintblobs and paintsplats ARE different and it is not simply an incomplete programming error in the case of the purple paint as can be seen here: http://steamcommunity.com/id/EagleStrik ... 2360115126

I cannot for the life of me find where the hell the splat textures/color templates are located. I've tried as I said ALL the obvious locations in the textures. This has led me to believe that the colour is being determined in a vmt or some other text file by an RGB or CMYK or some shit like that.

Update

Ok, mistakes get made. In this case it was my interpretation that the paint splats are 1 texture when infact it is quite obvious that the are simply a mix of decals and when a sufficient area is covered the paint is effective in that area. I believe I've found the related textures in the particle's folders and am now about to investigate them further.

Avatar
TheDarkness73
14 Posts
Posted Jun 06, 2011
Replied 4 hours later
Where is the script for the Gel located? I can't seem to find the script for some of the stuff. Any ideas?
Avatar
Enraged
18 Posts
Posted Jun 06, 2011
Replied 1 hour later
Your question is null. There are about 8 scripts controlling different aspects of the gel and it's part of the reason I'm having such trouble finding the determinant factor in the colour of the final splat. What do you want to do and then I might be able to help you.

On a side note, I believe I've isolated how to change the base colour. I've opened and modified the splash particle effects file and there's a third, non-effect related colour for each of the gels. As a result I believe THIS is the colour code used to determine the splat colour. I've modified the file appropriately so it's a black effect with the black splat expected third, and now just need to replace the existing effects file to test it. As I said, still weary of editing the VPK but if it comes down to me not finding another solution very soon it'll have to be done.

I'm wondering if I could get an addon VPK to work by including an addoninfo.txt. Unfortunately I obviously don't know what the Portal 2 definitions will be as they haven't released them yet. Time to take a shot in the dark.

Advertisement
Registered users don’t see ads! Register now!
Avatar
TheDarkness73
14 Posts
Posted Jun 06, 2011
Replied 1 hour later
I wanted to look at the gel scrpit so i might be able to write one. I was hoping to make 2 new gels, that would allow Gels and portals to bounce off them, like in a pool table, reflecting the angle they came in on. So I was hoping to find teh script to get a basic idea on gel