// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // // // Creation Date: 2002 // // Description: Create a pond, or fluid with a water surface simulation // proc string createWaterSurfaceFluid( float $pondSize ) { create2DFluid 100 100 $pondSize $pondSize ($pondSize*.15); string $fSel[] = `ls -sl -dag`; string $fluid = $fSel[0]; rename $fluid "Pond#"; $fSel = `ls -sl -dag`; $fluid = $fSel[0]; string $fluidShape = $fSel[1]; setAttr ($fluid + ".rx") -90; setAttr ($fluid + ".solver") 2; setAttr ($fluid + ".boundaryDraw") 4; setAttr ($fluid + ".heightField") 1; setAttr ($fluid + ".densityScale") 1.0; setAttr ($fluid + ".edgeDropoff") 0.008; setAttr ($fluid + ".velocityDamp") 0.02; setAttr ($fluid + ".transparency") -type double3 0 0 0; setAttr ($fluid + ".specularColor") -type double3 0.95868 0.95868 0.95868; setAttr ($fluid + ".surfaceRender") 1; setAttr ($fluid + ".colorInput") 6; setAttr ($fluid + ".incandescenceInput") 5; setAttr ($fluid + ".incandescence[0].incandescence_Position") 0.3; setAttr ($fluid + ".incandescence[1].incandescence_Color") -type double3 0.061628 0.199391 0.217; setAttr ($fluid + ".incandescence[1].incandescence_Position") 0.5; setAttr ($fluid + ".incandescence[1].incandescence_Interp") 1; setAttr ($fluid + ".incandescence[2].incandescence_Color") -type double3 0.249288 0.408 0.342373; setAttr ($fluid + ".incandescence[2].incandescence_Position") 1.0; setAttr ($fluid + ".incandescence[2].incandescence_Interp") 1; setAttr ($fluid + ".color[0].color_Color") -type double3 0.089646 0.189544 0.446; setAttr ($fluid + ".color[1].color_Color") -type double3 0.630252 0.732 0.685213; setAttr ($fluid + ".color[1].color_Position") 0.5; setAttr ($fluid + ".color[1].color_Interp") 1; setAttr ($fluid + ".color[2].color_Color") -type double3 1.0 1.0 1.0; setAttr ($fluid + ".color[2].color_Position") 1.0; setAttr ($fluid + ".color[2].color_Interp") 1; setAttr ($fluid + ".environment[0].environment_Color") -type double3 0.042744 0.108427 0.548; setAttr ($fluid + ".environment[1].environment_Color") -type double3 0.08708 0.156017 0.28; setAttr ($fluid + ".environment[1].environment_Position") 0.45; setAttr ($fluid + ".environment[1].environment_Interp") 1; setAttr ($fluid + ".environment[2].environment_Color") -type double3 0.7905 0.93 0.871433; setAttr ($fluid + ".environment[2].environment_Position") 0.6; setAttr ($fluid + ".environment[2].environment_Interp") 1; setAttr ($fluid + ".environment[3].environment_Color") -type double3 0.140119 0.215084 0.541; setAttr ($fluid + ".environment[3].environment_Position") 1.0; setAttr ($fluid + ".environment[3].environment_Interp") 1; return( $fluidShape ); } global proc createPond( float $pondSize ) { string $shape = createWaterSurfaceFluid( $pondSize ); string $shapeHelp = ("This 2D fluid uses a spring mesh height model to" +" model a water surface. One can generate wakes into it by using fluid" +" emitters. Negative density emission will push the surface down" +" while positive values will push the surface up. This surface" +" renders as a raytraced volumetric surface. Waves that are larger" +" than the vertical fluid bounds will be clipped. The size parameter" +" can be increased to provide a larger range of travel, although the" +" volume rendering may be a bit slower."); addAttr -sn nts -ln notes -dt "string" $shape; setAttr -type "string" ($shape + ".notes") $shapeHelp; }