http:^^www.tc.cornell.edu:80^dx^dxtips^shadow.html
来自「This data set contains WWW-pages collect」· HTML 代码 · 共 112 行
HTML
112 行
Date: Sun, 24 Nov 1996 23:08:52 GMTServer: NCSA/1.5Content-type: text/htmlLast-modified: Wed, 03 Jul 1996 20:04:20 GMTContent-length: 3635<html><head><TITLE>Shadow Tip</TITLE> </head><body><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><img src="http://www.tc.cornell.edu:80/DX/DXTIPS/shadow.image.gif"><p><h2>Making Shadows.</h2><p><hr><p>Shadows are powerful perceptual cues for the 3D relationship of objectsin a scene. The DX renderer does not produce shadows, but is possibleto generate acceptable shadows by modifying the colors of individualvertices of objects in a scene. The macro described here performs thefollowing steps:<ul><li> The obects to be shadowed are transformed to the coordinate systemof a light places in an arbitrary direction at infinity.<li> A depth buffer is calculated from the viewpoint of the light.<li> The depth buffer is turned into a "volume" data set by stacking itwith itself in such a way that it overlaps all the vertices in theoriginal objects.<li> The volume depth buffer is mapped onto the original vertices as new data.<li> The depth buffer value at each vertex is compared to the depth atof the vertex. If the vertex is farther from the light than the valuegiven by the depth buffer, it is dimmed.<li> The objects (with modified colors) are transformed back to world coordinates.</ul>This approach (a sort of vertex-mapped, z-buffer method) has some limitations:<ul><li> The accuracy of the shadows depends on the density of vertices onan object. Objects with just a few vertices will have "jaggie" shadows thrown onto them. <li> The resolution of the depth buffer must be high to get acceptable shadows.<li> The Compute module cannot resolve transform objects. Any objectsbuilt using Rotate, Translate, Scale, or Transform modules will notshadow correctly, unless you use the <!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><a href="http://www.tc.cornell.edu:80/DX/DXTIPS/calculate.html"> Calculate </a>macro to apply the transforms.<li> The module uses a <b> lot </b> of memory. It runs well on a machine with.5 Gbyte of memory.</ul><p>The macro dialog box is shown below. <br>Explaination of inputs:<ol><li> The object input carries the objects to be shadowed against each other.<li> The depth_resolution input is the resolution of the desired depth-buffer.<li> The shadow_factor is the amount to "dim" a shadowed vertex.<li> The light_pos is the direction to the light at infinity.<li> The depth_ingore input is the threshold for self-shadowing. Set tozero, it will cause surfaces to "dim" themselves.<li> The object_scale input overrides the automatic conversion of the objectsize to camera coordinate space.<li> The offset input allows the objects to move along the z-axis of the light.</ol><p><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><img src="http://www.tc.cornell.edu:80/DX/DXTIPS/shadow.module.dialog.gif"><p>To download the test program click <!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><a href="http://www.tc.cornell.edu:80/DX/DXTIPS/shadow.net">here. </a>. You also need it's configuration file <!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><a href="http://www.tc.cornell.edu:80/DX/DXTIPS/shadow.cfg"> from here.</a><p>The test program layout is shown <!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><a href="http://www.tc.cornell.edu:80/DX/DXTIPS/shadow.net.gif"> here. </a><p>An example output from the program is shown below.<p><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><img src="http://www.tc.cornell.edu:80/DX/DXTIPS/shadow.net.output.gif"><p>To download the macro click<!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><!WA7><a href="http://www.tc.cornell.edu:80/DX/DXTIPS/shadow.macro.net">here. </a><p>Another example is shown below. A protein ribbon representation is castingshadows on itself and on two planes.<p><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><!WA8><img src="http://www.tc.cornell.edu/~bruce/gifs/ShadowProtein.gif"><hr>See also:<ul><li><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><!WA9><ahref="http://www.tc.cornell.edu/ctc.html">Cornell Theory Center</a><li><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><!WA10><ahref="http://www.tc.cornell.edu/Visualization/animations/animations.html">Examples of visualization work from CTC</a><li><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><!WA11><ahref="http://www.tc.cornell.edu/Visualization/contrib/cs418-sp94/cs418.html">CS418 final projects (spring 1994)</a><hr><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><!WA12><IMG ALT="" SRC="http://www.tc.cornell.edu:80/Icons/ctc.logo.sm.gif"><i>Cornell Theory Center. (Last updated November 7, 1994 by <!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><!WA13><ahref="http://www.tc.cornell.edu/~bruce/">Bruce Land)</i></a>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?