Time control mechanic (Help!)

Avatar
StimichPortals
30 Posts
Posted Mar 05, 2013
Replied 1 hour later
It's called toxicslime_coop_catapult_catch
Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Mar 05, 2013
Replied 4 hours later

Okay. I'll work on that.

EDIT: Try this. Save it as liquids/toxicslime_coop_catapult_catch_static.vmt in your materials folder.

Water
{
$forceexpensive 1
$normalmap "liquids/water_river_normal_sharp"
$basetexture "liquids/toxicslime_color"
"GPU>=1"
{
"!gameconsole?$reflecttexture" _rt_WaterReflection

"gameconsole?$forceenvmap" 1
"gameconsole?$envmap" "nature/toxicslime_coop_catapult_catch_envmap"
}
"GPU<1"
{
$forceenvmap 1
$envmap "nature/toxicslime_coop_catapult_catch_envmap"
}
$reflectamount "0.1"
$reflecttint "{ 190 210 210 }"
$reflectskyboxonly 0
$reflectonlymarkedentities 1




$abovewater 1
$bottommaterial "nature/toxicslime002a_beneath"
$fogenable 1
$fogstart 0
$fogend 100
$lightmapwaterfog 1

$fogcolor "{ 58 35 20 }"
$flashlighttint 1
"%compilewater" 1
"%tooltexture" "nature/water_frame01_normal"
$surfaceprop slime
}

Avatar
StimichPortals
30 Posts
Posted Mar 06, 2013
Replied 6 hours later
Welp. The texture turns black and there are no reflections.

http://puu.sh/2cTs8
"* Trying to set a pixel shader that failed loading!" popped up in the console.

Avatar
FelixGriffin
2,680 Posts
Posted Mar 06, 2013
Replied 8 hours later
Hm. Maybe I screwed something up in there. Could somebody who understands the Water shader look at the code? :razz:
Avatar
HMW
806 Posts
Posted Mar 06, 2013
Replied 8 hours later
I just tried it with the numbers set to 0 instead of removing them, and my texture is also black.
Maybe some of those parameters can't be 0 because they are used as a divisor, or something like that.
IIRC the water shader is reasonably well documented on the wiki, so try looking there.
Avatar
StimichPortals
30 Posts
Posted Mar 10, 2013
Replied 3 days later

HMW wrote:
I just tried it with the numbers set to 0 instead of removing them, and my texture is also black.
Maybe some of those parameters can't be 0 because they are used as a divisor, or something like that.
IIRC the water shader is reasonably well documented on the wiki, so try looking there.

Thanks. I'll look into it tomorrow!

Edit:

I found something that might be useful?

$flow_timescale

Though I'm not sure how to get the clean water shader stuff myself, nor do I know where to put that if it would happen to work.

Avatar
protoborg
288 Posts
Posted Mar 12, 2013
Replied 1 day later
You could try using whatever technique the "slow" cube uses in the PUNT cube set.
Avatar
FelixGriffin
2,680 Posts
Posted Mar 12, 2013
Replied 2 hours later
That's a logic_timescale entity blending between normal time and 0.25 time. I couldn't think of many puzzles to do with it but it seemed fun.
Avatar
HMW
806 Posts
Posted Mar 14, 2013
Replied 1 day later
I did a science and managed to get at least some of the animation out:

Water
{
$forceexpensive 1
$normalmap "liquids/water_river_normal_sharp"
$flowmap "liquids/mp_coop_catapult_catch_hflowmap"
$flow_normaluvscale 160
$flow_worlduvscale 1
$flow_timeintervalinseconds 0
$flow_uvscrolldistance 0
$flow_bumpstrength 1
$flow_noise_texture "liquids/water_noise"
$flow_noise_scale 0.0013
$flow_debug 0
$basetexture "liquids/toxicslime_color"
$color_flow_uvscale 300
$color_flow_timeintervalinseconds 4.5
$color_flow_uvscrolldistance 0
$color_flow_lerpexp 1 
$color_flow_displacebynormalstrength 0.007 
"GPU>=1"
{
"!gameconsole?$reflecttexture" _rt_WaterReflection

"gameconsole?$forceenvmap" 1
"gameconsole?$envmap" "nature/toxicslime_coop_catapult_catch_envmap"
}
"GPU<1"
{
$forceenvmap 1
$envmap "nature/toxicslime_coop_catapult_catch_envmap"
}
$reflectamount "0.1"
$reflecttint "{ 190 210 210 }"
$reflectskyboxonly 0
$reflectonlymarkedentities 1




$abovewater 1
$bottommaterial "nature/toxicslime002a_beneath"
$fogenable 1
$fogstart 0
$fogend 100
$lightmapwaterfog 1

$fogcolor "{ 58 35 20 }"
$flashlighttint 1
"%compilewater" 1
"%tooltexture" "nature/water_frame01_normal"
$surfaceprop slime
}

Unfortunately, there's still some motion left. (Changing $color_flow_timeintervalinseconds causes the texture patterns to shift, so it's better to leave that one alone.)

The textures themselves sometimes also contain animations. (I.e. blending between multiple frames.)
Maybe it helps if you replace those with non-animated versions.

Avatar
BenVlodgi
633 Posts
Posted Mar 14, 2013
Replied 1 hour later
did you ever look at the scripts that came with portal 2?
portal 2\portal2\scripts\vscripts\portal_slowfield
I've done some timecontroled maps myself without this script, and I used timescale and playerspeedmod
Avatar
protoborg
288 Posts
Posted Mar 14, 2013
Replied 1 hour later

BenVlodgi wrote:
...I've done some time controlled maps myself...

And just what maps are those? I love time manipulation maps almost as much as time travel maps. I would love to play one of your time maps, Ben.

Avatar
StimichPortals
30 Posts
Posted Mar 16, 2013
Replied 1 day later

HMW wrote:
I did a science and managed to get at least some of the animation out:
STUFF

Unfortunately, there's still some motion left. (Changing $color_flow_timeintervalinseconds causes the texture patterns to shift, so it's better to leave that one alone.)

The textures themselves sometimes also contain animations. (I.e. blending between multiple frames.)
Maybe it helps if you replace those with non-animated versions.

Awesome. Tried it and it looks nice. Thanks. :thumbup:

BenVlodgi wrote:
did you ever look at the scripts that came with portal 2?
portal 2\portal2\scripts\vscripts\portal_slowfield

I didn't. How do I get this script to work?

Avatar
FelixGriffin
2,680 Posts
Posted Mar 16, 2013
Replied 5 hours later
It looks like it was made before the logic_timescale was created. It contains functions to blend between normal time and slow time when the player enters or leaves a "slow field."
Avatar
StimichPortals
30 Posts
Posted Apr 09, 2013
Replied 23 days later
Sorry for not commenting in a long time. Thanks for help! :smile:
I'll most likely use HMW's static texture, and he'll/she'll be credited, of course. Again thanks.
If I ever encounter some other problems related to my time control maps I'll go back here.
Advertisement
Registered users don’t see ads! Register now!
Avatar
BenVlodgi
633 Posts
Posted Apr 10, 2013
Replied 1 day later

protoborg wrote:
BenVlodgi wrote:

...I've done some time controlled maps myself...

And just what maps are those? I love time manipulation maps almost as much as time travel maps. I would love to play one of your time maps, Ben.

Never released. I was making Back-Stock maps with this mechanic, then felt it didn't fit the portal 2 universe, and started making a HL2 sourcemod where I hard-coded the effect, but I found that I didn't have time to work on that and the other Portal 2 mods I was doing. I think we will end up including time control as a mechanic in back-stock