Portal 2

Portal 2

Adhesion (Sticky gel)
vrad.exe 11 May, 2020 @ 10:12am
New method for duplicating paint in the clone world
I've been messing with your adhesion gel script a lot (you can see some of the stuff I've been working on in my screenshots). One interesting thing I found is that if you spawn multiple copies of a brush entity using a point_template, paint will automatically be synced between all of them. That could be really useful for Adhesion Gel, since it eliminates the need for bombs to be manually spawned in the clone world. I'm currently trying to get that implemented in my version of the script, but I thought you might be interested in case you were still working on this.
< >
Showing 1-7 of 7 comments
Prototype  [developer] 7 Jun, 2020 @ 7:39pm 
That's interesting, thanks for letting me know. I think the traces wouldn't work on the spawned copy though, so you might still need the static world for tracing, a point_template copy for testing paint and then the player version. It would make the paint accurate to the real room though which is nice. I'll keep it in mind, I haven't been looking at this recently.

If you find a way to get gel flow to respect a gravity vector, e.g. so it can fall onto a wall, I'd be very interested.
vrad.exe 9 Jun, 2020 @ 4:47pm 
Unfortunately I haven't found a way to set gel flow gravity as a vector. The blobs don't even seem to be their own entities, they don't show up in ent_text and aren't affected by a trigger with every flag set. The cvar unhider plugin doesn't seem to provide anything related to this either. It is technically possible to use gel flow with my new clone world method (since it would no longer get desynced), but it still won't flow correctly.

And yeah, I did end up needing a third copy of the world textured with Invisible for the traces. I just placed it overlapping the point_template clone world though, that worked fine.
vrad.exe 21 Jul, 2020 @ 4:16pm 
Have you heard of Portal 2: Community Edition? It's a custom build of the game, developed by a team who got official source code access from Valve, that makes various improvements to the game. Among the new features is proper Adhesion Gel, implemented in code with no map rotation involved. It's currently in a very unfinished state (camera rotation doesn't work correctly, it doesn't work with cubes, etc), but once fully implemented it'll pretty much make this entire system obsolete, so you probably shouldn't spend too much more time working on this or making maps with it.
Prototype  [developer] 22 Jul, 2020 @ 1:52am 
I hadn't before you mentioned it. I might give it a try if it gets released, looks like it's a long way off though. I wonder what level of access Valve gave them, I guess it would be a Source SDK modding API similar to what's used for HL2 mods, I can't imagine Valve just gave them the entire game source.
vrad.exe 22 Jul, 2020 @ 11:07am 
They have the entire game source code, except for the Puzzlemaker and a couple minor things. It's all under an NDA though, they aren't allowed to publicly release the code or even really talk about it.
vrad.exe 3 Oct, 2021 @ 7:30pm 
I heard from TeamSpen210 about a potential way to change the gravity direction of paint blobs: the point_push entity! It has the ability to redirect paint blobs, and if you turn off its flags for players and physics objects, then it'll affect paint blobs only.

For adhesion gel, what you could do is have a point_push with a massive radius placed far away from the map, so it basically pulls the blobs in a single direction. Then when rotating you set paintblob_gravity_scale to 0 (so they aren't affected by real gravity), teleport the point_push below the true floor, and enable it. You'd also need to use a trigger_paint_cleanser covering the whole map to destroy any blobs in mid-flight, since they can't be teleported.

I haven't tried actually implementing this, but if it works then this would be a huge improvement to the system. Of course as I said above P2CE is properly implementing adhesion gel in code, which basically makes adhesion gel recreations like this obsolete, but I guess it's still fun to see how far we can push the vanilla P2 engine with this, especially since P2CE hasn't been publicly released yet. I can send you my current version of the adhesion system if you're still interested at all.
Prototype  [developer] 5 Oct, 2021 @ 4:12am 
I did try using point_push a long time ago, but I didn't see a way to make it work well.

I just tried what you suggested and it does somewhat work, but the point_push was lagging the game (generating warnings in the console about point_push think time >10ms). Portals in the world change the direction/strength of the fake 'gravity' field and also lag the game even more. I don't see a way around these issues.

Feel free to send me your version, I haven't been spending much time on Portal recently though so I might not do much with it.
< >
Showing 1-7 of 7 comments
Per page: 1530 50