Func water analog: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 
 Important:Does not work with the Water shader.
Important:Does not work with the Water shader.
Refract Can be used as a workaround for dynamic refraction, although Valve does not provide any materials which do this.
Existing materials which are compatible include: Confirm:Does the Water shader work if using cubemap reflections and refractions, instead of the real-time versions? This would still be beneficial for the ability to have two normal maps scrolling in different directions.
 Confirm:Does the Water shader work if using cubemap reflections and refractions, instead of the real-time versions? This would still be beneficial for the ability to have two normal maps scrolling in different directions. 
 Bug:If this entity uses multiple brushes - VPhysics objects works incorrectly with this entity (the same for func_water) in
Bug:If this entity uses multiple brushes - VPhysics objects works incorrectly with this entity (the same for func_water) in  Black Mesa. It looks like they are using this entity's BBox to calculate physics, instead of using brushes. This issue can be found in Interloper chapter. Separate water into several separate entities to avoid this bug.
 Black Mesa. It looks like they are using this entity's BBox to calculate physics, instead of using brushes. This issue can be found in Interloper chapter. Separate water into several separate entities to avoid this bug.
  (tested in:  )
)
 Bug:This entity always has its contents set to CONTENTS_WATER (regardless of brush contents), with no way of setting its contents to CONTENTS_SLIME. In most games, this will only affect splash particles.
Bug:This entity always has its contents set to CONTENTS_WATER (regardless of brush contents), with no way of setting its contents to CONTENTS_SLIME. In most games, this will only affect splash particles.
 Code Fix:Add a KV that is read by 
  (tested in: SDK 2013 source code)
Code Fix:Add a KV that is read by 
  (tested in: SDK 2013 source code)
 Note:The
Note:The 
 Bug:There are bugs that may arise when parenting this entity to any of these: func_movelinear, func_lookdoor, func_water_analog. A func_door (or for func_water_analog, func_water) can be used as a workaround. (see here for a code fix)[
Bug:There are bugs that may arise when parenting this entity to any of these: func_movelinear, func_lookdoor, func_water_analog. A func_door (or for func_water_analog, func_water) can be used as a workaround. (see here for a code fix)[ Code Fix]
 Code Fix]
 Confirm:Might be fixed in Portal 2? Parented movelinears are used extensively for this game's piston platforms.
 Confirm:Might be fixed in Portal 2? Parented movelinears are used extensively for this game's piston platforms.
 Code:Both
Code:Both 
 Note:Other
