Help with custom water texture
Quote from Doomaflatchi on October 21, 2014, 6:12 pmI 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 itThis 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 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!
Quote from josepezdj on October 22, 2014, 4:20 amI 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?
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?
Quote from CamBen on October 22, 2014, 10:28 amI'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.
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.
Aperture Science: We do our science asbestos we can!
Quote from Doomaflatchi on October 23, 2014, 12:00 pmCamBen 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.
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.
Quote from josepezdj on October 23, 2014, 1:21 pmOK, 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 . 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
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 . 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
Quote from Doomaflatchi on October 23, 2014, 3:43 pmThis is fantastic! Thank you SO MUCH!
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!
This is fantastic! Thank you SO MUCH!
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!
Quote from TeamSpen210 on October 23, 2014, 4:02 pmMaybe 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.
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.
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
Quote from Doomaflatchi on October 23, 2014, 4:27 pmTeamSpen210 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?!Honestly, though, this is amazing, and might be exactly what I need. THANK YOU!
0_0
HOLY $#&@ why couldn't I have found that a month ago?!
Honestly, though, this is amazing, and might be exactly what I need. THANK YOU!