Please or Register to create posts and topics.

Help with custom water texture

I have a more abstract type of level in which I am attempting to use the swimming controls to create more freedom of movement (since Portal 2 lacks any working flight controls). To do this, I am intending to surround my entire level with a single water volume, and execute a 'god' console command on level load to prevent drowning.

However, I have had difficulty finding good information on custom water textures, and just opening them up with GTFScape gives me something that's a bit over my head. Could anyone here either provide, or preferably help walk me through the creation of, a water texture that fulfills the following:

1) CLEAR water with no vision obscuring
2) NO flow
3) Surface texture is irrelevant, since the player will be underwater at all points in the level and will never see it

This seems like it should be a fairly basic dev texture (I really just want the swim controls, but because I can't get at the source code in Portal 2 I can't just hack it into the player controller), but I've just been hitting a wall trying to figure this out. Any assistance that you guys could provide would be GREATLY appreciated. Thank you!

I can help you out on that. I've developed many different kinds of water textures, including clean and clear ones. I could check them out this evening and post one of them.

The water shader is very complex, although with some testing and trial-error you can take much advantage from it and get cool things.

Questions about your 3 points:

1) No vision obscuring? I'd suggest you to keep that 'obscuring effect' when the player is under water otherwise it would look too unrealistic. However, you can extend the radius that effect is spreaded from the player by tweaking the parameter $fogend [distance]

2) No flow? again I'd suggest you to keep a certain flow movement on the water surface, if that's what you mean, becasue you'll get more realistic water always. You can dim much this effect though with a good flowmap and scaling the water texture on top of your water brush.

3) OK, but I guess that you'll mind how the top texture looks like once the player is underneath water and looking upwards, right?

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

I'm pretty sure the point of this is that he doesn't want it to look like water, Jose. He just wants the player to be able to move around freely in the map without having any visual effects that suggest he is using water to get the movement type he wants.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!

hmmm.... now that you said so, it seems to me that you are correct. Ok... easier then.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

CamBen is correct; I just need it for the player movement. The player will never actually SEE the surface texture, as it will be outside the playable space (with the volume overlapping the level).

Although, I do suppose I will need SOME kind of obscurement... I'd been using an env_fog_controller to fade out the farther parts of my level for performance reasons, but I'm not sure if an env_fog_controller will continue to work properly underwater. Do you happen to know? If it doesn't, you're right - I can always tweak that $fogend to get it right.

I really appreciate the help! Thank you so much!

EDIT: And by "flow", I really meant the current that lightly pushes the player when they're standing on a surface underwater (since they'll never see the surface texture). I'd rather have it not push them at all, if possible.

OK, test the attached one and let me know :)

EDIT
I edited the files. Please make sure you got the zipped file "jose_clear_water_1.1.7z". The change is the "beneath" naterial mainly, now it is so still that it doesn't even look like water at all :D. I couldn't make any progress on avoiding the water splashing sound and the wave that helps you to jump out, but I think that you can't avoid that, since you are using the water shader, the engine must render that brush as water and treat it like so, including all its physics ;)

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

This is fantastic! Thank you SO MUCH! :D

In furtherance of this, is there any way to get the player to be neutrally buoyant so they don't sink? I tried a trigger_gravity, but it didn't affect the water physics at all. Additionally, is the sliding when a player is standing on a surface the "wave" you were talking about? So there's no way to avoid that either?

Finally, the water fog is working strangely through linked_portal_doors, which may also be unavoidable. It works normally in a test level (including adjusting values in the .vmt), but the portals make it wonky, and the water settings override the env_fog_controller even if it's set to Master, so I can't use that. Right now, I'm controlling the vision distance with just a Far Z Clip Plane, which works okay but looks abrupt. Any thoughts?

And again, THANK YOU for your help!

Maybe you could try messing with the player's movement via this... Try sending the !player an AddOutput command with a parameter of "movetype 4" OnMapSpawn via a logic_auto.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
TeamSpen210 wrote:
Maybe you could try messing with the player's movement via this... Try sending the !player an AddOutput command with a parameter of "movetype 4" OnMapSpawn via a logic_auto.

0_0
HOLY $#&@ why couldn't I have found that a month ago?! :notwant:

Honestly, though, this is amazing, and might be exactly what I need. THANK YOU!