Note:Other 
		
	
|  (Refract shader does work on moving water) | m (Removed margin_left of Expand.) | ||
| Line 14: | Line 14: | ||
| {{bug|tested={{bms}}|If this entity uses multiple brushes - [[VPhysics]] objects works incorrectly with this entity (the same for {{ent|func_water|engine=source}}) in {{bms|4}}. It looks like they are using this entity's [[Bounding box|BBox]] to calculate physics, instead of using brushes. This issue can be found in [[Interloper]] chapter. Separate water into several separate entities to avoid this bug. | {{bug|tested={{bms}}|If this entity uses multiple brushes - [[VPhysics]] objects works incorrectly with this entity (the same for {{ent|func_water|engine=source}}) in {{bms|4}}. It looks like they are using this entity's [[Bounding box|BBox]] to calculate physics, instead of using brushes. This issue can be found in [[Interloper]] chapter. Separate water into several separate entities to avoid this bug. | ||
| {{expand|title=Examples. | {{expand|title=Examples.| | ||
|   [[File:wateran1.jpg| thumb | left | 710px |Note how the hat "flying in air".]] |   [[File:wateran1.jpg| thumb | left | 710px |Note how the hat "flying in air".]] | ||
|   [[File:wateran2.jpg| thumb | right | 710px |Note how the hat "flying in air".]] |   [[File:wateran2.jpg| thumb | right | 710px |Note how the hat "flying in air".]] | ||
Revision as of 00:24, 18 January 2025

 
|  Class hierarchy | 
|---|
| CFuncMoveLinear | 
|  func_movelinear.cpp | 
func_water_analog  is a   brush entity  available in all  Source games. It's a version of func_movelinear slightly specialized for use as water.
 Source games. It's a version of func_movelinear slightly specialized for use as water.
 Important:Does not work with the Water shader.
Important:Does not work with the Water shader.Refract Can be used as a workaround for dynamic refraction, although Valve does not provide any materials which do this.
Existing materials which are compatible include:
 - nature/water_movingplane.vmt(LightmappedGeneric)
 - nature/water_dx70.vmt(LightmappedGeneric)
 - nature/hazard_liquid.vmt(LightmappedGeneric) (only in ) )
 - liquids/!greenslime.vmt(UnlitTwoTexture) (only in     ) )
 Confirm:Does the Water shader work if using cubemap reflections and refractions, instead of the real-time versions? This would still be beneficial for the ability to have two normal maps scrolling in different directions.
 Confirm:Does the Water shader work if using cubemap reflections and refractions, instead of the real-time versions? This would still be beneficial for the ability to have two normal maps scrolling in different directions. Bug:If this entity uses multiple brushes - VPhysics objects works incorrectly with this entity (the same for func_water) in
Bug:If this entity uses multiple brushes - VPhysics objects works incorrectly with this entity (the same for func_water) in  Black Mesa. It looks like they are using this entity's BBox to calculate physics, instead of using brushes. This issue can be found in Interloper chapter. Separate water into several separate entities to avoid this bug.
 Black Mesa. It looks like they are using this entity's BBox to calculate physics, instead of using brushes. This issue can be found in Interloper chapter. Separate water into several separate entities to avoid this bug.
 )
) Bug:This entity always has its contents set to CONTENTS_WATER (regardless of brush contents), with no way of setting its contents to CONTENTS_SLIME. In most games, this will only affect splash particles.
Bug:This entity always has its contents set to CONTENTS_WATER (regardless of brush contents), with no way of setting its contents to CONTENTS_SLIME. In most games, this will only affect splash particles.
 Code Fix:Add a KV that is read by
Code Fix:Add a KV that is read by CMoveFuncLinear::CreateVPhysics to set fluid.contents (defaulting to CONTENTS_WATER if KV is absent) Note:The
Note:The SetPosition input and Start Position keyvalue do not perform any bounds checking, so values less than 0 and greater than 1 can be used. Negative values will move in the opposite direction to the movement direction, and values greater than 1 will move it in multiples of the set Move Distance. Moving past the opened/closed position does not trigger the OnFullyOpen and OnFullyClosed outputs. Bug:There are bugs that may arise when parenting this entity to any of these: func_movelinear, func_lookdoor, func_water_analog. A func_door (or for func_water_analog, func_water) can be used as a workaround. (see here for a code fix)[
Bug:There are bugs that may arise when parenting this entity to any of these: func_movelinear, func_lookdoor, func_water_analog. A func_door (or for func_water_analog, func_water) can be used as a workaround. (see here for a code fix)[ Code Fix]
 Code Fix]
 Confirm:Might be fixed in Portal 2? Parented movelinears are used extensively for this game's piston platforms.
 Confirm:Might be fixed in Portal 2? Parented movelinears are used extensively for this game's piston platforms. Code:Both
Code:Both func_water_analog and func_movelinear are linked to CFuncMoveLinear C++ class. The game code checks the classname KV to distinguish between them.Keyvalues
- Water Material (WaterMaterial)  <material> (only in  ) )
- The material to derive water information from. Determines $underwateroverlay that use func_water_analog.
 Bug:Don't work after reload. You still can repeat this effect with trigger and env_screenoverlay  [todo tested in ?] Bug:Don't work after reload. You still can repeat this effect with trigger and env_screenoverlay  [todo tested in ?]
- Wave Height (WaveHeight)  <string> (only in  ) )
 Note:Other
Note:Other Keyvalues / Inputs / Outputs are same as func_movelinear.


























