more rc5 stuff

This commit is contained in:
Bitl 2019-10-06 17:54:00 -07:00
parent 08464fcb00
commit 0754069147
335 changed files with 7737 additions and 19 deletions

View File

@ -479,18 +479,18 @@
<Ref name="CameraSubject">null</Ref>
<token name="CameraType">0</token>
<CoordinateFrame name="CoordinateFrame">
<X>32.7148514</X>
<Y>18.5118027</Y>
<Z>-4.19532967</Z>
<R00>-0.204456434</R00>
<R01>-0.188451588</R01>
<R02>0.960564196</R02>
<R10>-3.72529074e-009</R10>
<R11>0.98129344</R11>
<R12>0.192518398</R12>
<R20>-0.978875756</R20>
<R21>0.0393616222</R21>
<R22>-0.200631723</R22>
<X>32.0155182</X>
<Y>22.2181473</Y>
<Z>-0.634367526</Z>
<R00>-0.0243906938</R00>
<R01>-0.377724022</R01>
<R02>0.925596893</R02>
<R10>9.31322575e-010</R10>
<R11>0.925872326</R11>
<R12>0.377836436</R12>
<R20>-0.999702513</R20>
<R21>0.00921569392</R21>
<R22>-0.0225826669</R22>
</CoordinateFrame>
<CoordinateFrame name="Focus">
<X>13.5036697</X>

View File

@ -1,3 +0,0 @@
--Load Script
dofile('rbxasset://scripts/CSMPFunctions.lua')
_G.CSConnect(497140,'localhost',53640,'Pawn','RedTopHat.rbxm','shades.rbxm','headphones.rbxm',21,21,21,199,21,199,'ExpensiveRedSuit.rbxm','NoShirt.rbxm','NoPants.rbxm','CatFace.rbxm','DefaultHead.rbxm','NBC','NoExtra.rbxm','5201392587E978ED65857A18084F8FC7','94E19CC8287FDE83A8E38F2486EACD0A','18242630E57B5431BD81249FDC019939')

View File

@ -1,3 +0,0 @@
--Load Script
dofile('rbxasset://scripts/CSMPFunctions.lua')
_G.CSConnect(30726,'localhost',53640,'Pawn','TeapotTurret.rbxm','shades.rbxm','headphones.rbxm',21,21,21,199,21,199,'ExpensiveRedSuit.rbxm','NoShirt.rbxm','NoPants.rbxm','CatFace.rbxm','DefaultHead.rbxm','NBC','VoidStar.rbxm','6A1515F3812BBD4D0BC95C471BE3233E','94E19CC8287FDE83A8E38F2486EACD0A','5EFFD5A6E1DC1726815A817210775BDF')

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
version 1.01
6
[678,280,0][0,0,1][0.668471,0.42008,0.5][762,280,0][0,0,1][0.751228,0.42008,0.5][762,364,0][0,0,1][0.751228,0.62987,0.5][678,280,0][0,0,1][0.668471,0.42008,0.5][762,364,0][0,0,1][0.751228,0.62987,0.5][678,364,0][0,0,1][0.668471,0.62987,0.5][168,364,0][0,0,1][0.166015,0.62987,0.5][444,364,0][0,0,1][0.437932,0.62987,0.5][444,512,0][0,0,1][0.437932,0.9995,0.5][168,364,0][0,0,1][0.166015,0.62987,0.5][444,512,0][0,0,1][0.437932,0.9995,0.5][168,512,0][0,0,1][0.166015,0.9995,0.5][846,280,0][0,0,1][0.833985,0.42008,0.5][930,280,0][0,0,1][0.916743,0.42008,0.5][930,364,0][0,0,1][0.916743,0.62987,0.5][846,280,0][0,0,1][0.833985,0.42008,0.5][930,364,0][0,0,1][0.916743,0.62987,0.5][846,364,0][0,0,1][0.833986,0.62987,0.5]

View File

@ -0,0 +1,3 @@
version 1.01
6
[846,196,0][0,0,1][0.833985,0.21029,0.5][930,196,0][0,0,1][0.916743,0.21029,0.5][930,280,0][0,0,1][0.916743,0.42008,0.5][846,196,0][0,0,1][0.833985,0.21029,0.5][930,280,0][0,0,1][0.916743,0.42008,0.5][846,280,0][0,0,1][0.833985,0.42008,0.5][846,112,0][0,0,1][0.833985,0.000499666,0.5][930,112,0][0,0,1][0.916743,0.000499606,0.5][930,196,0][0,0,1][0.916743,0.21029,0.5][846,112,0][0,0,1][0.833985,0.000499666,0.5][930,196,0][0,0,1][0.916743,0.21029,0.5][846,196,0][0,0,1][0.833985,0.21029,0.5][720,364,0][0,0,1][0.709849,0.62987,0.5][996,364,0][0,0,1][0.981767,0.62987,0.5][996,512,0][0,0,1][0.981767,0.9995,0.5][720,364,0][0,0,1][0.709849,0.62987,0.5][996,512,0][0,0,1][0.981767,0.9995,0.5][720,512,0][0,0,1][0.709849,0.9995,0.5]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
version 1.01
6
[444,364,0][0,0,1][0.437932,0.62987,0.5][720,364,0][0,0,1][0.709849,0.62987,0.5][720,512,0][0,0,1][0.709849,0.9995,0.5][444,364,0][0,0,1][0.437932,0.62987,0.5][720,512,0][0,0,1][0.709849,0.9995,0.5][444,512,0][0,0,1][0.437932,0.9995,0.5][762,280,0][0,0,1][0.751228,0.42008,0.5][846,280,0][0,0,1][0.833985,0.42008,0.5][846,364,0][0,0,1][0.833985,0.62987,0.5][762,280,0][0,0,1][0.751228,0.42008,0.5][846,364,0][0,0,1][0.833985,0.62987,0.5][762,364,0][0,0,1][0.751228,0.62987,0.5][930,280,0][0,0,1][0.916743,0.42008,0.5][1014,280,0][0,0,1][0.9995,0.42008,0.5][1014,364,0][0,0,1][0.9995,0.62987,0.5][930,280,0][0,0,1][0.916743,0.42008,0.5][1014,364,0][0,0,1][0.9995,0.62987,0.5][930,364,0][0,0,1][0.916743,0.62987,0.5]

View File

@ -0,0 +1,3 @@
version 1.01
6
[402,216,0][0,0,1][0.396553,0.26024,0.5][678,216,0][0,0,1][0.668471,0.26024,0.5][678,364,0][0,0,1][0.668471,0.62987,0.5][402,216,0][0,0,1][0.396553,0.26024,0.5][678,364,0][0,0,1][0.668471,0.62987,0.5][402,364,0][0,0,1][0.396553,0.62987,0.5][930,196,0][0,0,1][0.916743,0.21029,0.5][1014,196,0][0,0,1][0.9995,0.21029,0.5][1014,280,0][0,0,1][0.9995,0.42008,0.5][930,196,0][0,0,1][0.916743,0.21029,0.5][1014,280,0][0,0,1][0.9995,0.42008,0.5][930,280,0][0,0,1][0.916743,0.42008,0.5][930,112,0][0,0,1][0.916743,0.000499606,0.5][1014,112,0][0,0,1][0.9995,0.000499576,0.5][1014,196,0][0,0,1][0.9995,0.21029,0.5][930,112,0][0,0,1][0.916743,0.000499606,0.5][1014,196,0][0,0,1][0.9995,0.21029,0.5][930,196,0][0,0,1][0.916743,0.21029,0.5]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
version 1.01
2
[74,226,3][0,0,1][0,0,0.5][202,226,3][0,0,1][1,0,0.5][202,354,3][0,0,1][1,1,0.5][74,354,3][0,0,1][0,1,0.5][74,226,3][0,0,1][0,0,0.5][202,354,3][0,0,1][1,1,0.5]

View File

@ -0,0 +1,3 @@
version 1.01
4
[0,364,0][0,0,1][0.000499636,0.62987,0.5][168,364,0][0,0,1][0.166015,0.62987,0.5][168,512,0][0,0,1][0.166015,0.9995,0.5][0,364,0][0,0,1][0.000499636,0.62987,0.5][168,512,0][0,0,1][0.166015,0.9995,0.5][0,512,0][0,0,1][0.000499666,0.9995,0.5][0,216,0][0,0,1][0.000499606,0.26024,0.5][404,216,0][0,0,1][0.398524,0.26024,0.5][404,364,0][0,0,1][0.398524,0.62987,0.5][0,216,0][0,0,1][0.000499606,0.26024,0.5][404,364,0][0,0,1][0.398524,0.62987,0.5][0,364,0][0,0,1][0.000499636,0.62987,0.5]

View File

@ -0,0 +1,867 @@
<LDraw2RobloxMap xmlns="http://www.roblox.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.roblox.com LDraw2RobloxMap.xsd">
<schema_version>0.1</schema_version>
<color_map>
<color>
<ldraw_code>8</ldraw_code>
<roblox_code>27</roblox_code>
</color>
<color>
<ldraw_code>7</ldraw_code>
<roblox_code>2</roblox_code>
</color>
<color>
<ldraw_code>503</ldraw_code>
<roblox_code>103</roblox_code>
</color>
<color>
<ldraw_code>72</ldraw_code>
<roblox_code>199</roblox_code>
</color>
<color>
<ldraw_code>71</ldraw_code>
<roblox_code>194</roblox_code>
</color>
<color>
<ldraw_code>320</ldraw_code>
<roblox_code>154</roblox_code>
</color>
<color>
<ldraw_code>4</ldraw_code>
<roblox_code>21</roblox_code>
</color>
<color>
<ldraw_code>12</ldraw_code>
<roblox_code>101</roblox_code>
</color>
<color>
<ldraw_code>335</ldraw_code>
<roblox_code>153</roblox_code>
</color>
<color>
<ldraw_code>6</ldraw_code>
<roblox_code>25</roblox_code>
</color>
<color>
<ldraw_code>70</ldraw_code>
<roblox_code>192</roblox_code>
</color>
<color>
<ldraw_code>28</ldraw_code>
<roblox_code>138</roblox_code>
</color>
<color>
<ldraw_code>19</ldraw_code>
<roblox_code>5</roblox_code>
</color>
<color>
<ldraw_code>484</ldraw_code>
<roblox_code>38</roblox_code>
</color>
<color>
<ldraw_code>25</ldraw_code>
<roblox_code>106</roblox_code>
</color>
<color>
<ldraw_code>366</ldraw_code>
<roblox_code>12</roblox_code>
</color>
<color>
<ldraw_code>462</ldraw_code>
<roblox_code>105</roblox_code>
</color>
<color>
<ldraw_code>14</ldraw_code>
<roblox_code>24</roblox_code>
</color>
<color>
<ldraw_code>18</ldraw_code>
<roblox_code>3</roblox_code>
</color>
<color>
<ldraw_code>27</ldraw_code>
<roblox_code>119</roblox_code>
</color>
<color>
<ldraw_code>288</ldraw_code>
<roblox_code>141</roblox_code>
</color>
<color>
<ldraw_code>2</ldraw_code>
<roblox_code>28</roblox_code>
</color>
<color>
<ldraw_code>17</ldraw_code>
<roblox_code>6</roblox_code>
</color>
<color>
<ldraw_code>10</ldraw_code>
<roblox_code>37</roblox_code>
</color>
<color>
<ldraw_code>378</ldraw_code>
<roblox_code>151</roblox_code>
</color>
<color>
<ldraw_code>3</ldraw_code>
<roblox_code>107</roblox_code>
</color>
<color>
<ldraw_code>11</ldraw_code>
<roblox_code>116</roblox_code>
</color>
<color>
<ldraw_code>272</ldraw_code>
<roblox_code>140</roblox_code>
</color>
<color>
<ldraw_code>1</ldraw_code>
<roblox_code>23</roblox_code>
</color>
<color>
<ldraw_code>9</ldraw_code>
<roblox_code>45</roblox_code>
</color>
<color>
<ldraw_code>379</ldraw_code>
<roblox_code>135</roblox_code>
</color>
<color>
<ldraw_code>23</ldraw_code>
<roblox_code>110</roblox_code>
</color>
<color>
<ldraw_code>20</ldraw_code>
<roblox_code>39</roblox_code>
</color>
<color>
<ldraw_code>22</ldraw_code>
<roblox_code>104</roblox_code>
</color>
<color>
<ldraw_code>26</ldraw_code>
<roblox_code>124</roblox_code>
</color>
<color>
<ldraw_code>373</ldraw_code>
<roblox_code>136</roblox_code>
</color>
<color>
<ldraw_code>5</ldraw_code>
<roblox_code>22</roblox_code>
</color>
<color>
<ldraw_code>13</ldraw_code>
<roblox_code>9</roblox_code>
</color>
<color>
<ldraw_code>0</ldraw_code>
<roblox_code>26</roblox_code>
</color>
<color>
<ldraw_code>15</ldraw_code>
<roblox_code>1</roblox_code>
</color>
<color>
<ldraw_code>21</ldraw_code>
<roblox_code>50</roblox_code>
</color>
<color>
<ldraw_code>36</ldraw_code>
<roblox_code>41</roblox_code>
</color>
<color>
<ldraw_code>57</ldraw_code>
<roblox_code>47</roblox_code>
</color>
<color>
<ldraw_code>46</ldraw_code>
<roblox_code>44</roblox_code>
</color>
<color>
<ldraw_code>34</ldraw_code>
<roblox_code>48</roblox_code>
</color>
<color>
<ldraw_code>42</ldraw_code>
<roblox_code>49</roblox_code>
</color>
<color>
<ldraw_code>33</ldraw_code>
<roblox_code>43</roblox_code>
</color>
<color>
<ldraw_code>41</ldraw_code>
<roblox_code>42</roblox_code>
</color>
<color>
<ldraw_code>37</ldraw_code>
<roblox_code>126</roblox_code>
</color>
<color>
<ldraw_code>45</ldraw_code>
<roblox_code>113</roblox_code>
</color>
<color>
<ldraw_code>40</ldraw_code>
<roblox_code>111</roblox_code>
</color>
<color>
<ldraw_code>47</ldraw_code>
<roblox_code>40</roblox_code>
</color>
<color>
<ldraw_code>135</ldraw_code>
<roblox_code>150</roblox_code>
</color>
</color_map>
<part_map>
<part>
<name>31</name>
<description>Window 1Z x 3X x 2Y</description>
<ldraw_filename>31.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,2,1</size_vect3>
<y_offset>1.2</y_offset>
</roblox_part>
</part>
<part>
<name>645</name>
<description>Window 1Z x 6X x 2Y</description>
<ldraw_filename>645.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>6,2,1</size_vect3>
<y_offset>1.2</y_offset>
</roblox_part>
</part>
<part>
<name>2345</name>
<description>Panel Wall 3Z x 3X x 6Y Corner </description>
<ldraw_filename>2345.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,6,3</size_vect3>
<y_offset>3.6</y_offset>
</roblox_part>
</part>
<part>
<name>2453</name>
<description>Brick 1Z x 1X x 5Y</description>
<ldraw_filename>2453.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>1,5,1</size_vect3>
<y_offset>3.0</y_offset>
</roblox_part>
</part>
<part>
<name>2454</name>
<description>Brick 1Z x 2X x 5Y with Inside Axelholder</description>
<ldraw_filename>2454.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,5,1</size_vect3>
<y_offset>3.0</y_offset>
</roblox_part>
</part>
<part>
<name>2456</name>
<description>Brick 2Z x 6X</description>
<ldraw_filename>2456.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>6,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3001</name>
<description>Brick 2Z x 4X</description>
<ldraw_filename>3001.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>4,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3002</name>
<description>Brick 2Z x 3X</description>
<ldraw_filename>3002.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3003</name>
<description>Brick 2Z x 2X</description>
<ldraw_filename>3003.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3004</name>
<description>Brick 1Z x 2X</description>
<ldraw_filename>3004.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3005</name>
<description>Brick 1Z x 1X</description>
<ldraw_filename>3005.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>1,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3006</name>
<description>Brick 2Z x 10X</description>
<ldraw_filename>3006.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>10,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3008</name>
<description>Brick 2Z x 8X</description>
<ldraw_filename>3008.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>8,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3010</name>
<description>Brick 1Z x 4X</description>
<ldraw_filename>3010.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>4,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3037</name>
<description>Slope Brick 45 2Z x 4X</description>
<ldraw_filename>3037.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>4,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3038</name>
<description>Slope Brick 45 2Z x 3X</description>
<ldraw_filename>3038.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,3</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3039</name>
<description>Slope Brick 45 2Z x 2X</description>
<ldraw_filename>3039.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3040B</name>
<description>Slope Brick 45 2Z x 1X</description>
<ldraw_filename>3040B.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>1,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3043</name>
<description>Slope Brick 45 2Z x 2X</description>
<ldraw_filename>3043.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3046</name>
<description>Slope Brick 45 2Z x 2X Double Concave</description>
<ldraw_filename>3046.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3245B</name>
<description>Brick 1Z x 2X x 2Y with Inside Axelholder</description>
<ldraw_filename>3245B.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3455</name>
<description>Arch 1Z x 6X</description>
<ldraw_filename>3455.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>6,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3579</name>
<description>Door 1Z x 3X x 4Y Frame</description>
<ldraw_filename>3579.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,4,1</size_vect3>
<y_offset>2.4</y_offset>
</roblox_part>
</part>
<part>
<name>3581</name>
<description>Brick 1Z x 1X x 2Y with Shutter Hole</description>
<ldraw_filename>3581.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>1,2,1</size_vect3>
<y_offset>1.2</y_offset>
</roblox_part>
</part>
<part>
<name>3622</name>
<description>Brick 1Z x 3X</description>
<ldraw_filename>3622.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3660</name>
<description>Slope Brick 45 2Z x 2X Inverted</description>
<ldraw_filename>3660.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,2</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>3700</name>
<description>Technic Brick 1Z x 2X with Hole</description>
<ldraw_filename>3700.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>4070</name>
<description>Brick 1Z x 1X with Headlight</description>
<ldraw_filename>4070.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>1,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>4444</name>
<description>Panel 2Z x 5X x 6Y Wall</description>
<ldraw_filename>4444.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,6,2</size_vect3>
<y_offset>3.6</y_offset>
</roblox_part>
</part>
<part>
<name>4444P01</name>
<description>Panel 2Z x 5X x 6Y Wall with Dark Gray Stones Pattern</description>
<ldraw_filename>4444P01.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,6,2</size_vect3>
<y_offset>3.6</y_offset>
</roblox_part>
</part>
<part>
<name>4490</name>
<description>Arch 1Z x 3X</description>
<ldraw_filename>4490.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,1,1</size_vect3>
<y_offset>0.6</y_offset>
</roblox_part>
</part>
<part>
<name>7930C01</name>
<description>Door 1Z x 3X x 4Y with Glass (Complete)</description>
<ldraw_filename>7930C01.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>3,4,1</size_vect3>
<y_offset>2.4</y_offset>
</roblox_part>
</part>
<part>
<name>7026</name>
<description>Window 1Z x 2X x 2X</description>
<ldraw_filename>7026.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,2,1</size_vect3>
<y_offset>1.2</y_offset>
</roblox_part>
</part>
<part>
<name>30374</name>
<description>Bar 4L Light Sabre Blade</description>
<ldraw_filename>30374.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>brick</form_factor>
<size_vect3>2,2,1</size_vect3>
<y_offset>1.2</y_offset>
</roblox_part>
</part>
<part>
<name>3020</name>
<description>Plate 2Z x 4X</description>
<ldraw_filename>3020.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>4,1,2 </size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3021</name>
<description>Plate 2Z x 3X</description>
<ldraw_filename>3021.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>3,1,2</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3022</name>
<description>Plate 2Z x 2X</description>
<ldraw_filename>3022.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>2,1,2</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3023</name>
<description>Plate 1Z x 2X</description>
<ldraw_filename>3023.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>2,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3024</name>
<description>Plate 1Z x 1X</description>
<ldraw_filename>3024.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>1,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3031</name>
<description>Plate 4Z x 4X</description>
<ldraw_filename>3031.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>4,1,4</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3032</name>
<description>Plate 4Z x 6X</description>
<ldraw_filename>3032.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>6,1,4</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3033</name>
<description>6Z x 10X</description>
<ldraw_filename>3033.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>10,1,6</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3034</name>
<description>Plate 2Z x 8X</description>
<ldraw_filename>3034.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>8,1,2</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3035</name>
<description>4Z x 8X</description>
<ldraw_filename>3035.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>8,1,4</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3036</name>
<description>Plate 6Z x 8X</description>
<ldraw_filename>3036.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>8,1,6</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3070B</name>
<description>Tile 1Z x 1X with Groove</description>
<ldraw_filename>3070B.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>1,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3623</name>
<description>Plate 1Z x 3X</description>
<ldraw_filename>3623.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>3,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3666</name>
<description>Plate 1Z x 6X</description>
<ldraw_filename>3666.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>6,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3710</name>
<description>Plate 1Z x 4X </description>
<ldraw_filename>3710.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>4,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3794</name>
<description>Plate 1Z x 2X with 1 Stud</description>
<ldraw_filename>3794.dat</ldraw_filename>
<mapping_fidelity>close</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>2,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3795</name>
<description>Plate 2Z x 6X</description>
<ldraw_filename>3795.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>6,1,2</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3857</name>
<description>BasePlate 16Z x 32X with Square Corners</description>
<ldraw_filename>3857.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>32,1,16</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>3867</name>
<description>Plate 16Z x 16X</description>
<ldraw_filename>3867.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>16,1,16</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
<part>
<name>4477</name>
<description>Plate 1Z x 10X</description>
<ldraw_filename>4477.dat</ldraw_filename>
<mapping_fidelity>exact</mapping_fidelity>
<roblox_part>
<shape>block</shape>
<form_factor>plate</form_factor>
<size_vect3>10,1,1</size_vect3>
<y_offset>0.2</y_offset>
</roblox_part>
</part>
</part_map>
</LDraw2RobloxMap>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,102 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Part" referent="RBX0">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">3</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">3</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">23</int>
<CoordinateFrame name="CFrame">
<X>-0.5</X>
<Y>0.5</Y>
<Z>0</Z>
<R00>-1.1920929e-007</R00>
<R01>1.00000012</R01>
<R02>0</R02>
<R10>1.00000012</R10>
<R11>-1.1920929e-007</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>-1.00000024</R22>
</CoordinateFrame>
<bool name="CanCollide">true</bool>
<bool name="CastsShadows">true</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="Cullable">true</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">3</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">3</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">false</bool>
<string name="Name">Rocket</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">3</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<token name="shape">1</token>
<Vector3 name="size">
<X>1</X>
<Y>1</Y>
<Z>4</Z>
</Vector3>
</Properties>
<Item class="Sound">
<Properties>
<bool name="Looped">true</bool>
<string name="Name">Swoosh</string>
<int name="PlayCount">0</int>
<bool name="PlayOnRemove">false</bool>
<Content name="SoundId"><url>rbxasset://sounds\Rocket whoosh 01.wav</url></Content>
<float name="Volume">0.699999988</float>
</Properties>
</Item>
<Item class="Sound">
<Properties>
<bool name="Looped">false</bool>
<string name="Name">Explosion</string>
<int name="PlayCount">0</int>
<bool name="PlayOnRemove">true</bool>
<Content name="SoundId"><url>rbxasset://sounds\collide.wav</url></Content>
<float name="Volume">1</float>
</Properties>
</Item>
<Item class="Script">
<Properties>
<string name="Name">Script</string>
<string name="Source">r = game:service(&quot;RunService&quot;)&#13;&#10;&#13;&#10;shaft = script.Parent&#13;&#10;position = Vector3.new(0,0,0)&#13;&#10;&#13;&#10;function fly()&#13;&#10;&#9;direction = shaft.CFrame.lookVector&#13;&#10;&#9;position = position + direction&#13;&#10;&#9;error = position - shaft.Position&#13;&#10;&#9;shaft.Velocity = 7*error&#13;&#10;end&#13;&#10;&#13;&#10;function blow()&#13;&#10;&#9;swoosh:Stop()&#13;&#10;&#9;explosion = Instance.new(&quot;Explosion&quot;)&#13;&#10;&#9;explosion.Position = shaft.Position&#13;&#10;&#9;explosion.Parent = game.Workspace&#13;&#10;&#9;connection:disconnect()&#13;&#10;&#9;shaft:remove()&#13;&#10;end&#13;&#10;&#13;&#10;t, s = r.Stepped:wait()&#13;&#10;&#13;&#10;swoosh = script.Parent.Swoosh&#13;&#10;swoosh:Play()&#13;&#10;&#13;&#10;position = shaft.Position&#13;&#10;d = t + 10.0 - s&#13;&#10;connection = shaft.Touched:connect(blow)&#13;&#10;&#13;&#10;while t &lt; d do&#13;&#10;&#9;fly()&#13;&#10;&#9;t = r.Stepped:wait()&#13;&#10;end&#13;&#10;&#13;&#10;script.Parent.Explosion.PlayOnRemove = false&#13;&#10;swoosh:Stop()&#13;&#10;shaft:remove()&#13;&#10;</string>
</Properties>
</Item>
</Item>
</roblox>

View File

@ -0,0 +1,82 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Part" referent="RBX0">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">4</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">194</int>
<CoordinateFrame name="CFrame">
<X>0</X>
<Y>6.4000001</Y>
<Z>-8</Z>
<R00>1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>1</R22>
</CoordinateFrame>
<bool name="CanCollide">true</bool>
<bool name="CastsShadows">true</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="Cullable">true</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">0</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">false</bool>
<string name="Name">Pellet</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">0</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<token name="shape">0</token>
<Vector3 name="size">
<X>2</X>
<Y>2</Y>
<Z>2</Z>
</Vector3>
</Properties>
<Item class="Script">
<Properties>
<string name="Name">Script</string>
<string name="Source">&#13;&#10;pellet = script.Parent&#13;&#10;damage = 8&#13;&#10;&#13;&#10;function onTouched(hit)&#13;&#10;&#9;humanoid = hit.Parent:findFirstChild(&quot;Humanoid&quot;)&#13;&#10;&#9;if humanoid~=nil then&#13;&#10;&#9;&#9;humanoid.Health = humanoid.Health - damage&#13;&#10;&#9;&#9;connection:disconnect()&#13;&#10;&#9;else&#13;&#10;&#9;&#9;damage = damage / 2&#13;&#10;&#9;&#9;if damage &lt; 0.1 then&#13;&#10;&#9;&#9;&#9;connection:disconnect()&#13;&#10;&#9;&#9;end&#13;&#10;&#9;end&#13;&#10;end&#13;&#10;&#13;&#10;connection = pellet.Touched:connect(onTouched)&#13;&#10;&#13;&#10;r = game:service(&quot;RunService&quot;)&#13;&#10;t, s = r.Stepped:wait()&#13;&#10;d = t + 1.0 - s&#13;&#10;while t &lt; d do&#13;&#10;&#9;t = r.Stepped:wait()&#13;&#10;end&#13;&#10;&#13;&#10;pellet.Parent = nil</string>
</Properties>
</Item>
</Item>
</roblox>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,528 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Model" referent="RBX0">
<Properties>
<token name="Controller">7</token>
<bool name="ControllerFlagShown">true</bool>
<CoordinateFrame name="ModelInPrimary">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
<R00>1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>1</R22>
</CoordinateFrame>
<string name="Name">erik.cassel</string>
<Ref name="PrimaryPart">RBX1</Ref>
<bool name="archivable">true</bool>
</Properties>
<Item class="Part" referent="RBX1">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">4</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">24</int>
<CoordinateFrame name="CFrame">
<X>0</X>
<Y>4.5</Y>
<Z>25.5</Z>
<R00>-1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>-1</R22>
</CoordinateFrame>
<bool name="CanCollide">true</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="DraggingV1">false</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">0</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">true</bool>
<string name="Name">Head</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">0</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">0</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<bool name="archivable">true</bool>
<token name="shape">1</token>
<Vector3 name="size">
<X>2</X>
<Y>1</Y>
<Z>1</Z>
</Vector3>
</Properties>
<Item class="SpecialMesh" referent="RBX2">
<Properties>
<Content name="MeshId"><null></null></Content>
<token name="MeshType">0</token>
<string name="Name">Mesh</string>
<Vector3 name="Scale">
<X>1.25</X>
<Y>1.25</Y>
<Z>1.25</Z>
</Vector3>
<Content name="TextureId"><null></null></Content>
<Vector3 name="VertexColor">
<X>1</X>
<Y>1</Y>
<Z>1</Z>
</Vector3>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Decal" referent="RBX3">
<Properties>
<token name="Face">5</token>
<string name="Name">face</string>
<float name="Shiny">20</float>
<float name="Specular">0</float>
<Content name="Texture"><url>rbxasset://textures\face.png</url></Content>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
<Item class="Part" referent="RBX4">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">4</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">23</int>
<CoordinateFrame name="CFrame">
<X>0</X>
<Y>3</Y>
<Z>25.5</Z>
<R00>-1</R00>
<R01>0</R01>
<R02>-0</R02>
<R10>-0</R10>
<R11>1</R11>
<R12>-0</R12>
<R20>-0</R20>
<R21>0</R21>
<R22>-1</R22>
</CoordinateFrame>
<bool name="CanCollide">true</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="DraggingV1">false</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">0</float>
<float name="LeftParamB">0</float>
<token name="LeftSurface">2</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">true</bool>
<string name="Name">Torso</string>
<float name="Reflectance">0</float>
<float name="RightParamA">0</float>
<float name="RightParamB">0</float>
<token name="RightSurface">2</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<bool name="archivable">true</bool>
<token name="shape">1</token>
<Vector3 name="size">
<X>2</X>
<Y>2</Y>
<Z>1</Z>
</Vector3>
</Properties>
<Item class="Decal" referent="RBX5">
<Properties>
<token name="Face">5</token>
<string name="Name">roblox</string>
<float name="Shiny">20</float>
<float name="Specular">0</float>
<Content name="Texture" mimeType="image/png"><binary xmime:contentType="image/png">iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAALHRFWHRDcmVhdGlvbiBUaW1l
AE1vbiAyMSBBcHIgMjAwOCAxNjo0NDo0OCAtMDgwMMFcEAAAAAAHdElNRQfYBBUXLQp5aDOL
AAAACXBIWXMAAAsSAAALEgHS3X78AAAABGdBTUEAALGPC/xhBQAAABJJREFUeNpjYBgFo2AU
jAIIAAAEEAABr0WILAAAAABJRU5ErkJggg==</binary></Content>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
<Item class="Part" referent="RBX6">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">4</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">24</int>
<CoordinateFrame name="CFrame">
<X>1.5</X>
<Y>3</Y>
<Z>25.5</Z>
<R00>-1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>-1</R22>
</CoordinateFrame>
<bool name="CanCollide">false</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="DraggingV1">false</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">0</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">true</bool>
<string name="Name">Left Arm</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">0</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<bool name="archivable">true</bool>
<token name="shape">1</token>
<Vector3 name="size">
<X>1</X>
<Y>2</Y>
<Z>1</Z>
</Vector3>
</Properties>
</Item>
<Item class="Part" referent="RBX7">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">4</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">24</int>
<CoordinateFrame name="CFrame">
<X>-1.5</X>
<Y>3</Y>
<Z>25.5</Z>
<R00>-1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>-1</R22>
</CoordinateFrame>
<bool name="CanCollide">false</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="DraggingV1">false</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">0</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">true</bool>
<string name="Name">Right Arm</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">0</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<bool name="archivable">true</bool>
<token name="shape">1</token>
<Vector3 name="size">
<X>1</X>
<Y>2</Y>
<Z>1</Z>
</Vector3>
</Properties>
</Item>
<Item class="Part" referent="RBX8">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">0</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">119</int>
<CoordinateFrame name="CFrame">
<X>0.5</X>
<Y>1</Y>
<Z>25.5</Z>
<R00>-1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>-1</R22>
</CoordinateFrame>
<bool name="CanCollide">false</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="DraggingV1">false</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">0</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">true</bool>
<string name="Name">Left Leg</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">0</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<bool name="archivable">true</bool>
<token name="shape">1</token>
<Vector3 name="size">
<X>1</X>
<Y>2</Y>
<Z>1</Z>
</Vector3>
</Properties>
</Item>
<Item class="Part" referent="RBX9">
<Properties>
<bool name="Anchored">false</bool>
<float name="BackParamA">-0.5</float>
<float name="BackParamB">0.5</float>
<token name="BackSurface">0</token>
<token name="BackSurfaceInput">0</token>
<float name="BottomParamA">-0.5</float>
<float name="BottomParamB">0.5</float>
<token name="BottomSurface">0</token>
<token name="BottomSurfaceInput">0</token>
<int name="BrickColor">119</int>
<CoordinateFrame name="CFrame">
<X>-0.5</X>
<Y>1</Y>
<Z>25.5</Z>
<R00>-1</R00>
<R01>0</R01>
<R02>0</R02>
<R10>0</R10>
<R11>1</R11>
<R12>0</R12>
<R20>0</R20>
<R21>0</R21>
<R22>-1</R22>
</CoordinateFrame>
<bool name="CanCollide">false</bool>
<token name="Controller">0</token>
<bool name="ControllerFlagShown">true</bool>
<bool name="DraggingV1">false</bool>
<float name="Elasticity">0.5</float>
<token name="FormFactor">0</token>
<float name="Friction">0.300000012</float>
<float name="FrontParamA">-0.5</float>
<float name="FrontParamB">0.5</float>
<token name="FrontSurface">0</token>
<token name="FrontSurfaceInput">0</token>
<float name="LeftParamA">-0.5</float>
<float name="LeftParamB">0.5</float>
<token name="LeftSurface">0</token>
<token name="LeftSurfaceInput">0</token>
<bool name="Locked">true</bool>
<string name="Name">Right Leg</string>
<float name="Reflectance">0</float>
<float name="RightParamA">-0.5</float>
<float name="RightParamB">0.5</float>
<token name="RightSurface">0</token>
<token name="RightSurfaceInput">0</token>
<Vector3 name="RotVelocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="TopParamA">-0.5</float>
<float name="TopParamB">0.5</float>
<token name="TopSurface">3</token>
<token name="TopSurfaceInput">0</token>
<float name="Transparency">0</float>
<Vector3 name="Velocity">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<bool name="archivable">true</bool>
<token name="shape">1</token>
<Vector3 name="size">
<X>1</X>
<Y>2</Y>
<Z>1</Z>
</Vector3>
</Properties>
</Item>
<Item class="Humanoid" referent="RBX10">
<Properties>
<float name="Health">100</float>
<bool name="Jump">false</bool>
<float name="MaxHealth">100</float>
<string name="Name">Humanoid</string>
<bool name="Sit">false</bool>
<Vector3 name="TargetPoint">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<Vector3 name="WalkDirection">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<float name="WalkRotationalVelocity">0</float>
<Ref name="WalkToPart">null</Ref>
<Vector3 name="WalkToPoint">
<X>0</X>
<Y>0</Y>
<Z>0</Z>
</Vector3>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
</roblox>

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,291 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script" referent="RBX0">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Animate</string>
<string name="Source">-- Now with exciting TeamColors HACK!
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
-- TEAM COLORS
function onTeamChanged(player)
wait(1)
local char = player.Character
if char == nil then return end
if player.Neutral then
-- Replacing the current BodyColor object will force a reset
local old = char:findFirstChild(&quot;Body Colors&quot;)
if not old then return end
old:clone().Parent = char
old.Parent = nil
else
local head = char:findFirstChild(&quot;Head&quot;)
local torso = char:findFirstChild(&quot;Torso&quot;)
local left_arm = char:findFirstChild(&quot;Left Arm&quot;)
local right_arm = char:findFirstChild(&quot;Right Arm&quot;)
local left_leg = char:findFirstChild(&quot;Left Leg&quot;)
local right_leg = char:findFirstChild(&quot;Right Leg&quot;)
if head then head.BrickColor = BrickColor.new(24) end
if torso then torso.BrickColor = player.TeamColor end
if left_arm then left_arm.BrickColor = BrickColor.new(26) end
if right_arm then right_arm.BrickColor = BrickColor.new(26) end
if left_leg then left_leg.BrickColor = BrickColor.new(26) end
if right_leg then right_leg.BrickColor = BrickColor.new(26) end
end
end
function onPlayerPropChanged(property, player)
if property == &quot;Character&quot; then
onTeamChanged(player)
end
if property== &quot;TeamColor&quot; or property == &quot;Neutral&quot; then
onTeamChanged(player)
end
end
local cPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
cPlayer.Changed:connect(function(property) onPlayerPropChanged(property, cPlayer) end )
onTeamChanged(cPlayer)
-- ANIMATION
-- declarations
local Figure = script.Parent
local Torso = waitForChild(Figure, &quot;Torso&quot;)
local RightShoulder = waitForChild(Torso, &quot;Right Shoulder&quot;)
local LeftShoulder = waitForChild(Torso, &quot;Left Shoulder&quot;)
local RightHip = waitForChild(Torso, &quot;Right Hip&quot;)
local LeftHip = waitForChild(Torso, &quot;Left Hip&quot;)
local Neck = waitForChild(Torso, &quot;Neck&quot;)
local Humanoid = waitForChild(Figure, &quot;Humanoid&quot;)
local pose = &quot;Standing&quot;
local toolAnim = &quot;None&quot;
local toolAnimTime = 0
-- functions
function onRunning(speed)
if speed&gt;0 then
pose = &quot;Running&quot;
else
pose = &quot;Standing&quot;
end
end
function onDied()
pose = &quot;Dead&quot;
end
function onJumping()
pose = &quot;Jumping&quot;
end
function onClimbing()
pose = &quot;Climbing&quot;
end
function onGettingUp()
pose = &quot;GettingUp&quot;
end
function onFreeFall()
pose = &quot;FreeFall&quot;
end
function onFallingDown()
pose = &quot;FallingDown&quot;
end
function onSeated()
pose = &quot;Seated&quot;
end
function moveJump()
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 3.14
LeftShoulder.DesiredAngle = -3.14
RightHip.DesiredAngle = 0
LeftHip.DesiredAngle = 0
end
-- same as jump for now
function moveFreeFall()
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 3.14
LeftShoulder.DesiredAngle = -3.14
RightHip.DesiredAngle = 0
LeftHip.DesiredAngle = 0
end
function moveSit()
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
RightShoulder.DesiredAngle = 3.14 /2
LeftShoulder.DesiredAngle = -3.14 /2
RightHip.DesiredAngle = 3.14 /2
LeftHip.DesiredAngle = -3.14 /2
end
function getTool()
for _, kid in ipairs(Figure:GetChildren()) do
if kid.className == &quot;Tool&quot; then return kid end
end
return nil
end
function getToolAnim(tool)
for _, c in ipairs(tool:GetChildren()) do
if c.Name == &quot;toolanim&quot; and c.className == &quot;StringValue&quot; then
return c
end
end
return nil
end
function animateTool()
if (toolAnim == &quot;None&quot;) then
RightShoulder.DesiredAngle = 1.57
return
end
if (toolAnim == &quot;Slash&quot;) then
RightShoulder.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 0
return
end
if (toolAnim == &quot;Lunge&quot;) then
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
RightHip.MaxVelocity = 0.5
LeftHip.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 1.57
LeftShoulder.DesiredAngle = 1.0
RightHip.DesiredAngle = 1.57
LeftHip.DesiredAngle = 1.0
return
end
end
function move(time)
local amplitude
local frequency
if (pose == &quot;Jumping&quot;) then
moveJump()
return
end
if (pose == &quot;FreeFall&quot;) then
moveFreeFall()
return
end
if (pose == &quot;Seated&quot;) then
moveSit()
return
end
local climbFudge = 0
if (pose == &quot;Running&quot;) then
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
amplitude = 1
frequency = 9
elseif (pose == &quot;Climbing&quot;) then
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
amplitude = 1
frequency = 9
climbFudge = 3.14
else
amplitude = 0.1
frequency = 1
end
desiredAngle = amplitude * math.sin(time*frequency)
RightShoulder.DesiredAngle = desiredAngle + climbFudge
LeftShoulder.DesiredAngle = desiredAngle - climbFudge
RightHip.DesiredAngle = -desiredAngle
LeftHip.DesiredAngle = -desiredAngle
local tool = getTool()
if tool then
animStringValueObject = getToolAnim(tool)
if animStringValueObject then
toolAnim = animStringValueObject.Value
-- message recieved, delete StringValue
animStringValueObject.Parent = nil
toolAnimTime = time + .3
end
if time &gt; toolAnimTime then
toolAnimTime = 0
toolAnim = &quot;None&quot;
end
animateTool()
else
toolAnim = &quot;None&quot;
toolAnimTime = 0
end
end
-- connect events
Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
-- main program
local runService = game:service(&quot;RunService&quot;);
while Figure.Parent~=nil do
local _, time = wait(0.1)
move(time)
end
</string>
<bool name="archivable">true</bool>
</Properties>
</Item>
</roblox>

View File

@ -0,0 +1,313 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="LocalScript" referent="RBX0">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Animate</string>
<string name="Source">
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
-- ANIMATION
-- declarations
local Figure = script.Parent
local Torso = waitForChild(Figure, &quot;Torso&quot;)
local RightShoulder = waitForChild(Torso, &quot;Right Shoulder&quot;)
local LeftShoulder = waitForChild(Torso, &quot;Left Shoulder&quot;)
local RightHip = waitForChild(Torso, &quot;Right Hip&quot;)
local LeftHip = waitForChild(Torso, &quot;Left Hip&quot;)
local Neck = waitForChild(Torso, &quot;Neck&quot;)
local Humanoid = waitForChild(Figure, &quot;Humanoid&quot;)
local pose = &quot;Standing&quot;
local toolAnim = &quot;None&quot;
local toolAnimTime = 0
-- functions
function onRunning(speed)
if speed&gt;0 then
pose = &quot;Running&quot;
else
pose = &quot;Standing&quot;
end
end
function onDied()
pose = &quot;Dead&quot;
end
function onJumping()
pose = &quot;Jumping&quot;
end
function onClimbing()
pose = &quot;Climbing&quot;
end
function onGettingUp()
pose = &quot;GettingUp&quot;
end
function onFreeFall()
pose = &quot;FreeFall&quot;
end
function onFallingDown()
pose = &quot;FallingDown&quot;
end
function onSeated()
pose = &quot;Seated&quot;
end
function moveJump()
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 3.14
LeftShoulder.DesiredAngle = -3.14
RightHip.DesiredAngle = 0
LeftHip.DesiredAngle = 0
end
-- same as jump for now
function moveFreeFall()
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 3.14
LeftShoulder.DesiredAngle = -3.14
RightHip.DesiredAngle = 0
LeftHip.DesiredAngle = 0
end
function moveSit()
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
RightShoulder.DesiredAngle = 3.14 /2
LeftShoulder.DesiredAngle = -3.14 /2
RightHip.DesiredAngle = 3.14 /2
LeftHip.DesiredAngle = -3.14 /2
end
function getTool()
for _, kid in ipairs(Figure:GetChildren()) do
if kid.className == &quot;Tool&quot; then return kid end
end
return nil
end
function getToolAnim(tool)
for _, c in ipairs(tool:GetChildren()) do
if c.Name == &quot;toolanim&quot; and c.className == &quot;StringValue&quot; then
return c
end
end
return nil
end
function animateTool()
if (toolAnim == &quot;None&quot;) then
RightShoulder.DesiredAngle = 1.57
return
end
if (toolAnim == &quot;Slash&quot;) then
RightShoulder.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 0
return
end
if (toolAnim == &quot;Lunge&quot;) then
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
RightHip.MaxVelocity = 0.5
LeftHip.MaxVelocity = 0.5
RightShoulder.DesiredAngle = 1.57
LeftShoulder.DesiredAngle = 1.0
RightHip.DesiredAngle = 1.57
LeftHip.DesiredAngle = 1.0
return
end
end
function move(time)
local amplitude
local frequency
if (pose == &quot;Jumping&quot;) then
moveJump()
return
end
if (pose == &quot;FreeFall&quot;) then
moveFreeFall()
return
end
if (pose == &quot;Seated&quot;) then
moveSit()
return
end
local climbFudge = 0
if (pose == &quot;Running&quot;) then
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
amplitude = 1
frequency = 9
elseif (pose == &quot;Climbing&quot;) then
RightShoulder.MaxVelocity = 0.5
LeftShoulder.MaxVelocity = 0.5
amplitude = 1
frequency = 9
climbFudge = 3.14
else
amplitude = 0.1
frequency = 1
end
desiredAngle = amplitude * math.sin(time*frequency)
RightShoulder.DesiredAngle = desiredAngle + climbFudge
LeftShoulder.DesiredAngle = desiredAngle - climbFudge
RightHip.DesiredAngle = -desiredAngle
LeftHip.DesiredAngle = -desiredAngle
local tool = getTool()
if tool then
animStringValueObject = getToolAnim(tool)
if animStringValueObject then
toolAnim = animStringValueObject.Value
-- message recieved, delete StringValue
animStringValueObject.Parent = nil
toolAnimTime = time + .3
end
if time &gt; toolAnimTime then
toolAnimTime = 0
toolAnim = &quot;None&quot;
end
animateTool()
else
toolAnim = &quot;None&quot;
toolAnimTime = 0
end
end
-- connect events
Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
-- main program
local runService = game:service(&quot;RunService&quot;);
while Figure.Parent~=nil do
local _, time = wait(0.1)
move(time)
end
</string>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Script" referent="RBX1">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource">
<null></null>
</Content>
<string name="Name">RobloxTeam</string>
<string name="Source">
-- Now with exciting TeamColors HACK!
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
-- TEAM COLORS
function onTeamChanged(player)
wait(1)
local char = player.Character
if char == nil then return end
if player.Neutral then
-- Replacing the current BodyColor object will force a reset
local old = char:findFirstChild(&quot;Body Colors&quot;)
if not old then return end
old:clone().Parent = char
old.Parent = nil
else
local head = char:findFirstChild(&quot;Head&quot;)
local torso = char:findFirstChild(&quot;Torso&quot;)
local left_arm = char:findFirstChild(&quot;Left Arm&quot;)
local right_arm = char:findFirstChild(&quot;Right Arm&quot;)
local left_leg = char:findFirstChild(&quot;Left Leg&quot;)
local right_leg = char:findFirstChild(&quot;Right Leg&quot;)
if head then head.BrickColor = BrickColor.new(24) end
if torso then torso.BrickColor = player.TeamColor end
if left_arm then left_arm.BrickColor = BrickColor.new(26) end
if right_arm then right_arm.BrickColor = BrickColor.new(26) end
if left_leg then left_leg.BrickColor = BrickColor.new(26) end
if right_leg then right_leg.BrickColor = BrickColor.new(26) end
end
end
function onPlayerPropChanged(property, player)
if property == &quot;Character&quot; then
onTeamChanged(player)
end
if property== &quot;TeamColor&quot; or property == &quot;Neutral&quot; then
onTeamChanged(player)
end
end
local cPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
cPlayer.Changed:connect(function(property) onPlayerPropChanged(property, cPlayer) end )
onTeamChanged(cPlayer)
</string>
<bool name="archivable">true</bool>
</Properties>
</Item>
</roblox>

View File

@ -0,0 +1,11 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script">
<Properties>
<bool name="Disabled">false</bool>
<string name="Name">Script</string>
<string name="Source">&#13;&#10;while script.Parent.Head==nil do&#13;&#10;&#9;wait(0.05)&#13;&#10;end&#13;&#10;&#13;&#10;function newSound(id)&#13;&#10;&#9;local sound = Instance.new(&quot;Sound&quot;)&#13;&#10;&#9;sound.SoundId = id&#13;&#10;&#9;sound.Parent = script.Parent.Head&#13;&#10;&#9;return sound&#13;&#10;end&#13;&#10;&#13;&#10;sDied = newSound(&quot;rbxasset://sounds/uuhhh.wav&quot;)&#13;&#10;sFallingDown = newSound(&quot;rbxasset://sounds/splat.wav&quot;)&#13;&#10;sFreeFalling = newSound(&quot;rbxasset://sounds/swoosh.wav&quot;)&#13;&#10;sGettingUp = newSound(&quot;rbxasset://sounds/hit.wav&quot;)&#13;&#10;sJumping = newSound(&quot;rbxasset://sounds/button.wav&quot;)&#13;&#10;sRunning = newSound(&quot;rbxasset://sounds/bfsl-minifigfoots1.mp3&quot;)&#13;&#10;sRunning.Looped = true&#13;&#10;&#13;&#10;function onDied()&#13;&#10;&#9;sDied:play()&#13;&#10;end&#13;&#10;&#13;&#10;function onState(state, sound)&#13;&#10;&#9;if state then&#13;&#10;&#9;&#9;sound:play()&#13;&#10;&#9;else&#13;&#10;&#9;&#9;sound:pause()&#13;&#10;&#9;end&#13;&#10;end&#13;&#10;&#13;&#10;function onRunning(speed)&#13;&#10;&#9;if speed&gt;0 then&#13;&#10;&#9;&#9;sRunning:play()&#13;&#10;&#9;else&#13;&#10;&#9;&#9;sRunning:pause()&#13;&#10;&#9;end&#13;&#10;end&#13;&#10;&#13;&#10;while script.Parent.Humanoid==nil do&#13;&#10;&#9;wait(0.05)&#13;&#10;end&#13;&#10;&#13;&#10;h = script.Parent.Humanoid&#13;&#10;h.Died:connect(onDied)&#13;&#10;h.Running:connect(onRunning)&#13;&#10;h.Jumping:connect(function(state) onState(state, sJumping) end)&#13;&#10;h.GettingUp:connect(function(state) onState(state, sGettingUp) end)&#13;&#10;h.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)&#13;&#10;h.FallingDown:connect(function(state) onState(state, sFallingDown) end)&#13;&#10;&#13;&#10;-- regeneration&#13;&#10;while true do&#13;&#10;&#9;local s = wait(1)&#13;&#10;&#9;local health=h.Health&#13;&#10;&#9;if health&gt;0 and health&lt;h.MaxHealth then&#13;&#10;&#9;&#9;health = health + 0.01*s*h.MaxHealth&#13;&#10;&#9;&#9;if health*1.05 &lt; h.MaxHealth then&#13;&#10;&#9;&#9;&#9;h.Health = health&#13;&#10;&#9;&#9;else&#13;&#10;&#9;&#9;&#9;h.Health = h.MaxHealth&#13;&#10;&#9;&#9;end&#13;&#10;&#9;end&#13;&#10;end&#13;&#10;</string>
</Properties>
</Item>
</roblox>

View File

@ -0,0 +1,41 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script" referent="RBX0">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Health</string>
<string name="Source">function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
-- declarations
local Figure = script.Parent
local Head = waitForChild(Figure, &quot;Head&quot;)
local Humanoid = waitForChild(Figure, &quot;Humanoid&quot;)
-- regeneration
while true do
local s = wait(1)
local health = Humanoid.Health
if health &gt; 0 and health &lt; Humanoid.MaxHealth then
health = health + 0.01 * s * Humanoid.MaxHealth
if health * 1.05 &lt; Humanoid.MaxHealth then
Humanoid.Health = health
else
Humanoid.Health = Humanoid.MaxHealth
end
end
end
</string>
<bool name="archivable">true</bool>
</Properties>
</Item>
</roblox>

View File

@ -0,0 +1,76 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script" referent="RBX0">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Sound</string>
<string name="Source">-- util
function waitForChild(parent, childName)
local child = parent:findFirstChild(childName)
if child then return child end
while true do
child = parent.ChildAdded:wait()
if child.Name==childName then return child end
end
end
function newSound(id)
local sound = Instance.new(&quot;Sound&quot;)
sound.SoundId = id
sound.archivable = false
sound.Parent = script.Parent.Head
return sound
end
-- declarations
local sDied = newSound(&quot;rbxasset://sounds/uuhhh.wav&quot;)
local sFallingDown = newSound(&quot;rbxasset://sounds/splat.wav&quot;)
local sFreeFalling = newSound(&quot;rbxasset://sounds/swoosh.wav&quot;)
local sGettingUp = newSound(&quot;rbxasset://sounds/hit.wav&quot;)
local sJumping = newSound(&quot;rbxasset://sounds/button.wav&quot;)
local sRunning = newSound(&quot;rbxasset://sounds/bfsl-minifigfoots1.mp3&quot;)
sRunning.Looped = true
local Figure = script.Parent
local Head = waitForChild(Figure, &quot;Head&quot;)
local Humanoid = waitForChild(Figure, &quot;Humanoid&quot;)
-- functions
function onDied()
sDied:Play()
end
function onState(state, sound)
if state then
sound:Play()
else
sound:Pause()
end
end
function onRunning(speed)
if speed&gt;0 then
sRunning:Play()
else
sRunning:Pause()
end
end
-- connect up
Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
</string>
<bool name="archivable">true</bool>
</Properties>
</Item>
</roblox>

View File

@ -0,0 +1,12 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script">
<Properties>
<bool name="Disabled">false</bool>
<string name="Name">Static</string>
<string name="Source">local Figure = script.Parent&#13;&#10;&#13;&#10;local Torso = Figure:findFirstChild(&quot;Torso&quot;)&#13;&#10;&#13;&#10;Torso:makeJoints()</string>
<bool name="archivable">true</bool>
</Properties>
</Item>
</roblox>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,28 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script" referent="RBX0">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">ResetCommand</string>
<ProtectedString name="Source">function onChatted(msg, speaker)
source = string.lower(speaker.Name)
msg = string.lower(msg)
-- Note: This one is NOT caps sensitive
if msg == &quot;!!!reset&quot; then
speaker.Character.Humanoid.Health = 0
end
end
function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg) onChatted(msg, newPlayer) end)
end
game.Players.ChildAdded:connect(onPlayerEntered)</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
</roblox>

View File

@ -0,0 +1,2 @@
#define ENABLE_REFLECTIONS
#include "fonts/materials/programs/include/aluminum.cgh"

View File

@ -0,0 +1,2 @@
#include "fonts/materials/programs/include/compound.cgh"

View File

@ -0,0 +1,2 @@
#include "fonts/materials/programs/include/diamondplate.cgh"

View File

@ -0,0 +1,2 @@
#include "fonts/materials/programs/include/grass.cgh"

View File

@ -0,0 +1,2 @@
#define ENABLE_REFLECTIONS
#include "fonts/materials/programs/include/ice.cgh"

View File

@ -0,0 +1,142 @@
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
struct appdataTangent {
float3 Position : POSITION;
float4 AlumColor : COLOR;
float2 ModelUV : TEXCOORD0;
float3 AlumPos : TEXCOORD1;
float2 SurfaceUV: TEXCOORD2;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct alumVertexOutput {
float4 HPosition : POSITION;
float4 AlumColor : COLOR;
float4 ModelUV : TEXCOORD0;
float4 AlumPos : TEXCOORD1; // coord w is attenuation 0 = no normal map, 1 = full normal map
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldView : TEXCOORD7;
float4 ObjectNormal : TEXCOORD6;
float3 ActualPos : COLOR1;
};
/*********** vertex shader ******/
alumVertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos
) {
alumVertexOutput OUT = (alumVertexOutput)0;
float3 aWorldBinormal = cross(OUT.WorldNormal, OUT.WorldTangent);
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
aWorldBinormal);
OUT.AlumPos = float4(IN.Position, 0);
OUT.ModelUV = float4(IN.ModelUV, IN.SurfaceUV);
OUT.AlumColor = IN.AlumColor;
OUT.ObjectNormal = float4(IN.Normal,1);
OUT.ObjectNormal.w = mul(WvpXf,float4(IN.Position,1)).z;
OUT.ActualPos = IN.AlumPos;
OUT.AlumPos = float4(IN.AlumPos.xyz, 0);
return OUT;
}
/********* pixel shader ********/
float4 alumPSStuds(alumVertexOutput IN,
uniform float Ks,
uniform float SpecExpon,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float NormMapScale,
uniform sampler2D StudsSamp,
uniform sampler2D NormalSamp,
uniform samplerCUBE EnvSampler,
uniform float Kr,
uniform float FresnelVal
) : COLOR
{
float4 studShade = tex2D(StudsSamp, IN.ModelUV.xy);
float fade = 1-abs(IN.ObjectNormal.w/260);
if(fade < 0)
fade = 0;
float2 NormalUV = IN.ModelUV.zw * NormMapScale;
float2 NormalUV2 = NormalUV * 0.4;
float2 NormalUV3 = NormalUV2 * 0.1;
float3 dColor = IN.AlumColor.xyz;
float3 tNorm = tex2D(NormalSamp,NormalUV).xyz - float3(0.5,0.5,0.5);
float3 tNorm2 = tex2D(NormalSamp, NormalUV2).xyz - float3(0.5, 0.5, 0.5);
tNorm = lerp(tNorm, tNorm2, 0.5);
tNorm2 = tex2D(NormalSamp, NormalUV3).xyz - float3(0.5, 0.5, 0.5);
tNorm = lerp(tNorm, tNorm2, 0.3);
float tNormSum = 0.4+0.6*(tNorm.x + tNorm.y + tNorm.z);
dColor *= ((1-fade) + (fade*tNormSum));
float3 aWorldBinormal = cross(IN.WorldTangent, IN.WorldNormal);
float3 NnBump = normalize(tNorm.x * IN.WorldTangent -
tNorm.y*aWorldBinormal +
tNorm.z * IN.WorldNormal);
NnBump *= fade;
Ks *= fade;
float3 Nn = normalize(lerp(NnBump, IN.WorldNormal, 0.4 ));
float3 diffContrib;
float3 specContrib;
float3 reflContrib;
ps_shared_lighting_env(dColor, Nn, IN.WorldView,
IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon,
Kr,
diffContrib,
specContrib,
EnvSampler,
reflContrib);
float3 result = lerp(diffContrib, studShade.xyz, studShade.w) + specContrib;
result += (FresnelVal*reflContrib-0.1) * fade;
return float4(result, 1);
}

View File

@ -0,0 +1,312 @@
////////////////// Util Functions ///////////////
//normal must be normalized.
//tangetnRef and binormalRef should be similar scale.
void makeTangentAndBinormal(float3 normal, float3 tangentRef, float3 binormalRef, out float3 tangent, out float3 binormal)
{
float3 binormaltemp = cross(normal, tangentRef);
float binormallen = length(binormaltemp);
float3 tangenttemp = cross(binormalRef, normal);
float tangentlen = length(tangenttemp);
// use the longest result (most accurate)
// both will never be zero.
if(binormallen > tangentlen)
{
binormal = binormaltemp/binormallen;
tangent = cross(binormal, normal);
}
else
{
tangent = tangenttemp/tangentlen;
binormal = cross(normal, tangent);
}
}
void makeWorldTangentAndBinormalFromTextureXf(float4x4 TextureXf, float3 objNormal,
out float3 objTangent, out float3 objBinormal)
{
//generate tangent and binormal using 3D texturespace X and Y vector.
float3 tangentRef = mul(TextureXf, float4(1,0,0,0)).xyz;
float3 binormalRef = mul(TextureXf, float4(0,1,0,0)).xyz;
makeTangentAndBinormal(objNormal, tangentRef, binormalRef,
objTangent, objBinormal);
}
void ps_shared_lighting(
float3 DiffuseColor,
float3 WorldNormal,
float3 WorldView,
float3 Light0Vec,
float3 Light1Vec,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float Ks,
uniform float SpecExpon,
out float3 DiffuseContrib,
out float3 SpecularContrib
)
{
float3 Nn = normalize(WorldNormal);
float3 Vn = normalize(WorldView);
float3 Ln0 = normalize(Light0Vec);
float3 Ln1 = normalize(Light1Vec);
float3 Hn0 = normalize(Vn + Ln0);
float hdn0 = dot(Hn0,Nn);
float ldn0 = dot(Ln0,Nn);
float ldn1 = dot(Ln1,Nn);
float4 lit0V = lit(ldn0,hdn0,SpecExpon);
float lit1Vy = saturate(ldn1); // don't do specular calculations for second light.
DiffuseContrib = DiffuseColor * ( lit0V.y*Lamp0Color + lit1Vy*Lamp1Color + AmbiColor);
SpecularContrib = Ks * (lit0V.z * Lamp0Color);
}
void ps_shared_lighting_env(
float3 DiffuseColor,
float3 WorldNormal,
float3 WorldView,
float3 Light0Vec,
float3 Light1Vec,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float Ks,
uniform float SpecExpon,
uniform float Kr,
out float3 DiffuseContrib,
out float3 SpecularContrib
,uniform samplerCUBE EnvSampler
,out float3 ReflectionContrib
)
{
float3 Nn = normalize(WorldNormal);
float3 Vn = normalize(WorldView);
float3 Ln0 = normalize(Light0Vec);
float3 Ln1 = normalize(Light1Vec);
float3 Hn0 = normalize(Vn + Ln0);
float hdn0 = dot(Hn0,Nn);
float ldn0 = dot(Ln0,Nn);
float ldn1 = dot(Ln1,Nn);
float4 lit0V = lit(ldn0,hdn0,SpecExpon);
float lit1Vy = saturate(ldn1); // don't do specular calculations for second light.
DiffuseContrib = DiffuseColor * ( lit0V.y*Lamp0Color + lit1Vy*Lamp1Color + AmbiColor);
SpecularContrib = Ks * (lit0V.z * Lamp0Color);
#ifdef ENABLE_REFLECTIONS
float3 reflVect = -reflect(Vn,Nn);
ReflectionContrib = saturate(Kr * texCUBE(EnvSampler,reflVect).xyz);
#endif
}
void ps_shared_lighting_specularonly(
float3 WorldNormal,
float3 WorldView,
float3 Light0Vec,
uniform float3 Lamp0Specular,
uniform float Ks,
uniform float SpecExpon,
out float3 SpecularContrib
)
{
float3 Nn = normalize(WorldNormal);
float3 Vn = normalize(WorldView);
float3 Ln0 = normalize(Light0Vec);
float3 Hn0 = normalize(Vn + Ln0);
float hdn0 = dot(Hn0,Nn);
float ldn0 = dot(Ln0,Nn);
float4 lit0V = lit(ldn0,hdn0,SpecExpon);
SpecularContrib = Ks * (lit0V.z * Lamp0Specular);
}
void ps_shared_lighting_env_specularonly(
float3 WorldNormal,
float3 WorldView,
float3 Light0Vec,
uniform float3 Lamp0Specular,
uniform float Ks,
uniform float SpecExpon,
uniform float Kr,
out float3 SpecularContrib
,uniform samplerCUBE EnvSampler
,out float3 ReflectionContrib
)
{
float3 Nn = normalize(WorldNormal);
float3 Vn = normalize(WorldView);
float3 Ln0 = normalize(Light0Vec);
float3 Hn0 = normalize(Vn + Ln0);
float hdn0 = dot(Hn0,Nn);
float ldn0 = dot(Ln0,Nn);
float4 lit0V = lit(ldn0,hdn0,SpecExpon);
SpecularContrib = Ks * (lit0V.z * Lamp0Specular);
#ifdef ENABLE_REFLECTIONS
float3 reflVect = -reflect(Vn,Nn);
ReflectionContrib = saturate(Kr * texCUBE(EnvSampler,reflVect).xyz);
#endif
}
void vs_shared_lighting(
float3 Position,
float3 Normal,
float3 Tangent,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
out float3 Light0Vec,
out float3 Light1Vec,
out float3 WorldView,
out float4 HPosition,
out float3 WorldNormal,
out float3 WorldTangent,
out float3 WorldBinormal)
{
float4 Po = float4(Position.xyz,1);
float3 Pw = mul(WorldXf, Po).xyz;
Light0Vec = Lamp0Pos.xyz - (Pw * Lamp0Pos.w);
Light1Vec = Lamp1Pos.xyz - (Pw * Lamp1Pos.w);
WorldView = (float3(ViewIXf[0].w,ViewIXf[1].w,ViewIXf[2].w) - Pw);
HPosition = mul(WvpXf,Po);
WorldNormal = mul(WorldITXf, float4(Normal,0)).xyz;
WorldTangent = mul(WorldITXf, float4(Tangent,0)).xyz;
WorldBinormal = cross(WorldNormal, WorldTangent);
}
void vs_shared_lighting_diffuse(
float3 Position,
float3 Normal,
float3 Tangent,
float3 DiffuseColor,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 Ambient,
out float3 Light0Vec,
out float3 LightDiffuseContrib, // includes ambient
out float3 WorldView,
out float4 HPosition,
out float3 WorldNormal,
out float3 WorldTangent,
out float3 WorldBinormal)
{
float4 Po = float4(Position.xyz,1);
float3 Pw = mul(WorldXf, Po).xyz;
Light0Vec = Lamp0Pos.xyz - (Pw * Lamp0Pos.w);
float3 Light1Vec = Lamp1Pos.xyz - (Pw * Lamp1Pos.w);
WorldView = (float3(ViewIXf[0].w,ViewIXf[1].w,ViewIXf[2].w) - Pw);
HPosition = mul(WvpXf,Po);
WorldNormal = mul(WorldITXf, float4(Normal,0)).xyz;
WorldTangent = mul(WorldITXf, float4(Tangent,0)).xyz;
WorldBinormal = cross(WorldNormal, WorldTangent);
float3 IgnoredSpecular;
// reuse ps_ lighting comp
ps_shared_lighting(
DiffuseColor,
WorldNormal,
WorldView,
Light0Vec,
Light1Vec,
Lamp0Color,
Lamp1Color,
Ambient,
0,
0,
LightDiffuseContrib,
IgnoredSpecular
);
}
struct BasicVertexInput {
float3 Position : POSITION;
float4 Color : COLOR;
float2 StudsUV : TEXCOORD0;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct BasicVertexOutput {
float4 HPosition : POSITION;
float4 Color : COLOR;
float2 StudsUV : TEXCOORD0;
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldView : TEXCOORD7;
};
/*********** vertex shader ******/
BasicVertexOutput basicVS(BasicVertexInput IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos)
{
BasicVertexOutput OUT = (BasicVertexOutput )0;
float3 unusedBinormal;
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
unusedBinormal);
OUT.StudsUV = IN.StudsUV; // passthrough model UVs.
OUT.Color = IN.Color;
return OUT;
}
/********* pixel shader ********/
float4 basicPSStuds(BasicVertexOutput IN, uniform float Ks, uniform float SpecExpon,
uniform float3 Lamp0Color, uniform float3 Lamp1Color, uniform float3 AmbiColor,
uniform sampler2D StudsSamp) : COLOR
{
float4 studShade = tex2D(StudsSamp, IN.StudsUV.xy);
float3 diffContrib;
float3 specContrib;
ps_shared_lighting(IN.Color.xyz, IN.WorldNormal, IN.WorldView, IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color, AmbiColor, Ks, SpecExpon, diffContrib, specContrib);
float3 result = lerp(diffContrib, studShade.xyz, studShade.w) + specContrib;
return float4(result,1);
}

View File

@ -0,0 +1,183 @@
// UNUSED CODE, FIXED FUNCTION USED IN PLACE OF THIS SHADER
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
struct appdataTangent {
float3 Position : POSITION;
float4 CompoundColor : COLOR;
float2 StudsUV : TEXCOORD0;
float3 CompoundPos : TEXCOORD1;
float2 SurfaceUV: TEXCOORD2;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct compoundVertexOutput {
float4 HPosition : POSITION;
float4 CompoundColor : COLOR;
float4 ModelUV : TEXCOORD0;
float4 CompoundPos : TEXCOORD1; // compound grain coordinate system
// coord w is attenuation 0 = no normal map, 1 = full normal map
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldView : TEXCOORD7;
float4 ObjectNormal : TEXCOORD6;
float3 ActualPos : COLOR1;
};
/*********** vertex shader ******/
compoundVertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos
) {
compoundVertexOutput OUT = (compoundVertexOutput)0;
float3 unusedBinormal;
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
unusedBinormal);
OUT.CompoundPos = float4(IN.CompoundPos, 0);
OUT.ModelUV = float4(IN.StudsUV, IN.SurfaceUV); // passthrough model UVs.
OUT.CompoundColor = IN.CompoundColor;
OUT.ObjectNormal = float4(IN.Normal,1);
OUT.ObjectNormal.w = mul(WvpXf,float4(IN.Position,1)).z;
OUT.ActualPos = IN.CompoundPos;
OUT.CompoundPos.w = IN.CompoundPos.x ;
return OUT;
}
/********* pixel shader ********/
float4 compoundCore(
float4 HPosition,
float4 CompoundColor,
float4 ModelUV,
float4 CompoundPos, // compound grain coordinate system
float3 Light0Vec,
float3 Light1Vec,
float3 WorldNormal,
float3 WorldTangent,
float3 WorldView,
float4 StudShade,
uniform float Ks,
uniform float SpecExpon,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float NormMapScale,
uniform sampler2D NormalSamp,
uniform float4 ObjectNormal,
uniform float3 ActualPos
)
{
float fade = 1-abs(ObjectNormal.w*0.005263); // *.005263 is division by 190
if(fade < 0)
fade = 0;
float NormalRatio = 0.15;
float2 NormalUV = ModelUV.zw* NormMapScale;
float2 NormalUV2 = NormalUV * NormalRatio;
float3 shiftPos = CompoundPos;
float3 dColor = CompoundColor.xyz;
float3 tNorm = tex2D(NormalSamp,NormalUV).xyz - float3(0.5,0.5,0.5);
float3 tNorm2 = tex2D(NormalSamp, NormalUV2).xyz - float3(0.5, 0.5, 0.5);
tNorm = lerp(tNorm, tNorm2, 0.15);
tNorm = normalize(tNorm);
float tNormSum = 0.6+0.4*(tNorm.x + tNorm.y + tNorm.z); //*0.577350269;
dColor *= ((1-fade) + (fade*tNormSum));
float3 aWorldBinormal = cross(WorldTangent, WorldNormal);
float3 NnBump = normalize(tNorm.x*WorldTangent -
tNorm.y*aWorldBinormal +
tNorm.z*WorldNormal);
NnBump *= fade;
float3 Nn = normalize(lerp(NnBump, WorldNormal, 0.3));
float3 diffContrib;
float3 specContrib;
ps_shared_lighting(dColor, Nn, WorldView,
Light0Vec, Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon,
diffContrib,
specContrib);
float3 result = lerp(diffContrib, StudShade.xyz, StudShade.w) + specContrib;
return float4(result, 1.0);
}
/********* pixel shader ********/
float4 compoundPSStuds(compoundVertexOutput IN,
uniform float Ks,
uniform float SpecExpon,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float NormMapScale,
uniform sampler2D StudsSamp,
uniform sampler2D NormalSamp
) : COLOR
{
float4 studShade = tex2D(StudsSamp, IN.ModelUV.xy);
return compoundCore(IN.HPosition,
IN.CompoundColor,
IN.ModelUV,
IN.CompoundPos, // compound grain coordinate system
IN.Light0Vec,
IN.Light1Vec,
IN.WorldNormal,
IN.WorldTangent,
IN.WorldView,
studShade,
Ks,
SpecExpon,
Lamp0Color,
Lamp1Color,
AmbiColor,
NormMapScale,
NormalSamp, IN.ObjectNormal, IN.ActualPos);
}

View File

@ -0,0 +1,124 @@
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
/* data from application vertex buffer */
struct appdataTangent {
float3 Position : POSITION;
float4 DPlateColor : COLOR;
float2 StudsUV : TEXCOORD0;
float2 SurfaceUV: TEXCOORD1;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct dplateVertexOutput {
float4 HPosition : POSITION;
float4 DPlateColor : COLOR;
float4 StudsUV : TEXCOORD0;
float3 Light0Vec : TEXCOORD1;
float3 Light1Vec : TEXCOORD2;
float3 WorldNormal : TEXCOORD3;
float3 WorldTangent : TEXCOORD4;
float3 WorldView : TEXCOORD5;
float4 ObjectNormal : TEXCOORD6;
// coord w is attenuation 0 = no normal map, 1 = full normal map
};
/*********** vertex shader ******/
dplateVertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos
) {
dplateVertexOutput OUT = (dplateVertexOutput)0;
float3 aWorldBinormal = cross(OUT.WorldNormal, OUT.WorldTangent);
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
aWorldBinormal);
OUT.StudsUV = float4(IN.StudsUV, IN.SurfaceUV); // passthrough model UVs.
OUT.DPlateColor = IN.DPlateColor;
OUT.ObjectNormal = float4(IN.Normal,1);
OUT.ObjectNormal.w = mul(WvpXf,float4(IN.Position,1)).z;
return OUT;
}
/********* pixel shader ********/
float4 dplatePSStuds(dplateVertexOutput IN,
uniform float Ks,
uniform float SpecExpon,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float NormMapScale,
uniform sampler2D StudsSamp,
uniform sampler2D NormalSamp
) : COLOR
{
float4 studShade = tex2D(StudsSamp, IN.StudsUV.xy);
float fade = 1-abs(IN.ObjectNormal.w*0.0055556); // ObjectNormal.w holds z distance from object position to camera
// *.00555 is division by 180, the fade distance for LOD drawing
// so that the contribution of shader will fade to 0 at 180
if(fade < 0)
fade = 0;
float NormalRatio = 0.15;
float2 NormalUV = IN.StudsUV.zw* NormMapScale;
float3 dColor = IN.DPlateColor.xyz;
float3 tNorm = tex2D(NormalSamp,NormalUV).xyz - float3(0.5,0.5,0.5);
//float tNormSum = 0.7+0.3*(tNorm.x + tNorm.y + tNorm.z);
//dColor *= ((1-fade) + (fade*(tNormSum+0.1))); // add a bit of normal contribution to color
float3 aWorldBinormal = cross(IN.WorldTangent, IN.WorldNormal);
float3 NnBump = normalize(tNorm.x * IN.WorldTangent -
tNorm.y * aWorldBinormal +
tNorm.z * IN.WorldNormal);
NnBump *= fade;
Ks *= fade;
float3 Nn = normalize(lerp(NnBump, IN.WorldNormal, 0.7 ));
float3 diffContrib;
float3 specContrib;
ps_shared_lighting(dColor, Nn, IN.WorldView,
IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon,
diffContrib,
specContrib);
float3 result = lerp(diffContrib, studShade.xyz, studShade.w) + specContrib;
return float4(result+0.01, 1);
}

View File

@ -0,0 +1,165 @@
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
/* data from application vertex buffer */
struct appdataTangent {
float3 Position : POSITION;
float4 Color : COLOR;
float2 StudsUV : TEXCOORD0;
float3 TexPos3D : TEXCOORD1;
float2 SurfaceUV: TEXCOORD2;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct VertexOutput {
float4 HPosition : POSITION;
float4 Color : COLOR;
float4 ModelUV : TEXCOORD0;
float4 TexPos3D : TEXCOORD1; // grain coordinate system
// coord w is attenuation 0 = no normal map, 1 = full normal map
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldView : TEXCOORD7;
float4 ObjectNormal : TEXCOORD6;
};
/*********** vertex shader ******/
VertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float NormMapScale)
{
VertexOutput OUT = (VertexOutput)0;
float3 unusedBinormal;
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
unusedBinormal);
//
// This shader uses the object coordinates to determine the grass-grain
// coordinate system at shader runtime. Alternatively, you could bake
// the coordinate system into the model as an alternative texcoord. The
// current method applies to all possible models, while baking-in lets
// you try different tricks such as modeling the grain of bent ,
// say for a bow or for the hull timbers of a ship.
//
float cfactor = 0.980066578; //cos(0.2);
float sfactor = 0.198669331; //sin(0.2);
float cfactor2 = 0.955336489; //cos(0.3);
float sfactor2 = 0.295520207; //sin(0.3);
float cfactor3 = 0.921060994; //cos(0.4);
float sfactor3 = 0.389418342; //sin(0.4);
float3 p = IN.TexPos3D;
float3 shiftPos = p;
shiftPos.x += p.x * cfactor + p.z * sfactor;
shiftPos.z += p.x * -sfactor + p.z * cfactor;
shiftPos.x += p.x * cfactor2 - p.y * sfactor2;
shiftPos.y += p.x * sfactor2 + p.y * cfactor2;
shiftPos.y += p.y * cfactor3 - p.z * sfactor3;
shiftPos.z += p.y * sfactor3 + p.z * cfactor3;
OUT.TexPos3D = float4(p,0);
OUT.ModelUV = float4(IN.StudsUV, IN.SurfaceUV* NormMapScale); // passthrough model UVs.
OUT.Color = IN.Color; //Average color of the grass texture
OUT.ObjectNormal = float4(IN.Normal,1);
OUT.ObjectNormal.w = mul(WvpXf,float4(IN.Position,1)).z/200*1.5;
OUT.TexPos3D.w = IN.TexPos3D.x ;
OUT.ObjectNormal.xyz = normalize(OUT.ObjectNormal.xyz);
return OUT;
}
/********* pixel shader ********/
float4 mainPSStuds(VertexOutput IN,
uniform float3 Contrast,
uniform float Ks,
uniform float SpecExpon,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float3 NoiseScale,
uniform sampler2D StudsSamp,
uniform sampler3D NoiseSamp,
uniform sampler2D NormalSamp,
uniform sampler2D grassSamp,
uniform sampler2D GrassNormalSamp) : COLOR
{
float3 oo = IN.ObjectNormal.xyz;
float4 studShade = tex2D(StudsSamp, IN.ModelUV.xy);
float zdist = IN.ObjectNormal.w;
float spread = 0.3;
float grass_threshold = 0.95;
float NormalRatio = 0.15;
float2 NormalUV = IN.ModelUV.zw;
float3 shiftPos = IN.TexPos3D.xyz;
float3 ns = NoiseScale;
float noiseval2 = tex3D(NoiseSamp,shiftPos.xyz*ns.x).x * 0.4;
float noiseval = tex3D(NoiseSamp,shiftPos.zyx*ns.y).x * 0.6;
noiseval -= noiseval2;
float noiseval3 = tex3D(NoiseSamp,shiftPos.xyz*ns.z).x * 0.3;
noiseval += noiseval3;
float interp = (noiseval - grass_threshold + spread)/2/spread+0.5;
interp = clamp(interp,0,1);
float3 grassColor = tex2D(grassSamp, NormalUV).xyz;
float3 dirt = tex2D(NormalSamp,NormalUV).xyz ;
float3 grassNorm = tex2D(GrassNormalSamp,NormalUV).xyz;
float3 dirtNorm = float3(0.5,0.5,1);
float3 tNorm = lerp(grassNorm, dirtNorm, interp) - 0.5;
float3 aWorldBinormal = cross(IN.WorldNormal , IN.WorldTangent);
float3 NnBump = normalize(tNorm.x*IN.WorldTangent + tNorm.y*aWorldBinormal + tNorm.z*IN.WorldNormal);
float fade = 1.5-abs(zdist);
if (fade < 0.0)
fade = 0.0;
float3 dColor;
dColor = lerp(grassColor+IN.Color.xyz-float3(0.31,0.43,0.146), dirt, interp*fade);
float3 diffContrib;
float3 specContrib;
//Fade out the shader
ps_shared_lighting(dColor, NnBump, IN.WorldView, IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color, AmbiColor, Ks, SpecExpon, diffContrib, specContrib);
float3 result = lerp(diffContrib, studShade.xyz, studShade.w) + specContrib;
return float4(result,1);
}

View File

@ -0,0 +1,173 @@
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
struct appdataTangent {
float3 Position : POSITION;
float4 IceColor : COLOR;
float2 ModelUV : TEXCOORD0;
float3 IcePos : TEXCOORD1;
float2 SurfaceUV: TEXCOORD2;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct iceVertexOutput {
float4 HPosition : POSITION;
float4 IceColor : COLOR;
float4 ModelUV : TEXCOORD0;
float4 IcePos : TEXCOORD1; // coord w is attenuation 0 = no normal map, 1 = full normal map
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldView : TEXCOORD7;
float4 ObjectNormal : TEXCOORD6;
float3 ActualPos : COLOR1;
};
/*********** vertex shader ******/
iceVertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos
) {
iceVertexOutput OUT = (iceVertexOutput)0;
float3 aWorldBinormal = cross(OUT.WorldNormal, OUT.WorldTangent);
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
aWorldBinormal);
OUT.IcePos = float4(IN.Position, 0);
OUT.ModelUV = float4(IN.ModelUV, IN.SurfaceUV);
OUT.IceColor = IN.IceColor;
OUT.ObjectNormal = float4(IN.Normal,1);
OUT.ObjectNormal.w = mul(WvpXf,float4(IN.Position,1)).z;
OUT.ActualPos = IN.IcePos;
OUT.IcePos.w = IN.IcePos.x;
float cfactor = 0.980066578; //cos(0.2);
float sfactor = 0.198669331; //sin(0.2);
float cfactor2 = 0.955336489; //cos(0.3);
float sfactor2 = 0.295520207; //sin(0.3);
float cfactor3 = 0.921060994; //cos(0.4);
float sfactor3 = 0.389418342; //sin(0.4);
float3 p = IN.IcePos;
float3 shiftPos = p;
shiftPos.x += p.x * cfactor + p.z * sfactor;
shiftPos.z += p.x * -sfactor + p.z * cfactor;
shiftPos.x += p.x * cfactor2 - p.y * sfactor2;
shiftPos.y += p.x * sfactor2 + p.y * cfactor2;
shiftPos.y += p.y * cfactor3 - p.z * sfactor3;
shiftPos.z += p.y * sfactor3 + p.z * cfactor3;
OUT.IcePos = float4(shiftPos,0);
return OUT;
}
/********* pixel shader ********/
float4 icePSStuds(iceVertexOutput IN,
uniform float Ks,
uniform float SpecExpon,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float NoiseScale,
uniform float NormMapScale,
uniform sampler2D StudsSamp,
uniform sampler3D NoiseSamp,
uniform sampler2D NormalSamp,
uniform samplerCUBE EnvSampler,
uniform float Kr,
uniform float FresnelVal
) : COLOR
{
float4 studShade = tex2D(StudsSamp, IN.ModelUV.xy);
float fade = 1-abs(IN.ObjectNormal.w/260);
if(fade < 0)
fade = 0;
float2 NormalUV = IN.ModelUV.zw * NormMapScale;
//float2 NormalUV2 = NormalUV * 0.2; // different scale
float3 shiftPos = IN.IcePos;
// low frequency
float3 noiseval = tex3D(NoiseSamp,shiftPos.xyz/NoiseScale*0.1).xyz;
float3 noiseval2 = tex3D(NoiseSamp,shiftPos.xyz/NoiseScale*0.5).xyz * 0.7 + 0.5;
noiseval *= noiseval2;
noiseval = 0.3 + noiseval * 0.7;
float3 dColor = IN.IceColor.xyz + fade*(noiseval*0.5 - 0.3);
float3 tNorm = tex2D(NormalSamp,NormalUV).xyz - float3(0.5,0.5,0.5);
//float3 tNorm2 = tex2D(NormalSamp, NormalUV2).xyz - float3(0.5, 0.5, 0.5);
//tNorm = lerp(tNorm, tNorm2, 0.4);
float tNormSum = 0.85+0.15*(tNorm.x + tNorm.y + tNorm.z);
dColor *= ((1-fade) + (fade*tNormSum));
float3 aWorldBinormal = cross(IN.WorldTangent, IN.WorldNormal);
float3 NnBump = normalize(tNorm.x*IN.WorldTangent -
tNorm.y*aWorldBinormal +
tNorm.z*IN.WorldNormal);
NnBump *= fade;
Ks *= fade;
float3 Nn = normalize(lerp(NnBump, IN.WorldNormal, 0.85 ));
float3 diffContrib;
float3 specContrib;
float3 reflContrib;
ps_shared_lighting_env(dColor, Nn, IN.WorldView,
IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon,
Kr,
diffContrib,
specContrib,
EnvSampler,
reflContrib);
float3 result = lerp(diffContrib, studShade.xyz, studShade.w) + specContrib;
result += (FresnelVal*reflContrib) * fade;
return float4(result, 1);
}

View File

@ -0,0 +1,248 @@
//////// CONNECTOR DATA STRUCTURES ///////////
/* data from application vertex buffer */
struct appdata {
float3 Position : POSITION;
float4 Color : COLOR;
float4 ModelUV : TEXCOORD0;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct vertexOutputPrecise {
float4 HPosition : POSITION;
float4 Color : COLOR;
float3 ModelUV : TEXCOORD0;
float4 TextureUVW : TEXCOORD1;
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldBinormal : TEXCOORD6;
float3 WorldView : TEXCOORD7;
};
struct vertexOutputSimple {
float4 HPosition : POSITION;
float4 DiffuseContrib : COLOR;
float3 ModelUV : TEXCOORD0;
float3 Light0Vec : TEXCOORD1;
float3 WorldNormal : TEXCOORD2;
float3 WorldView : TEXCOORD3;
float Fresnel : TEXCOORD4;
};
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
///////// VERTEX SHADING /////////////////////
/*********** Generic Vertex Shader ******/
vertexOutputSimple plastic_vp_simple(appdata IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float Kr,
uniform float FresnelMin,
uniform float FresnelExp,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor
) {
vertexOutputSimple OUT = (vertexOutputSimple)0;
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
IN.Color = float4(gSurfaceColor,1);
#endif
float3 diffuseContrib;
float3 ignore;
vs_shared_lighting_diffuse(
IN.Position,
IN.Normal,
IN.Tangent,
IN.Color.xyz,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
Lamp0Color,
Lamp1Color,
AmbiColor,
OUT.Light0Vec,
diffuseContrib,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
ignore,
ignore);
OUT.DiffuseContrib = float4(diffuseContrib, IN.Color.w); // keep input color alpha
OUT.ModelUV = IN.ModelUV.xyz;
#ifdef ENABLE_FRESNEL
float3 Nn = normalize(OUT.WorldNormal);
float3 Vn = normalize(OUT.WorldView);
float KrMin = (Kr * FresnelMin);
float InvFrExp = (1.0/FresnelExp);
OUT.Fresnel = lerp(Kr,KrMin,pow(abs(dot(Nn,Vn)),InvFrExp));
#else
OUT.Fresnel = Kr * FresnelMin * 2;
#endif
return OUT;
}
float4 plastic_fp_simple(vertexOutputSimple IN,
uniform float3 Lamp0Color,
uniform float Ks,
uniform float SpecExpon,
uniform float Kr,
uniform sampler2D StudsSampler,
uniform samplerCUBE EnvSampler
) : COLOR {
#ifdef ENABLE_STUDS
float4 StudShade = tex2D(StudsSampler, IN.ModelUV.xy);
#endif
float3 specContrib;
float3 reflContrib;
float3 result;
float3 fresnel = IN.Fresnel;
ps_shared_lighting_env_specularonly(
IN.WorldNormal, IN.WorldView, IN.Light0Vec,
Lamp0Color, // use lamp0Color as specular.
Ks, SpecExpon, Kr,
specContrib,
EnvSampler,
reflContrib);
#ifdef ENABLE_STUDS
result = lerp(IN.DiffuseContrib.xyz, StudShade.xyz, StudShade.w);
#else
result = IN.DiffuseContrib.xyz;
#endif
result += specContrib;
#ifdef ENABLE_REFLECTIONS
result += (fresnel*reflContrib);
#endif
return float4(result,1); //IN.DiffuseContrib.w); // copy alpha out.
}
vertexOutputPrecise plastic_vp_precise(appdata IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos) {
vertexOutputPrecise OUT = (vertexOutputPrecise)0;
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
OUT.WorldBinormal);
OUT.ModelUV = IN.ModelUV.xyz;
OUT.TextureUVW = float4(IN.Position.xyz, 0);
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
OUT.Color = float4(gSurfaceColor,1);
#else
OUT.Color = IN.Color;
#endif
return OUT;
}
///////// PIXEL SHADING //////////////////////
float3 rebase(float3 v, float3 xrow, float3 yrow, float3 zrow)
{
//todo: faster? put in matrix, then mul? or just mul?
return v.x*xrow + // normal mapping had this at -, why?
v.y*yrow +
v.z*zrow;
}
float4 plastic_fp_precise(vertexOutputPrecise IN,
uniform float Ks,
uniform float SpecExpon,
uniform float Kr,
uniform float FresnelMin,
uniform float FresnelExp,
uniform sampler2D StudsSampler,
uniform samplerCUBE EnvSampler,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor
) : COLOR {
#ifdef ENABLE_STUDS
float4 StudShade = tex2D(StudsSampler, IN.ModelUV.xy);
#endif
float3 diffContrib;
float3 specContrib;
float3 reflContrib;
float3 result;
#ifdef ENABLE_FRESNEL
float3 Nn = normalize(IN.WorldNormal);
float3 Vn = normalize(IN.WorldView);
float KrMin = (Kr * FresnelMin);
float InvFrExp = (1.0/FresnelExp);
float fresnel = lerp(Kr,KrMin,pow(abs(dot(Nn,Vn)),InvFrExp));
#else
float fresnel = FresnelMin*Kr;
#endif
ps_shared_lighting_env(IN.Color.xyz,
IN.WorldNormal, IN.WorldView, IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon, Kr,
diffContrib,specContrib
,EnvSampler
,reflContrib
);
#ifdef ENABLE_STUDS
result = lerp(diffContrib, StudShade.xyz, StudShade.w);
#else
result = diffContrib;
#endif
result += specContrib;
#ifdef ENABLE_REFLECTIONS
result += (fresnel*reflContrib);
#endif
return float4(result,1);
}

View File

@ -0,0 +1,175 @@
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
/* data from application vertex buffer */
struct appdataTangent {
float3 Position : POSITION;
float4 Color : COLOR;
float2 StudsUV : TEXCOORD0;
float4 TexPos3D : TEXCOORD1;
float2 SurfaceUV: TEXCOORD2;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct VertexOutput {
float4 HPosition : POSITION;
float4 Color : COLOR;
float4 ModelUV : TEXCOORD0;
float4 TexPos3D : TEXCOORD1; // grain coordinate system
// coord w is attenuation 0 = no normal map, 1 = full normal map
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldView : TEXCOORD7;
float4 ObjectNormal : TEXCOORD6;
};
/*********** vertex shader ******/
VertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float NormMapScale)
{
VertexOutput OUT = (VertexOutput)0;
float3 unusedBinormal;
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
unusedBinormal);
//
// This shader uses the object coordinates to determine the rust-grain
// coordinate system at shader runtime. Alternatively, you could bake
// the coordinate system into the model as an alternative texcoord. The
// current method applies to all possible models, while baking-in lets
// you try different tricks such as modeling the grain of bent ,
// say for a bow or for the hull timbers of a ship.
//
//
// This shader uses the object coordinates to determine the grass-grain
// coordinate system at shader runtime. Alternatively, you could bake
// the coordinate system into the model as an alternative texcoord. The
// current method applies to all possible models, while baking-in lets
// you try different tricks such as modeling the grain of bent ,
// say for a bow or for the hull timbers of a ship.
//
float cfactor = 0.980066578; //cos(0.2);
float sfactor = 0.198669331; //sin(0.2);
float cfactor2 = 0.955336489; //cos(0.3);
float sfactor2 = 0.295520207; //sin(0.3);
float cfactor3 = 0.921060994; //cos(0.4);
float sfactor3 = 0.389418342; //sin(0.4);
float3 p = IN.TexPos3D.xyz;
float3 shiftPos = p;
shiftPos.x += p.x * cfactor + p.z * sfactor;
shiftPos.z += p.x * -sfactor + p.z * cfactor;
shiftPos.x += p.x * cfactor2 - p.y * sfactor2;
shiftPos.y += p.x * sfactor2 + p.y * cfactor2;
shiftPos.y += p.y * cfactor3 - p.z * sfactor3;
shiftPos.z += p.y * sfactor3 + p.z * cfactor3;
OUT.TexPos3D = float4(shiftPos,IN.TexPos3D.w);
OUT.ModelUV = float4(IN.StudsUV, IN.SurfaceUV* NormMapScale); // passthrough model UVs.
OUT.Color = IN.Color;
OUT.ObjectNormal = float4(IN.Normal,1);
OUT.ObjectNormal.w = mul(WvpXf,float4(IN.Position,1)).z/200;
OUT.ObjectNormal.xyz = normalize(OUT.ObjectNormal.xyz);
return OUT;
}
/********* pixel shader ********/
float4 mainPSStuds(VertexOutput IN, uniform float3 Contrast,
uniform float Ks, uniform float SpecExpon,
uniform float3 Lamp0Color, uniform float3 Lamp1Color, uniform float3 AmbiColor,
uniform float3 NoiseScale,
uniform sampler2D StudsSamp, uniform sampler3D NoiseSamp,
uniform sampler2D NormalSamp, uniform sampler2D RustSamp) : COLOR
{
float3 oo = IN.ObjectNormal.xyz;
float4 studShade = tex2D(StudsSamp, IN.ModelUV.xy);
float zdist = IN.ObjectNormal.w;
float spread = 0.3;
float rust_threshold = 0.8;
float NormalRatio = 0.15;
float2 NormalUV = IN.ModelUV.zw;
float3 shiftPos = IN.TexPos3D.xyz;
float3 ns =NoiseScale;
float noiseval = tex3D(NoiseSamp,shiftPos.xyz*ns.x).x * 0.5;
float noiseval2 = tex3D(NoiseSamp,shiftPos.zyx*ns.y).x * 0.3;
float noiseval3 = tex3D(NoiseSamp,shiftPos.zyx*ns.z).x * 0.2;
noiseval += noiseval2+noiseval3;
float3 metalColor = IN.Color.xyz*1.3 + Contrast * (noiseval-0.5);
float3 rustColor = tex2D(RustSamp, float2(IN.TexPos3D.w,1-noiseval)).xyz;
float3 tNorm = tex2D(NormalSamp,NormalUV).xyz - float3(0.5,0.5,0.5);
float tNormSum = 0.65+0.35*(tNorm.x + tNorm.y + tNorm.z);
float3 aWorldBinormal = cross(IN.WorldNormal, IN.WorldTangent);
float3 NnBump = normalize(tNorm.x*IN.WorldTangent + tNorm.y*aWorldBinormal + tNorm.z*IN.WorldNormal);
//Interpolate values between rust and metal
float interp = (noiseval - rust_threshold + spread)/2/spread+0.5;
interp = clamp(interp,0,1);
Ks *= lerp(1,5, interp);
NnBump = lerp(NnBump, IN.WorldNormal, interp-0.4);
float3 dColor = lerp(rustColor, metalColor,interp);
float3 dColor2 = dColor * tNormSum;
dColor = lerp(dColor, dColor2, interp);
//SpecExpon=SpecExpon*lerp(1, 2, interp);
float3 Nn = normalize(lerp(NnBump, IN.WorldNormal, interp));
float3 diffContrib;
float3 specContrib;
//Fade out the shader
float fade = 1-abs(zdist);
if(fade < 0)
fade = 0;
dColor = lerp(IN.Color.xyz, dColor, fade);
//Nn = lerp(IN.WorldNormal, Nn, fade);
ps_shared_lighting(dColor, Nn, IN.WorldView, IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color, AmbiColor, Ks, SpecExpon, diffContrib, specContrib);
float3 result = lerp(diffContrib, studShade.xyz, studShade.w) + specContrib;
return float4(result,1);
}

View File

@ -0,0 +1,157 @@
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
struct appdataTangent {
float3 Position : POSITION;
float4 SlateColor : COLOR;
float2 ModelUV : TEXCOORD0;
float3 SlatePos : TEXCOORD1;
float2 SurfaceUV: TEXCOORD2;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct slateVertexOutput {
float4 HPosition : POSITION;
float4 SlateColor : COLOR;
float4 ModelUV : TEXCOORD0;
float4 SlatePos : TEXCOORD1; // wood grain coordinate system
// coord w is attenuation 0 = no normal map, 1 = full normal map
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldView : TEXCOORD7;
float4 ObjectNormal : TEXCOORD6;
float3 ActualPos : COLOR1;
};
/*********** vertex shader ******/
slateVertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos
) {
slateVertexOutput OUT = (slateVertexOutput)0;
float3 aWorldBinormal = cross(OUT.WorldNormal, OUT.WorldTangent);
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
aWorldBinormal);
OUT.SlatePos = float4(IN.Position, 0);
OUT.ModelUV = float4(IN.ModelUV, IN.SurfaceUV);
OUT.SlateColor = IN.SlateColor;
OUT.ObjectNormal = float4(IN.Normal,1);
OUT.ObjectNormal.w = mul(WvpXf,float4(IN.Position,1)).z;
OUT.ActualPos = IN.SlatePos;
OUT.SlatePos.w = IN.SlatePos.x;
float cfactor = 0.980066578; //cos(0.2);
float sfactor = 0.198669331; //sin(0.2);
float cfactor2 = 0.955336489; //cos(0.3);
float sfactor2 = 0.295520207; //sin(0.3);
float cfactor3 = 0.921060994; //cos(0.4);
float sfactor3 = 0.389418342; //sin(0.4);
float3 p = IN.SlatePos;
float3 shiftPos = p;
shiftPos.x += p.x * cfactor + p.z * sfactor;
shiftPos.z += p.x * -sfactor + p.z * cfactor;
shiftPos.x += p.x * cfactor2 - p.y * sfactor2;
shiftPos.y += p.x * sfactor2 + p.y * cfactor2;
shiftPos.y += p.y * cfactor3 - p.z * sfactor3;
shiftPos.z += p.y * sfactor3 + p.z * cfactor3;
OUT.SlatePos = float4(shiftPos,0);
return OUT;
}
/********* pixel shader ********/
float4 slatePSStuds(slateVertexOutput IN,
uniform float Ks,
uniform float SpecExpon,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float NoiseScale,
uniform float NormMapScale,
uniform sampler2D StudsSamp,
uniform sampler3D NoiseSamp,
uniform sampler2D NormalSamp) : COLOR
{
float4 studShade = tex2D(StudsSamp, IN.ModelUV.xy);
float fade = 1-abs(IN.ObjectNormal.w/290);
if(fade < 0)
fade = 0;
float2 NormalUV = IN.ModelUV.zw* NormMapScale;
float3 shiftPos = IN.SlatePos;
float3 noiseval = tex3D(NoiseSamp,shiftPos.xyz/NoiseScale*0.04).xyz;
float3 noiseval2 = tex3D(NoiseSamp,shiftPos.xyz/NoiseScale*0.3).xyz + 0.2;
noiseval *= noiseval2;
float3 dColor = IN.SlateColor.xyz + 0.8* fade*(noiseval*0.5 - 0.1);
float3 tNorm = tex2D(NormalSamp,NormalUV).xyz - float3(0.5,0.5,0.5);
float tNormSum = 0.9+0.4*(tNorm.x + tNorm.y + tNorm.z);
dColor *= ((1-fade) + (fade*tNormSum));
float3 aWorldBinormal = cross(IN.WorldTangent, IN.WorldNormal);
float3 NnBump = normalize(tNorm.x*IN.WorldTangent -
tNorm.y*aWorldBinormal +
tNorm.z*IN.WorldNormal);
NnBump *= fade;
float3 Nn = normalize(lerp(NnBump, IN.WorldNormal, 0.9 ));
float3 diffContrib;
float3 specContrib;
ps_shared_lighting(dColor, Nn, IN.WorldView,
IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon,
diffContrib,
specContrib);
float3 result = lerp(diffContrib, studShade.xyz, studShade.w) + specContrib;
return float4(result, 1);
}

View File

@ -0,0 +1,343 @@
//////// CONNECTOR DATA STRUCTURES ///////////
/* data from application vertex buffer */
struct appdata {
float3 Position : POSITION;
float4 Color : COLOR;
float2 StudsUV : TEXCOORD0; // would mix Studs and Surface into one float4, but would not fallback to Fixed Function well.
float2 SurfaceUV: TEXCOORD1;
float4 EdgeUV : TEXCOORD2;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0; // should be same as TANGENT1
};
struct vertexOutputSimple {
float4 HPosition : POSITION;
float4 Color : COLOR;
float4 StudsUV : TEXCOORD0; // upper 2 coords is SurfaceUV
float4 EdgeUV : TEXCOORD1;
float3 DiffuseLighting : TEXCOORD2;
float3 Light0Vec : TEXCOORD3; // specular in ps.
float3 WorldNormal : TEXCOORD4;
float3 WorldView : TEXCOORD5;
};
/* data passed from vertex shader to pixel shader */
struct vertexOutputBump {
float4 HPosition : POSITION;
float4 Color : COLOR;
float4 StudsUV : TEXCOORD0; // upper 2 coords is SurfaceUV
float4 EdgeUV : TEXCOORD1;
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldBinormal : TEXCOORD6;
float3 WorldView : TEXCOORD7;
};
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
///////// VERTEX SHADING /////////////////////
// adjust border tiling so that it tiles on integer increments.
float4 calculateEdgeTexFreqencyAdjustments(float4 edgeUV, float2 borderFreq)
{
float4 borderEdgeUV = edgeUV * borderFreq.xyxy;
float2 wh = borderEdgeUV.xy - borderEdgeUV.zw;
float2 integerAdjust = max(round(wh), float2(0.5,0.5)) / wh ; // make sure we never round to zero
return borderEdgeUV * integerAdjust.xyxy;
}
/*********** Generic Vertex Shader ******/
vertexOutputSimple tiling_vp_simple(appdata IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float4 BorderAndTileFreq
) {
vertexOutputSimple OUT = (vertexOutputSimple)0;
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
IN.Color = float4(gSurfaceColor,1);
#endif
float3 diffuseContrib;
float3 ignore;
vs_shared_lighting_diffuse(
IN.Position,
IN.Normal,
IN.Tangent,
float3(1,1,1), // we want to mix in material diffuse later.
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
Lamp0Color,
Lamp1Color,
AmbiColor,
OUT.Light0Vec,
diffuseContrib,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
ignore,
ignore);
#ifdef FXCOMPOSER_VERSION
IN.Color = float4(gSurfaceColor, 1);
IN.EdgeUV = float4(IN.Position.xy + float2(1, 2), IN.Position.xy - float2(1, 2)); // kludgy and incorrect, but we dont' have the data.
IN.SurfaceUV = IN.EdgeUV.xy;
#endif
OUT.Color = IN.Color;
OUT.DiffuseLighting = diffuseContrib;
OUT.StudsUV.xy = IN.StudsUV;
OUT.StudsUV.zw = IN.SurfaceUV * BorderAndTileFreq.zw;
OUT.EdgeUV = calculateEdgeTexFreqencyAdjustments(IN.EdgeUV, BorderAndTileFreq.xy);
return OUT;
}
vertexOutputBump tiling_vp_bump(appdata IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float4 BorderAndTileFreq
) {
vertexOutputBump OUT = (vertexOutputBump)0;
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
OUT.WorldBinormal);
#ifdef FXCOMPOSER_VERSION
IN.Color = float4(gSurfaceColor, 1);
IN.EdgeUV = float4(IN.Position.xy + float2(1, 2), IN.Position.xy - float2(1, 2)); // kludgy and incorrect, but we dont' have the data.
IN.SurfaceUV = IN.EdgeUV.xy;
#endif
OUT.Color = IN.Color;
OUT.StudsUV.xy = IN.StudsUV;
OUT.StudsUV.zw = IN.SurfaceUV * BorderAndTileFreq.zw;
OUT.EdgeUV = calculateEdgeTexFreqencyAdjustments(IN.EdgeUV, BorderAndTileFreq.xy);
return OUT;
}
float2 extractBorderTex(float4 muv, /*really muv_div_tilefreq*/
uniform float2 tilefreq,
uniform float2 bwidth_div_tilefreq)
{
float2 abs;
float2 s;
if(muv.x <= -muv.z)
{
s.x = 1;
abs.x = muv.x;
}
else
{
s.x = -1;
abs.x = -muv.z;
}
if(muv.y <= -muv.w)
{
s.y = 1;
abs.y = muv.y;
}
else
{
s.y = -1;
abs.y = -muv.w;
}
float2 absvmod = bwidth_div_tilefreq + frac(abs- bwidth_div_tilefreq );
if(abs.x> bwidth_div_tilefreq.x)
{
abs.x = absvmod.x;
}
if(abs.y > bwidth_div_tilefreq.x)
{
abs.y = absvmod.y;
}
return abs * s *tilefreq;
}
float3 sampleTileAndBorder(
float2 tileuv,
float4 edgeuv,
uniform sampler2D TileSampler,
uniform sampler2D BorderSampler)
{
float3 tilecolor = tex2D(TileSampler, tileuv).xyz;
float4 bordercolor = tex2D(BorderSampler, edgeuv.xy);
float2 offsetcoord = edgeuv.xy;
// x is edgedist, y is lenght along edge.
float2 edgedist = min(edgeuv.xy, - edgeuv.zw);
if(edgedist.x > edgedist.y)
{
edgedist = edgedist.yx;
offsetcoord.x += 0.5;
}
else
{
offsetcoord.y += 0.5;
}
float4 bordercoloroffset = tex2D(BorderSampler, offsetcoord);
if(((int)(edgedist.y*2 -0.5)) %2 == 1)
{
bordercolor = bordercoloroffset;
}
if(edgedist.x > 0.5)
{
bordercolor.w = 0.0; // make transparent;
}
return lerp(tilecolor.xyz, bordercolor.xyz, bordercolor.w);
}
float4 tiling_fp_simple_nospecular(vertexOutputSimple IN,
uniform float3 Lamp0Color,
uniform sampler2D StudsSampler,
uniform sampler2D TileSampler,
uniform sampler2D BorderSampler
) : COLOR {
#ifdef ENABLE_STUDS
float4 StudShade = tex2D(StudsSampler, IN.StudsUV.xy);
#endif
float3 specContrib;
float3 result;
float2 tileuv = IN.StudsUV.zw;
ps_shared_lighting_specularonly(
IN.WorldNormal, IN.WorldView, IN.Light0Vec,
Lamp0Color, // use lamp0Color as specular.
Ks, SpecExpon,
specContrib);
float3 composit = sampleTileAndBorder(tileuv, IN.EdgeUV, TileSampler, BorderSampler) - float3(0.5,0.5,0.5);
result = (composit.xxx + /* should be add? */ IN.Color.xyz) * IN.DiffuseLighting;
#ifdef ENABLE_STUDS
result = lerp(result, StudShade.xyz, StudShade.w);
#endif
result += specContrib;
return float4(result,1); //IN.DiffuseContrib.w); // copy alpha out.
}
float4 tiling_fp_simple(vertexOutputSimple IN,
uniform float3 Lamp0Color,
uniform float Ks,
uniform float SpecExpon,
uniform sampler2D StudsSampler,
uniform sampler2D TileSampler,
uniform sampler2D BorderSampler
) : COLOR {
#ifdef ENABLE_STUDS
float4 StudShade = tex2D(StudsSampler, IN.StudsUV.xy);
#endif
float3 specContrib;
float3 result;
float2 tileuv = IN.StudsUV.zw;
ps_shared_lighting_specularonly(
IN.WorldNormal, IN.WorldView, IN.Light0Vec,
Lamp0Color, // use lamp0Color as specular.
Ks, SpecExpon,
specContrib);
float3 composit = sampleTileAndBorder(tileuv, IN.EdgeUV, TileSampler, BorderSampler) - float3(0.5,0.5,0.5);
result = (composit.xxx + /* should be add? */ IN.Color.xyz) * IN.DiffuseLighting;
#ifdef ENABLE_STUDS
result = lerp(result, StudShade.xyz, StudShade.w);
#endif
result += specContrib;
return float4(result,1); //IN.DiffuseContrib.w); // copy alpha out.
}
float4 tiling_fp_bump(vertexOutputBump IN,
uniform float Ks,
uniform float SpecExpon,
uniform sampler2D StudsSampler,
uniform sampler2D TileSampler,
uniform sampler2D BorderSampler,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor
) : COLOR {
#ifdef ENABLE_STUDS
float4 StudShade = tex2D(StudsSampler, IN.StudsUV.xy);
#endif
float2 tileuv = IN.StudsUV.zw;
float3 diffContrib;
float3 specContrib;
float3 result;
float3 composit = (sampleTileAndBorder(tileuv, IN.EdgeUV, TileSampler, BorderSampler) - float3(0.5,0.5,0.5)) * float3(1, 2, 2);
float3 indiffuse = composit.xxx + IN.Color.xyz;
float3 normal = IN.WorldNormal + IN.WorldTangent * composit.y + IN.WorldBinormal * composit.z;
ps_shared_lighting(indiffuse,
normal, IN.WorldView, IN.Light0Vec, IN.Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon,
diffContrib,specContrib
);
#ifdef ENABLE_STUDS
result = lerp(diffContrib, StudShade.xyz, StudShade.w);
#else
result = diffContrib;
#endif
result += specContrib;
return float4(result,1);
}

View File

@ -0,0 +1,309 @@
#ifdef FXCOMPOSER_VERSION // in fxcompser editor
#include "include/common.cgh"
#else
#include "common.cgh"
#endif
/************* DATA STRUCTS **************/
/* data from application vertex buffer */
struct appdataTxf {
float3 Position : POSITION;
float4 ModelUV : TEXCOORD0;
float3 Normal : NORMAL;
};
struct appdataTangent {
float3 Position : POSITION;
float4 WoodColor : COLOR;
float4 ModelUV : TEXCOORD0;
float3 WoodPos : TEXCOORD1;
float3 Normal : NORMAL;
float3 Tangent : TANGENT0;
};
/* data passed from vertex shader to pixel shader */
struct woodVertexOutput {
float4 HPosition : POSITION;
float4 WoodColor : COLOR;
float4 ModelUV : TEXCOORD0;
float4 WoodPos : TEXCOORD1; // wood grain coordinate system
// coord w is attenuation 0 = no normal map, 1 = full normal map
float3 Light0Vec : TEXCOORD2;
float3 Light1Vec : TEXCOORD3;
float3 WorldNormal : TEXCOORD4;
float3 WorldTangent : TEXCOORD5;
float3 WorldBinormal: TEXCOORD6;
float3 WorldView : TEXCOORD7;
};
/*********** vertex shader ******/
woodVertexOutput mainVS(appdataTangent IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float NormalMapAttnExp,
uniform float3 NormalMapAttnVec // set to TextureXf[0].xyz
) {
woodVertexOutput OUT = (woodVertexOutput)0;
// same as:
//float4 texsingularity = float4(normalize(mul(float4(1,0,0,0), TextureXf).xyz), 0);
//float4 texsingularity = normalize(float4(TextureXf[0].xyz, 0));
float NormalMapAttenuation = saturate( pow(abs(dot(NormalMapAttnVec, IN.Normal)), NormalMapAttnExp));
vs_shared_lighting(
IN.Position,
IN.Normal,
IN.Tangent,
WorldITXf, // our four standard "untweakable" xforms
WorldXf,
ViewIXf,
WvpXf,
Lamp0Pos,
Lamp1Pos,
OUT.Light0Vec,
OUT.Light1Vec,
OUT.WorldView,
OUT.HPosition,
OUT.WorldNormal,
OUT.WorldTangent,
OUT.WorldBinormal);
//
// This shader uses the object coordinates to determine the wood-grain
// coordinate system at shader runtime. Alternatively, you could bake
// the coordinate system into the model as an alternative texcoord. The
// current method applies to all possible models, while baking-in lets
// you try different tricks such as modeling the grain of bent wood,
// say for a bow or for the hull timbers of a ship.
//
OUT.WoodPos = float4(IN.WoodPos, NormalMapAttenuation); // wood grain coordinate system
OUT.ModelUV = IN.ModelUV; // passthrough model UVs.
OUT.WoodColor = IN.WoodColor;
return OUT;
}
woodVertexOutput mainVSTxf(appdataTxf IN,
uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
uniform float4x4 WorldXf,
uniform float4x4 ViewIXf,
uniform float4x4 WvpXf,
uniform float4 Lamp0Pos,
uniform float4 Lamp1Pos,
uniform float NormalMapAttnExp,
uniform float4x4 TextureXf,
uniform float3 WoodColor
) {
appdataTangent arg;
arg.Position = IN.Position;
arg.ModelUV = IN.ModelUV;
arg.Normal = IN.Normal;
arg.WoodColor = float4(WoodColor,1);
float3 ignore;
float4 Po = float4(IN.Position.xyz,1);
arg.WoodPos = mul(TextureXf,Po).xyz; // wood grain coordinate system
makeWorldTangentAndBinormalFromTextureXf(TextureXf, IN.Normal,
arg.Tangent,
ignore );
float3 NormalMapAttnVec = normalize(TextureXf[0].xyz);
return mainVS(arg, WorldITXf, WorldXf, ViewIXf, WvpXf, Lamp0Pos, Lamp1Pos, NormalMapAttnExp, NormalMapAttnVec);
}
/********* pixel shader ********/
float4 woodCore(
float4 HPosition,
float4 WoodColor,
float4 ModelUV,
float4 WoodPos, // wood grain coordinate system
float3 Light0Vec,
float3 Light1Vec,
float3 WorldNormal,
float3 WorldTangent,
float3 WorldBinormal,
float3 WorldView,
float4 StudShade,
uniform float3 WoodContrast,
uniform float Ks1,
uniform float Ks2,
uniform float SpecExpon,
uniform float RingScale,
uniform float AmpScale,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float LightRingEnd,
uniform float DarkRingStart,
uniform float DarkRingEnd,
uniform float MixedColorRatio,
uniform float AAFreqMultiplier,
uniform float NoiseScale,
uniform float NormMapScale,
uniform sampler3D NoiseSamp,
uniform sampler2D NormalSamp
)
{
float2 NormalUV = WoodPos.xy * NormMapScale;
float singularityAttenuation = WoodPos.w;
float3 noiseval = tex3D(NoiseSamp,WoodPos.xyz/NoiseScale).xyz;
float3 tNorm = tex2D(NormalSamp,NormalUV).xyz - float3(0.5,0.5,0.5);
// transform tNorm to world space
float3 NnBump = tNorm.x*WorldTangent -
tNorm.y*WorldBinormal +
tNorm.z*WorldNormal;
float3 NnNoBump = WorldNormal;
float3 Nn = normalize(lerp(NnBump, NnNoBump, singularityAttenuation));
float signalfreq = length(float4(ddx(WoodPos.y), ddx(WoodPos.z),
ddy(WoodPos.y), ddy(WoodPos.z)));
float aa_attn = saturate(signalfreq*AAFreqMultiplier - 1.0f);
float3 Pwood = WoodPos.xyz + (AmpScale * noiseval);
float r = RingScale * length(Pwood.yz);
r = r + tex3D(NoiseSamp,r.xxx/32.0).x;
r = r - floor(r);
r = smoothstep(LightRingEnd, DarkRingStart, r) - smoothstep(DarkRingEnd,1.0,r);
// apply anti-aliasing
r = lerp(r, MixedColorRatio, aa_attn);
float3 dColor = WoodColor.xyz + WoodContrast * (MixedColorRatio - r);
float Ks = lerp(Ks1,Ks2,r);
float3 diffContrib;
float3 specContrib;
ps_shared_lighting(dColor, Nn, WorldView,
Light0Vec, Light1Vec,
Lamp0Color, Lamp1Color,
AmbiColor,
Ks, SpecExpon,
diffContrib,
specContrib);
float3 result = lerp(diffContrib, StudShade.xyz, StudShade.w) + specContrib;
return float4(result, 1);
}
/********* pixel shader ********/
float4 woodPS(woodVertexOutput IN,
uniform float3 WoodContrast,
uniform float Ks1,
uniform float Ks2,
uniform float SpecExpon,
uniform float RingScale,
uniform float AmpScale,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float LightRingEnd,
uniform float DarkRingStart,
uniform float DarkRingEnd,
uniform float MixedColorRatio,
uniform float AAFreqMultiplier,
uniform float NoiseScale,
uniform float NormMapScale,
uniform sampler3D NoiseSamp,
uniform sampler2D NormalSamp
) : COLOR
{
return woodCore(IN.HPosition,
IN.WoodColor,
IN.ModelUV,
IN.WoodPos, // wood grain coordinate system
IN.Light0Vec,
IN.Light1Vec,
IN.WorldNormal,
IN.WorldTangent,
IN.WorldBinormal,
IN.WorldView,
float4(0,0,0,0),
WoodContrast,
Ks1,
Ks2,
SpecExpon,
RingScale,
AmpScale,
Lamp0Color,
Lamp1Color,
AmbiColor,
LightRingEnd,
DarkRingStart,
DarkRingEnd,
MixedColorRatio,
AAFreqMultiplier,
NoiseScale,
NormMapScale,
NoiseSamp,
NormalSamp);
}
float4 woodPSStuds(woodVertexOutput IN,
uniform float3 WoodContrast,
uniform float Ks1,
uniform float Ks2,
uniform float SpecExpon,
uniform float RingScale,
uniform float AmpScale,
uniform float3 Lamp0Color,
uniform float3 Lamp1Color,
uniform float3 AmbiColor,
uniform float LightRingEnd,
uniform float DarkRingStart,
uniform float DarkRingEnd,
uniform float MixedColorRatio,
uniform float AAFreqMultiplier,
uniform float NoiseScale,
uniform float NormMapScale,
uniform sampler2D StudsSamp,
uniform sampler3D NoiseSamp,
uniform sampler2D NormalSamp
) : COLOR
{
float4 studShade = tex2D(StudsSamp, IN.ModelUV.xy);
return woodCore(IN.HPosition,
IN.WoodColor,
IN.ModelUV,
IN.WoodPos, // wood grain coordinate system
IN.Light0Vec,
IN.Light1Vec,
IN.WorldNormal,
IN.WorldTangent,
IN.WorldBinormal,
IN.WorldView,
studShade,
WoodContrast,
Ks1,
Ks2,
SpecExpon,
RingScale,
AmpScale,
Lamp0Color,
Lamp1Color,
AmbiColor,
LightRingEnd,
DarkRingStart,
DarkRingEnd,
MixedColorRatio,
AAFreqMultiplier,
NoiseScale,
NormMapScale,
NoiseSamp,
NormalSamp);
}

View File

@ -0,0 +1,2 @@
#include "fonts/materials/programs/include/plastic.cgh"

View File

@ -0,0 +1,5 @@
#define ENABLE_STUDS
#define ENABLE_REFLECTIONS
#define ENABLE_FRESNEL
#include "fonts/materials/programs/include/plastic.cgh"

View File

@ -0,0 +1,3 @@
#define ENABLE_STUDS
#include "fonts/materials/programs/include/plastic.cgh"

View File

@ -0,0 +1,2 @@
#include "fonts/materials/programs/include/rust.cgh"

View File

@ -0,0 +1,2 @@
#include "fonts/materials/programs/include/slate.cgh"

View File

@ -0,0 +1,3 @@
#define ENABLE_STUDS
#include "fonts/materials/programs/include/tiling.cgh"

View File

@ -0,0 +1,2 @@
#include "fonts/materials/programs/include/wood.cgh"

View File

@ -0,0 +1,218 @@
vertex_program AluminumVP cg
{
source fonts/materials/programs/aluminum.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
}
}
fragment_program AluminumFP cg
{
source fonts/materials/programs/aluminum.cgfx
entry_point alumPSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Ks float 0.9
param_named SpecExpon float 25
param_named NormMapScale float 0.2
param_named Kr float 0.7
param_named FresnelVal float 0.6
}
}
vertex_program BasicVP cg
{
source fonts/materials/programs/include/common.cgh
profiles vs_1_1 arbvp1
entry_point basicVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
}
}
fragment_program BasicFP cg
{
source fonts/materials/programs/include/common.cgh
entry_point basicPSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
}
}
material Aluminum_Low
{
technique lod1
{
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Aluminum_Med : Aluminum_Low
{
lod_distances 320.0
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/AluminumFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.06 0 0 0 0 0.06 0 0 0 0 0.06 0 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/AluminumFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.06 0 0 0 0 0.06 0 0 0 0 0.06 0 0 0 0 1
}
}
}
}
material Aluminum_High : Aluminum_Low
{
lod_distances 320.0
technique Procedural_lod0
{
lod_index 0
pass
{
max_lights 2
vertex_program_ref AluminumVP
{
}
fragment_program_ref AluminumFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/Crinkled_Normal.dds
filtering trilinear
}
texture_unit
{
texture_alias SkyBox
tex_coord_set 2
texture textures/penv.dds cubic
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}

View File

@ -0,0 +1,85 @@
material Concrete_Low
{
technique lod1
{
pass
{
// set ambient and diffuse colors to Lerp(CompoundColor1, CompoundColor2, MixedColorRatio)
// set specular to Lerp(Ks1, Ks2, MixedColorRatio) SpecExpo
ambient vertexcolour
diffuse vertexcolour
specular 0.19 0.19 0.19 14
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Concrete_Med : Concrete_Low
{
lod_distances 160.0
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.19 0.19 0.19 14
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/ConcreteFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.18 0 0 0 0 0.18 0 0 0 0 0.18 0 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}
// Concrete High currently uses Concrete Medium fixed function, very fast
material Concrete_High : Concrete_Med
{
}

View File

@ -0,0 +1,166 @@
vertex_program DiamondPlateVP cg
{
source fonts/materials/programs/diamondplate.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
}
}
fragment_program DiamondPlateFP cg
{
source fonts/materials/programs/diamondplate.cgfx
entry_point dplatePSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Ks float 0.9
param_named SpecExpon float 25
param_named NormMapScale float 1.2
}
}
material DiamondPlate_Low
{
technique lod1
{
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material DiamondPlate_Med : DiamondPlate_Low
{
lod_distances 320.0
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/DiamondPlateFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.28 0 0 0 0 0.28 0 0 0 0 0.28 0 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
}
}
}
material DiamondPlate_High : DiamondPlate_Low
{
lod_distances 320.0
technique Procedural_lod0
{
lod_index 0
pass
{
max_lights 2
vertex_program_ref DiamondPlateVP
{
}
fragment_program_ref DiamondPlateFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/DPlate_Normal.dds
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}

View File

@ -0,0 +1,196 @@
vertex_program mainVP cg
{
source fonts/materials/programs/grass.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
param_named NormMapScale float 0.1
}
}
fragment_program mainFP cg
{
source fonts/materials/programs/grass.cgfx
entry_point mainPSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Ks float 0.1
param_named SpecExpon float 50
param_named NoiseScale float3 0.09 0.02 0.004
}
}
material Grass_Low
{
technique lod1
{
pass
{
// set ambient and diffuse colors to Lerp(WoodColor1, WoodColor2, MixedColorRatio)
// set specular to Lerp(Ks1, Ks2, MixedColorRatio) SpecExpo
ambient vertexcolour
diffuse vertexcolour
specular 0.1 0.1 0.1 50
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Grass_Med
{
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.1 0.1 0.1 50
// mimic current Grass shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/Grass_Texture_gray.jpg
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_current src_manual 1.0 1.0 1.0
transform 0.1 0 0 0 0 0.1 0 0 0 0 0 0.1 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Grass_High
{
lod_distances 320.0
technique Procedural_lod0
{
scheme Default
lod_index 0
pass
{
max_lights 2
vertex_program_ref mainVP
{
}
fragment_program_ref mainFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/noiseL8_32x32x32.dds 3d
filtering trilinear
tex_address_mode wrap wrap wrap
}
texture_unit
{
tex_coord_set 2
texture textures/Grass_Texture.jpg
filtering trilinear
}
texture_unit
{
tex_coord_set 3
texture textures/dirt.jpg
filtering trilinear
}
texture_unit
{
tex_coord_set 4
texture textures/Grass_Normal.dds
filtering trilinear
}
}
}
technique lod1
{
//high to med
lod_index 1
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.1 0.1 0.1 50
// mimic current Grass shader limitation
max_lights 2
texture_unit
{
tex_coord_set 2
texture textures/Grass_Texture_gray.jpg
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_current src_manual 1.0 1.0 1.0
transform 0.1 0 0 0 0 0.1 0 0 0 0 0 0.1 0 0 0 1
}
}
}
}

View File

@ -0,0 +1,198 @@
vertex_program IceVP cg
{
source fonts/materials/programs/ice.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
}
}
fragment_program IceFP cg
{
source fonts/materials/programs/ice.cgfx
entry_point icePSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Ks float 0.4
param_named SpecExpon float 25
param_named NormMapScale float 0.01
param_named NoiseScale float 7
param_named Kr float 0.55
param_named FresnelVal float 0.5
}
}
material Ice_Low
{
lod_distances 320.0
technique lod1
{
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Ice_Med
{
lod_distances 320.0
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/IceFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.06 0 0 0 0 0.06 0 0 0 0 0.06 0 0 0 0 1
//transform 0.01699672 0.1353425 -0.03733006 0 -0.1155417 -0.07062286 -0.04077413 0 0 0 0 0 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.0 0.0 0.0 25
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/IceFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.06 0 0 0 0 0.06 0 0 0 0 0.06 0 0 0 0 1
//transform 0.01699672 0.1353425 -0.03733006 0 -0.1155417 -0.07062286 -0.04077413 0 0 0 0 0 0 0 0 1
}
}
}
}
material Ice_High : Ice_Low
{
lod_distances 320.0
technique Procedural_lod0
{
scheme Default
lod_index 0
pass
{
max_lights 2
vertex_program_ref IceVP
{
}
fragment_program_ref IceFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/vol_ice_cracked2.dds 3d
filtering trilinear
}
texture_unit
{
tex_coord_set 2
texture textures/Sand_Normal.dds
filtering trilinear
}
texture_unit
{
texture_alias SkyBox
tex_coord_set 3
texture textures/penv.dds cubic
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}

View File

@ -0,0 +1,599 @@
vertex_program fonts/materials/programs/include/commonvp cg
{
source common.cfgx
}
fragment_program fonts/materials/programs/include/commonfp cg
{
source common.cfgx
}
vertex_program PlasticVP_med cg
{
source fonts/materials/programs/plastic_med.cgfx
profiles vs_1_1 arbvp1
entry_point plastic_vp_simple
default_params
{
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Kr float 0.35
param_named FresnelMin float 0.05
}
}
fragment_program PlasticFP_med cg
{
source fonts/materials/programs/plastic_med.cgfx
entry_point plastic_fp_simple
profiles ps_2_0 arbfp1
default_params
{
param_named_auto Lamp0Color light_diffuse_colour 0
param_named Ks float 0.75
param_named SpecExpon float 81
}
}
vertex_program PlasticVP_high cg
{
source fonts/materials/programs/plastic_high.cgfx
profiles vs_1_1 arbvp1
entry_point plastic_vp_simple
default_params
{
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Kr float 0.35
param_named FresnelMin float 0.05
param_named FresnelExp float 3.55
}
}
fragment_program PlasticFP_high cg
{
source fonts/materials/programs/plastic_high.cgfx
entry_point plastic_fp_simple
profiles ps_2_0 arbfp1
default_params
{
param_named_auto Lamp0Color light_diffuse_colour 0
param_named Ks float 0.75
param_named SpecExpon float 81
param_named Kr float 0.35
}
}
//todo: need a med and high quality studless once we decide to go with high fidelidty plastic.
material PlasticStudless
{
technique
{
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.9 0.9 0.9 50
}
}
}
material PlasticStudlessTransparent : PlasticStudless
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticStuds_Low : PlasticStudless
{
technique
{
pass
{
texture_unit
{
texture_alias StudsAlways
tex_coord_set 0
texture textures/SurfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Plastic_Low : PlasticStudless
{
technique
{
pass
{
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material PlasticStuds_Med : PlasticStudless
{
technique
{
pass
{
max_lights 2
vertex_program_ref PlasticVP_med
{
}
fragment_program_ref PlasticFP_med
{
}
texture_unit
{
texture_alias StudsAlways
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
}
}
}
material Plastic_Med : PlasticStudless
{
technique
{
pass
{
max_lights 2
vertex_program_ref PlasticVP_med
{
}
fragment_program_ref PlasticFP_med
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
}
}
}
material PlasticStuds_High : PlasticStudless
{
technique
{
lod_index 0
pass
{
max_lights 2
vertex_program_ref PlasticVP_high
{
}
fragment_program_ref PlasticFP_high
{
}
texture_unit
{
texture_alias StudsAlways
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
texture_alias SkyBox
tex_coord_set 1
texture textures/Dark_BW_reflection_Blur11.dds cubic
filtering trilinear
}
}
}
}
material Plastic_High : PlasticStudless
{
technique
{
lod_index 0
pass
{
max_lights 2
vertex_program_ref PlasticVP_high
{
}
fragment_program_ref PlasticFP_high
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
texture_alias SkyBox
tex_coord_set 1
texture textures/Dark_BW_reflection_Blur11.dds cubic
filtering trilinear
}
}
}
}
material PlasticTransparent_Low : Plastic_Low
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
texture_unit
{
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices.
alpha_op_ex source1 src_diffuse src_texture
}
}
}
}
material PlasticStudsTransparent_Low : PlasticStuds_Low
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
texture_unit
{
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices.
alpha_op_ex source1 src_diffuse src_texture
}
}
}
}
material PlasticTransparent_Med : Plastic_Med
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticStudsTransparent_Med : PlasticStuds_Med
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticTransparent_High : Plastic_High
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
material PlasticStudsTransparent_High : PlasticStuds_High
{
technique
{
pass
{
scene_blend alpha_blend
depth_write off
}
}
}
vertex_program WoodVP cg
{
source fonts/materials/programs/wood.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
param_named NormalMapAttnExp float 5.0
// NormalMapAttnVec must match mul(TextureXf, float4(1,0,0,0))
param_named NormalMapAttnVec float3 0.1699672 -2.625356E-08 -0.9854497
//Matrix.CreateFromYawPitchRoll((float)(1.4f), (float)Math.PI /3.0f, 0.0f)
//param_named TextureXf matrix4x4 0.1699672 -2.625356E-08 -0.9854497 0 0.8534244 0.5 0.1471959 0 0.4927248 -0.8660254 0.08498365 0 0 0 0 1
//param_named TextureXf matrix4x4 0.7316889 1.200554E-08 -0.6816387 0 0.4646314 0.7316889 0.4987475 0 0.4987475 -0.6816387 0.5353686 0 12 3 -4 1
//param_named TextureXf matrix4x4 0.3658444 6.002772E-09 -0.3408194 0 0.2323157 0.3658444 0.2493737 0 0.2493737 -0.3408194 0.2676843 0 12 3 -4 0.5
//param_named TextureXf matrix4x4 1.463378 2.401109E-08 -1.363277 0 0.9292628 1.463378 0.9974949 0 0.9974949 -1.363277 1.070737 0 12 3 -4 2
}
}
fragment_program WoodFP cg
{
source fonts/materials/programs/wood.cgfx
entry_point woodPSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named WoodContrast float3 0.1 0.1 0.1
param_named Ks1 float 0.32
param_named Ks2 float 0.16
param_named SpecExpon float 4
param_named RingScale float 4
param_named AmpScale float 1
param_named LightRingEnd float 0.4
param_named DarkRingStart float 0.8
param_named DarkRingEnd float 0.83
param_named NormMapScale float 0.6
param_named NoiseScale float 64
// always set to (1 - gLightRingEnd + gDarkRingEnd - gDarkRingBegin) /2
param_named MixedColorRatio float 0.315
param_named AAFreqMultiplier float 12
}
}
fragment_program WoodFPStudless cg
{
source fonts/materials/programs/wood.cgfx
entry_point woodPS
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named WoodContrast float3 0.1 0.1 0.1
param_named Ks1 float 0.32
param_named Ks2 float 0.16
param_named SpecExpon float 4
param_named RingScale float 4
param_named AmpScale float 1
param_named LightRingEnd float 0.4
param_named DarkRingStart float 0.8
param_named DarkRingEnd float 0.83
param_named NormMapScale float 0.6
param_named NoiseScale float 64
// always set to (1 - gLightRingEnd + gDarkRingEnd - gDarkRingBegin) /2
param_named MixedColorRatio float 0.315
param_named AAFreqMultiplier float 12
}
}
material Wood_Low
{
technique lod1
{
pass
{
// set ambient and diffuse colors to Lerp(WoodColor1, WoodColor2, MixedColorRatio)
// set specular to Lerp(Ks1, Ks2, MixedColorRatio) SpecExpo
ambient vertexcolour
diffuse vertexcolour
specular 0.2696 0.2696 0.2696 4
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Wood_Med : Wood_Low
{
lod_distances 200.0
// reserver a spot for proper fallback order in dervied Wood_High
technique Procedural_lod0
{
scheme Unused
}
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.2696 0.2696 0.2696 4
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/WoodFallback.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
//transform 0.025 0.025 0 0 -0.025 0 0.025 0 0 0 0 0 0 0 0 0
transform 0.01699672 0.1353425 -0.03733006 0 -0.1155417 -0.07062286 -0.04077413 0 0 0 0 0 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}
material Wood_High : Wood_Med
{
technique Procedural_lod0
{
scheme Default
lod_index 0
pass
{
max_lights 2
vertex_program_ref WoodVP
{
}
fragment_program_ref WoodFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/noiseL8_32x32x32.dds 3d
filtering trilinear
}
texture_unit
{
tex_coord_set 2
texture textures/HorizLines_normal.dds
filtering trilinear
}
}
}
technique LegacyFF_lod0
{
}
technique lod1
{
}
}

View File

@ -0,0 +1,170 @@
vertex_program RustVP cg
{
source fonts/materials/programs/rust.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
param_named NormMapScale float 0.15
}
}
fragment_program RustFP cg
{
source fonts/materials/programs/rust.cgfx
entry_point mainPSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Contrast float3 0.1 0.1 0.1
param_named Ks float 0.12
param_named SpecExpon float 70
param_named NoiseScale float3 0.02083 0.0693 0.2083
}
}
material Rust_Low
{
technique lod1
{
pass
{
// set ambient and diffuse colors to Lerp(WoodColor1, WoodColor2, MixedColorRatio)
// set specular to Lerp(Ks1, Ks2, MixedColorRatio) SpecExpo
ambient vertexcolour
diffuse vertexcolour
specular 0.12 0.12 0.12 70
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Rust_Med
{
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.12 0.12 0.12 70
// mimic current rust shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/rust_combined.png
filtering trilinear
colour_op alpha_blend
//Rotate(37)*Scale(0.0625)
transform 0.05 0.0376 0 0 -0.0376 0.05 0 0 0 0 0 0.0625 0 0 0 1
filtering trilinear
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Rust_High : Rust_Low
{
lod_distances 320.0
technique Procedural_lod0
{
lod_index 0
pass
{
max_lights 2
vertex_program_ref RustVP
{
}
fragment_program_ref RustFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/noiseL8_32x32x32.dds 3d
filtering trilinear
tex_address_mode wrap wrap wrap
}
texture_unit
{
tex_coord_set 2
texture textures/RustGradient.png
filtering trilinear
tex_address_mode clamp
}
texture_unit
{
tex_coord_set 3
texture textures/Sand_Normal.dds
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}

View File

@ -0,0 +1,182 @@
vertex_program SlateVP cg
{
source fonts/materials/programs/slate.cgfx
profiles vs_1_1 arbvp1
entry_point mainVS
default_params
{
param_named_auto Lamp0Pos light_position 0
param_named_auto Lamp1Pos light_position 1
param_named_auto WorldITXf inverse_transpose_world_matrix
param_named_auto WorldXf world_matrix
param_named_auto ViewIXf inverse_view_matrix
param_named_auto WvpXf worldviewproj_matrix
param_named_auto WorldXf world_matrix
}
}
fragment_program SlateFP cg
{
source fonts/materials/programs/slate.cgfx
entry_point slatePSStuds
profiles ps_2_x
default_params
{
param_named_auto AmbiColor ambient_light_colour
param_named_auto Lamp0Color light_diffuse_colour 0
param_named_auto Lamp1Color light_diffuse_colour 1
param_named Ks float 0.1
param_named SpecExpon float 40
param_named NormMapScale float 0.1
param_named NoiseScale float 7
}
}
material Slate_Low
{
technique lod1
{
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.1 0.1 0.1 40
// mimic current wood shader limitation
max_lights 2
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
}
material Slate_Med : Slate_Low
{
lod_distances 320.0
technique LegacyFF_lod0
{
lod_index 0
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.1 0.1 0.1 40
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/SlateTileMono.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.28 0 0 0 0 0.28 0 0 0 0 0.28 0 0 0 0 1
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/surfacesAlpha.png
colour_op alpha_blend
//ignore alpha from SurfaceAlpha.png. Use fixed alpha. VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1 1 1
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
pass
{
ambient vertexcolour
diffuse vertexcolour
specular 0.1 0.1 0.1 40
// mimic current wood shader limitation
max_lights 2
texture_unit
{
tex_coord_set 1
texture textures/SlateTileMono.png
filtering trilinear
colour_op_ex add_signed src_texture src_current
//ignore alpha from SurfaceAlpha.png. Use alpha from vertices (in this case, it is not set, so use manual 1.0). VERY IMPORTANT FOR OFF-SCREEN RENDERING!
alpha_op_ex source1 src_manual src_manual 1.0 1.0 1.0
transform 0.28 0 0 0 0 0.28 0 0 0 0 0.28 0 0 0 0 1
}
}
}
}
material Slate_High : Slate_Low
{
lod_distances 320.0
technique Procedural_lod0
{
scheme Default
lod_index 0
pass
{
max_lights 2
vertex_program_ref SlateVP
{
}
fragment_program_ref SlateFP
{
}
texture_unit
{
texture_alias Studs
tex_coord_set 0
texture textures/SurfacesAlpha.png
filtering trilinear
}
texture_unit
{
tex_coord_set 1
texture textures/vol_ice_cracked2.dds 3d
filtering trilinear
}
texture_unit
{
tex_coord_set 2
texture textures/SlateTile.dds
filtering trilinear
}
}
}
technique lod1
{
lod_index 1
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,529 @@
<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<utterance>Hello
<utterance>Hi
<utterance>Hi there!</utterance>
<utterance>Hi everyone</utterance>
</utterance>
<utterance>Howdy
<utterance>Howdy partner!</utterance>
</utterance>
<utterance>Greetings
<utterance>Greetings eveyone</utterance>
<utterance>Greetings robloxians!</utterance>
<utterance>Seaons greetings!</utterance>
</utterance>
<utterance>Welcome
<utterance>Welcome to my place</utterance>
<utterance>Welcome to our base</utterance>
<utterance>Welcome to my barbecque</utterance>
</utterance>
<utterance>Hey there!</utterance>
<utterance>What's up?
<utterance>How are you doing?</utterance>
<utterance>How's it going?</utterance>
<utterance>What's new?</utterance>
</utterance>
<utterance>Good day
<utterance>Good morning</utterance>
<utterance>Good afternoon</utterance>
<utterance>Good evening</utterance>
<utterance>Good night</utterance>
</utterance>
<utterance>Silly
<utterance>Waaaaaaaz up?!</utterance>
<utterance>Hullo!</utterance>
<utterance>Behold greatness, mortals!</utterance>
</utterance>
<utterance>Holidays
<utterance>Happy New Year!</utterance>
<utterance>Happy Valentine's Day!</utterance>
<utterance>Beware the Ides of March!</utterance>
<utterance>Happy Easter!</utterance>
<utterance>Happy 4th of July!</utterance>
<utterance>Happy Thanksgiving!</utterance>
<utterance>Happy Halloween!</utterance>
<utterance>Happy Hanukkah!</utterance>
<utterance>Merry Christmas!</utterance>
<utterance>Happy Holidays!</utterance>
</utterance>
</utterance>
<utterance>Goodbye
<utterance>Good Night
<utterance>Sweet dreams</utterance>
<utterance>Go to sleep!</utterance>
<utterance>Lights out!</utterance>
<utterance>Bedtime</utterance>
</utterance>
<utterance>Later
<utterance>See ya later</utterance>
<utterance>Later gator!</utterance>
<utterance>See you tomorrow</utterance>
</utterance>
<utterance>Bye
<utterance>Hasta la bye bye!</utterance>
</utterance>
<utterance>I'll be right back</utterance>
<utterance>I have to go</utterance>
<utterance>Farewell
<utterance>Take care</utterance>
<utterance>Have a nice day</utterance>
<utterance>Goodluck!</utterance>
<utterance>Ta-ta for now!</utterance>
</utterance>
<utterance>Peace
<utterance>Peace out!</utterance>
<utterance>Peace dudes!</utterance>
<utterance>Rest in pieces!</utterance>
</utterance>
<utterance>Silly
<utterance>To the batcave!</utterance>
<utterance>Over and out!</utterance>
<utterance>Happy trails!</utterance>
<utterance>I've got to book it!</utterance>
<utterance>Tootles!</utterance>
<utterance>Smell you later!</utterance>
<utterance>GG!</utterance>
<utterance>My house is on fire! gtg.</utterance>
</utterance>
</utterance>
<utterance>Friend
<utterance>Wanna be friends?</utterance>
<utterance>Follow me
<utterance>Come to my place!</utterance>
<utterance>Come to my base!</utterance>
<utterance>Follow me, team!</utterance>
</utterance>
<utterance>Your place is cool
<utterance>Your place is fun</utterance>
<utterance>Your place is awesome</utterance>
<utterance>Your place looks good</utterance>
</utterance>
<utterance>Thank you
<utterance>Thanks for playing</utterance>
<utterance>Thanks for visiting</utterance>
<utterance>Thanks for everything</utterance>
<utterance>No thank you</utterance>
</utterance>
<utterance>No problem
<utterance>Don't worry</utterance>
<utterance>That's ok</utterance>
</utterance>
<utterance>You are ...
<utterance>You are great!</utterance>
<utterance>You are good!</utterance>
<utterance>You are cool!</utterance>
<utterance>You are funny!</utterance>
<utterance>You are silly!</utterance>
<utterance>You are awesome!</utterance>
</utterance>
<utterance>I like ...
<utterance>I like your name</utterance>
<utterance>I like your shirt</utterance>
<utterance>I like your place</utterance>
<utterance>I like your style</utterance>
</utterance>
<utterance>Sorry
<utterance>My bad!</utterance>
<utterance>I'm sorry</utterance>
<utterance>Whoops!</utterance>
<utterance>Please forgive me</utterance>
<utterance>I forgive you</utterance>
</utterance>
</utterance>
<utterance>Questions
<utterance>Who?
<utterance>Who wants to be my friend?</utterance>
<utterance>Who wants to be on my team?</utterance>
<utterance>Who made this brilliant game?</utterance>
</utterance>
<utterance>What?
<utterance>What is your favorite animal?</utterance>
<utterance>What is your favorite game?</utterance>
<utterance>What is your favorite movie?</utterance>
<utterance>What is your favorite TV show?</utterance>
<utterance>What is your favorite music?</utterance>
<utterance>What are your hobbies?</utterance>
</utterance>
<utterance>When?
<utterance>When are you online?</utterance>
<utterance>When is the new version coming out?</utterance>
<utterance>When can we play again?</utterance>
<utterance>When will your place be done?</utterance>
</utterance>
<utterance>Where?
<utterance>Where do you want to go?</utterance>
<utterance>Where are you going?</utterance>
<utterance>Where am I?!</utterance>
</utterance>
<utterance>How?
<utterance>How are you today?</utterance>
<utterance>How did you make this cool place?</utterance>
</utterance>
<utterance>Can I...
<utterance>Can I have a tour?</utterance>
<utterance>Can I be on your team?</utterance>
<utterance>Can I be your friend?</utterance>
<utterance>Can I try something?</utterance>
</utterance>
</utterance>
<utterance>Answers
<utterance>You need help?
<utterance>Check out the news section</utterance>
<utterance>Check out the help section</utterance>
<utterance>Read the wiki!</utterance>
<utterance>All the answers are in the wiki!</utterance>
</utterance>
<utterance>Some people ...
<utterance>Me</utterance>
<utterance>Not me</utterance>
<utterance>You</utterance>
<utterance>All of us</utterance>
<utterance>Everyone but you</utterance>
<utterance>Builderman!</utterance>
<utterance>Telamon!</utterance>
</utterance>
<utterance>Time ...
<utterance>In the morning</utterance>
<utterance>In the afternoon</utterance>
<utterance>At night</utterance>
<utterance>Tomorrow</utterance>
<utterance>This week</utterance>
<utterance>This month</utterance>
<utterance>Sometime</utterance>
<utterance>Sometimes</utterance>
<utterance>Whenever you want</utterance>
<utterance>Never</utterance>
</utterance>
<utterance>Animals
<utterance>Cats
<utterance>Lion</utterance>
<utterance>Tiger</utterance>
<utterance>Leopard</utterance>
<utterance>Cheetah</utterance>
</utterance>
<utterance>Dogs
<utterance>Wolves</utterance>
<utterance>Beagle</utterance>
<utterance>Collie</utterance>
<utterance>Dalmatian</utterance>
<utterance>Poodle</utterance>
<utterance>Spaniel</utterance>
<utterance>Shepherd</utterance>
<utterance>Terrier</utterance>
<utterance>Retriever</utterance>
</utterance>
<utterance>Horses
<utterance>Ponies</utterance>
<utterance>Stallions</utterance>
</utterance>
<utterance>Reptiles
<utterance>Dinosaurs</utterance>
<utterance>Lizards</utterance>
<utterance>Snakes</utterance>
<utterance>Turtles!</utterance>
</utterance>
<utterance>Hamster</utterance>
<utterance>Monkey</utterance>
<utterance>Bears</utterance>
<utterance>Fish
<utterance>Goldfish</utterance>
<utterance>Sharks</utterance>
<utterance>Sea Bass</utterance>
<utterance>Halibut</utterance>
</utterance>
<utterance>Birds
<utterance>Eagles</utterance>
<utterance>Penguins</utterance>
<utterance>Turkeys</utterance>
</utterance>
<utterance>Elephants</utterance>
<utterance>Mythical Beasts
<utterance>Dragons</utterance>
<utterance>Unicorns</utterance>
<utterance>Sea Serpents</utterance>
<utterance>Sphinx</utterance>
<utterance>Cyclops</utterance>
<utterance>Minotaurs</utterance>
<utterance>Goblins</utterance>
<utterance>Honest Politicians</utterance>
<utterance>Ghosts</utterance>
<utterance>Scylla and Charybdis</utterance>
</utterance>
</utterance>
<utterance>Games
<utterance>Roblox
<utterance>BrickBattle</utterance>
<utterance>Community Building</utterance>
<utterance>Roblox Minigames</utterance>
</utterance>
<utterance>Action</utterance>
<utterance>Puzzle</utterance>
<utterance>Strategy</utterance>
<utterance>Racing</utterance>
<utterance>RPG</utterance>
<utterance>Board games
<utterance>Chess</utterance>
<utterance>Checkers</utterance>
<utterance>Settlers of Catan</utterance>
<utterance>Tigris and Euphrates</utterance>
<utterance>El Grande</utterance>
<utterance>Stratego</utterance>
<utterance>Carcassonne</utterance>
</utterance>
</utterance>
<utterance>Sports
<utterance>Hockey</utterance>
<utterance>Soccer</utterance>
<utterance>Football</utterance>
<utterance>Baseball</utterance>
<utterance>Basketball</utterance>
<utterance>Volleyball</utterance>
<utterance>Tennis</utterance>
<utterance>Watersports
<utterance>Surfing</utterance>
<utterance>Swimming</utterance>
<utterance>Water Polo</utterance>
</utterance>
<utterance>Winter sports
<utterance>Skiing</utterance>
<utterance>Snowboarding</utterance>
<utterance>Sledding</utterance>
<utterance>Skating</utterance>
</utterance>
<utterance>Adventure
<utterance>Rock climbing</utterance>
<utterance>Hiking</utterance>
<utterance>Fishing</utterance>
</utterance>
<utterance>Wacky
<utterance>Foosball</utterance>
<utterance>Calvinball</utterance>
<utterance>Croquet</utterance>
<utterance>Cricket</utterance>
<utterance>Dodgeball</utterance>
<utterance>Squash</utterance>
</utterance>
</utterance>
<utterance>Movies/TV
<utterance>Science Fiction</utterance>
<utterance>Animated
<utterance>Anime</utterance>
</utterance>
<utterance>Comedy</utterance>
<utterance>Romantic</utterance>
<utterance>Action</utterance>
<utterance>Fantasy</utterance>
</utterance>
<utterance>Music
<utterance>Country</utterance>
<utterance>Jazz</utterance>
<utterance>Rap</utterance>
<utterance>Hip-hop</utterance>
<utterance>Techno</utterance>
<utterance>Classical</utterance>
<utterance>Pop</utterance>
<utterance>Rock</utterance>
</utterance>
<utterance>Hobbies
<utterance>Computers
<utterance>Building computers</utterance>
<utterance>Videogames</utterance>
<utterance>Coding</utterance>
<utterance>Hacking</utterance>
</utterance>
<utterance>The Internet
<utterance>lol. teh internets!</utterance>
</utterance>
<utterance>Dance</utterance>
<utterance>Gynastics</utterance>
<utterance>Martial Arts
<utterance>Karate</utterance>
<utterance>Judo</utterance>
<utterance>Taikwon Do</utterance>
<utterance>Wushu</utterance>
<utterance>Street fighting</utterance>
</utterance>
<utterance>Listening to music</utterance>
<utterance>Music lessons
<utterance>Playing in my band</utterance>
<utterance>Playing piano</utterance>
<utterance>Playing guitar</utterance>
<utterance>Playing violin</utterance>
<utterance>Playing drums</utterance>
<utterance>Playing a weird instrument</utterance>
</utterance>
<utterance>Arts and crafts</utterance>
</utterance>
<utterance>Location
<utterance>USA
<utterance>West
<utterance>Alaska</utterance>
<utterance>Arizona</utterance>
<utterance>California</utterance>
<utterance>Colorado</utterance>
<utterance>Hawaii</utterance>
<utterance>Idaho</utterance>
<utterance>Montana</utterance>
<utterance>Nevada</utterance>
<utterance>New Mexico</utterance>
<utterance>Oregon</utterance>
<utterance>Utah</utterance>
<utterance>Washington</utterance>
<utterance>Wyoming</utterance>
</utterance>
<utterance>Midwest
<utterance>Illinois</utterance>
<utterance>Indiana</utterance>
<utterance>Iowa</utterance>
<utterance>Kansas</utterance>
<utterance>Michigan</utterance>
<utterance>Minnesota</utterance>
<utterance>Missouri</utterance>
<utterance>Nebraska</utterance>
<utterance>North Dakota</utterance>
<utterance>Ohio</utterance>
<utterance>South Dakota</utterance>
<utterance>Wisconsin</utterance>
</utterance>
<utterance>Northeast
<utterance>Connecticut</utterance>
<utterance>Delaware</utterance>
<utterance>Maine</utterance>
<utterance>Maryland</utterance>
<utterance>Massachusetts</utterance>
<utterance>New Hampshire</utterance>
<utterance>New Jersey</utterance>
<utterance>New York</utterance>
<utterance>Pennsylvania</utterance>
<utterance>Rhode Island</utterance>
<utterance>Vermont</utterance>
<utterance>Virginia</utterance>
<utterance>West Virginia</utterance>
</utterance>
<utterance>South
<utterance>Alabama</utterance>
<utterance>Arkansas</utterance>
<utterance>Florida</utterance>
<utterance>Georgia</utterance>
<utterance>Kentucky</utterance>
<utterance>Louisiana</utterance>
<utterance>Mississippi</utterance>
<utterance>North Carolina</utterance>
<utterance>Oklahoma</utterance>
<utterance>South Carolina</utterance>
<utterance>Tennessee</utterance>
<utterance>Texas</utterance>
</utterance>
</utterance>
<utterance>Canada
<utterance>Alberta</utterance>
<utterance>British Columbia</utterance>
<utterance>Manitoba</utterance>
<utterance>New Brunswick</utterance>
<utterance>Newfoundland</utterance>
<utterance>Northwest Territories</utterance>
<utterance>Nova Scotia</utterance>
<utterance>Nunavut</utterance>
<utterance>Ontario</utterance>
<utterance>Prince Edward Island</utterance>
<utterance>Quebec</utterance>
<utterance>Saskatchewan</utterance>
<utterance>Yukon</utterance>
</utterance>
<utterance>Mexico</utterance>
<utterance>Central America</utterance>
<utterance>Europe
<utterance>Great Britain
<utterance>England</utterance>
<utterance>Scotland</utterance>
<utterance>Wales</utterance>
<utterance>Northern Ireland</utterance>
</utterance>
<utterance>France</utterance>
<utterance>Germany</utterance>
<utterance>Spain</utterance>
<utterance>Italy</utterance>
<utterance>Poland</utterance>
<utterance>Switzerland</utterance>
<utterance>Greece</utterance>
<utterance>Romania</utterance>
</utterance>
<utterance>Asia
<utterance>China</utterance>
<utterance>India</utterance>
<utterance>Japan</utterance>
<utterance>Korea</utterance>
</utterance>
<utterance>South America
<utterance>Argentina</utterance>
<utterance>Brazil</utterance>
</utterance>
<utterance>Africa
<utterance>Eygpt</utterance>
<utterance>Swaziland</utterance>
</utterance>
<utterance>Australia</utterance>
<utterance>Middle East</utterance>
<utterance>Antarctica</utterance>
</utterance>
<utterance>Age
<utterance>Rugrat</utterance>
<utterance>Kid</utterance>
<utterance>Teen</utterance>
<utterance>Twenties</utterance>
<utterance>Old</utterance>
<utterance>Ancient</utterance>
<utterance>Mesozoic</utterance>
</utterance>
<utterance>Mood
<utterance>Good</utterance>
<utterance>Great!</utterance>
<utterance>Not bad</utterance>
<utterance>Sad</utterance>
<utterance>Hyper</utterance>
<utterance>Chill</utterance>
</utterance>
<utterance>Boy</utterance>
<utterance>Girl</utterance>
</utterance>
<utterance>Game
<utterance>Let's build</utterance>
<utterance>Let's battle</utterance>
<utterance>Nice one!</utterance>
<utterance>So far so good!</utterance>
<utterance>Lucky shot!</utterance>
<utterance>Oh man!</utterance>
</utterance>
<utterance>Silly
<utterance>Muahahahaha!</utterance>
<utterance>1337
<utterance>i r teh pwnz0r!</utterance>
<utterance>w00t!</utterance>
<utterance>z0mg h4x!</utterance>
<utterance>ub3rR0xXorzage!</utterance>
<utterance>all your base are belong to me!</utterance>
</utterance>
</utterance>
<utterance>Yes
<utterance>Absolutely!</utterance>
<utterance>Rock on!</utterance>
<utterance>Totally!</utterance>
<utterance>Juice!</utterance>
</utterance>
<utterance>No
<utterance>Ummm. No.</utterance>
<utterance>...</utterance>
</utterance>
<utterance>Ok
<utterance>Well... ok</utterance>
<utterance>Sure</utterance>
</utterance>
<utterance>:-)
<utterance>:-(</utterance>
<utterance>:D</utterance>
<utterance>:-O</utterance>
<utterance>lol</utterance>
</utterance>
</roblox>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,567 @@
settings().Rendering.FrameRateManager = 2
settings().Network.DataSendRate = 30
settings().Network.PhysicsSendRate = 20
settings().Network.ReceiveRate = 60
settings().Network.NetworkOwnerRate = 30
pcall(function() game:GetService("ScriptContext").ScriptsDisabled = false end)
--function made by rbxbanland
function newWaitForChild(newParent,name)
local returnable = nil
if newParent:FindFirstChild(name) then
returnable = newParent:FindFirstChild(name)
else
repeat wait() returnable = newParent:FindFirstChild(name) until returnable ~= nil
end
return returnable
end
function KickPlayer(Player,reason)
local message = Instance.new("Message")
message.Text = "You were kicked. Reason: "..reason
message.Parent = Player
wait(2)
Player:remove()
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' kicked. Reason: "..reason)
end
function LoadCharacterNew(playerApp,newChar)
PlayerService = game:GetService("Players")
Player = PlayerService:GetPlayerFromCharacter(newChar)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (not Player:FindFirstChild("Appearance")) then
kick()
end
if ((playerApp:GetChildren() == 0) or (playerApp:GetChildren() == nil)) then
kick()
end
local path = "rbxasset://../../../shareddata/charcustom/"
local charparts = {[1] = newWaitForChild(newChar,"Head"),[2] = newWaitForChild(newChar,"Torso"),[3] = newWaitForChild(newChar,"Left Arm"),[4] = newWaitForChild(newChar,"Right Arm"),[5] = newWaitForChild(newChar,"Left Leg"),[6] = newWaitForChild(newChar,"Right Leg")}
for _,newVal in pairs(playerApp:GetChildren()) do
local customtype = newVal.CustomizationType.Value
if (customtype == 1) then
pcall(function()
charparts[newVal.ColorIndex.Value].BrickColor = newVal.Value
end)
elseif (customtype == 2) then
pcall(function()
local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value)
if newHat[1] then
if newHat[1].className == "Hat" then
newHat[1].Parent = newChar
else
newHat[1]:remove()
end
end
end)
elseif (customtype == 3) then
pcall(function()
local newTShirt = game.Workspace:InsertContent(path.."tshirts/"..newVal.Value)
if newTShirt[1] then
if newTShirt[1].className == "ShirtGraphic" then
newTShirt[1].Parent = newChar
else
newTShirt[1]:remove()
end
end
end)
elseif (customtype == 4) then
pcall(function()
local newShirt = game.Workspace:InsertContent(path.."shirts/"..newVal.Value)
if newShirt[1] then
if newShirt[1].className == "Shirt" then
newShirt[1].Parent = newChar
else
newShirt[1]:remove()
end
end
end)
elseif (customtype == 5) then
pcall(function()
local newPants = game.Workspace:InsertContent(path.."pants/"..newVal.Value)
if newPants[1] then
if newPants[1].className == "Pants" then
newPants[1].Parent = newChar
else
newPants[1]:remove()
end
end
end)
elseif (customtype == 6) then
pcall(function()
local newFace = game.Workspace:InsertContent(path.."faces/"..newVal.Value)
if newFace[1] then
if newFace[1].className == "Decal" then
newWaitForChild(charparts[1],"face"):remove()
newFace[1].Parent = charparts[1]
newFace[1].Face = "Front"
else
newFace[1]:remove()
end
end
end)
elseif (customtype == 7) then
pcall(function()
local newPart = game.Workspace:InsertContent(path.."heads/"..newVal.Value)
if newPart[1] then
if newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then
newWaitForChild(charparts[1],"Mesh"):remove()
newPart[1].Parent = charparts[1]
else
newPart[1]:remove()
end
end
end)
elseif (customtype == 8) then
pcall(function()
local newHat = game.Workspace:InsertContent(path.."hats/"..newVal.Value)
if newHat[1] then
if newHat[1].className == "Hat" then
newHat[1].Parent = newChar
else
newHat[1]:remove()
end
end
end)
pcall(function()
local newItem = game.Workspace:InsertContent(path.."custom/"..newVal.Value)
if newItem[1] then
if newItem[1].className == "Decal" then
newWaitForChild(charparts[1],"face"):remove()
newItem[1].Parent = charparts[1]
newItem[1].Face = "Front"
elseif newPart[1].className == "SpecialMesh" or newPart[1].className == "CylinderMesh" or newPart[1].className == "BlockMesh" then
newWaitForChild(charparts[1],"Mesh"):remove()
newItem[1].Parent = charparts[1]
else
newItem[1].Parent = newChar
end
end
end)
end
end
end
function InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID)
local newCharApp = Instance.new("IntValue",Player)
newCharApp.Name = "Appearance"
--BODY COLORS
for i=1,6,1 do
local BodyColor = Instance.new("BrickColorValue",newCharApp)
if (i == 1) then
if (HeadColorID ~= nil) then
BodyColor.Value = BrickColor.new(HeadColorID)
else
BodyColor.Value = BrickColor.new(1)
end
BodyColor.Name = "Head Color"
elseif (i == 2) then
if (TorsoColorID ~= nil) then
BodyColor.Value = BrickColor.new(TorsoColorID)
else
BodyColor.Value = BrickColor.new(1)
end
BodyColor.Name = "Torso Color"
elseif (i == 3) then
if (LeftArmColorID ~= nil) then
BodyColor.Value = BrickColor.new(LeftArmColorID)
else
BodyColor.Value = BrickColor.new(1)
end
BodyColor.Name = "Left Arm Color"
elseif (i == 4) then
if (RightArmColorID ~= nil) then
BodyColor.Value = BrickColor.new(RightArmColorID)
else
BodyColor.Value = BrickColor.new(1)
end
BodyColor.Name = "Right Arm Color"
elseif (i == 5) then
if (LeftLegColorID ~= nil) then
BodyColor.Value = BrickColor.new(LeftLegColorID)
else
BodyColor.Value = BrickColor.new(1)
end
BodyColor.Name = "Left Leg Color"
elseif (i == 6) then
if (RightLegColorID ~= nil) then
BodyColor.Value = BrickColor.new(RightLegColorID)
else
BodyColor.Value = BrickColor.new(1)
end
BodyColor.Name = "Right Leg Color"
end
local indexValue = Instance.new("NumberValue")
indexValue.Name = "ColorIndex"
indexValue.Parent = BodyColor
indexValue.Value = i
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = BodyColor
typeValue.Value = 1
end
--HATS
for i=1,3,1 do
local newHat = Instance.new("StringValue",newCharApp)
if (i == 1) then
if (Hat1ID ~= nil) then
newHat.Value = Hat1ID
newHat.Name = "Hat 1 - "..Hat1ID
else
newHat.Value = "NoHat.rbxm"
newHat.Name = "Hat 1 - NoHat.rbxm"
end
elseif (i == 2) then
if (Hat2ID ~= nil) then
newHat.Value = Hat2ID
newHat.Name = "Hat 2 - "..Hat2ID
else
newHat.Value = "NoHat.rbxm"
newHat.Name = "Hat 2 - NoHat.rbxm"
end
elseif (i == 3) then
if (Hat3ID ~= nil) then
newHat.Value = Hat3ID
newHat.Name = "Hat 3 - "..Hat3ID
else
newHat.Value = "NoHat.rbxm"
newHat.Name = "Hat 3 - NoHat.rbxm"
end
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newHat
typeValue.Value = 2
end
--T-SHIRT
local newTShirt = Instance.new("StringValue",newCharApp)
if (TShirtID ~= nil) then
newTShirt.Value = TShirtID
newTShirt.Name = "T-Shirt - "..TShirtID
else
newTShirt.Value = "NoTShirt.rbxm"
newTShirt.Name = "T-Shirt - NoTShirt.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newTShirt
typeValue.Value = 3
--SHIRT
local newShirt = Instance.new("StringValue",newCharApp)
if (ShirtID ~= nil) then
newShirt.Value = ShirtID
newShirt.Name = "Shirt - "..ShirtID
else
newShirt.Value = "NoShirt.rbxm"
newShirt.Name = "Shirt - NoShirt.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newShirt
typeValue.Value = 4
--PANTS
local newPants = Instance.new("StringValue",newCharApp)
if (PantsID ~= nil) then
newPants.Value = PantsID
newPants.Name = "Pants - "..PantsID
else
newPants.Value = "NoPants.rbxm"
newPants.Name = "Pants - NoPants.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newPants
typeValue.Value = 5
--FACE
local newFace = Instance.new("StringValue",newCharApp)
if (FaceID ~= nil) then
newFace.Value = FaceID
newFace.Name = "Face - "..FaceID
else
newFace.Value = "DefaultFace.rbxm"
newFace.Name = "Face - DefaultFace.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newFace
typeValue.Value = 6
--HEADS
local newHead = Instance.new("StringValue",newCharApp)
if (HeadID ~= nil) then
newHead.Value = HeadID
newHead.Name = "Head - "..HeadID
else
newHead.Value = "DefaultHead.rbxm"
newHead.Name = "Head - DefaultHead.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newHead
typeValue.Value = 7
--EXTRA
local newItem = Instance.new("StringValue",newCharApp)
if (ItemID ~= nil) then
newItem.Value = ItemID
newItem.Name = "Extra - "..ItemID
else
newItem.Value = "NoExtra.rbxm"
newItem.Name = "Extra - NoExtra.rbxm"
end
local typeValue = Instance.new("NumberValue")
typeValue.Name = "CustomizationType"
typeValue.Parent = newItem
typeValue.Value = 8
end
function LoadSecurity(playerApp,Player,ServerSecurityLocation)
local function kick()
KickPlayer(Player, "Modified Client")
end
if (not Player:FindFirstChild("Security")) then
kick()
end
if (not playerApp:FindFirstChild("ClientEXEMD5") or not playerApp:FindFirstChild("LauncherMD5") or not playerApp:FindFirstChild("ClientScriptMD5")) then
kick()
end
for _,newVal in pairs(playerApp:GetChildren()) do
if (newVal.Name == "ClientEXEMD5") then
if (newVal.Value ~= ServerSecurityLocation.Security.ClientEXEMD5.Value or newVal.Value == nil) then
kick()
break
end
end
if (newVal.Name == "LauncherMD5") then
if (newVal.Value ~= ServerSecurityLocation.Security.LauncherMD5.Value or newVal.Value == nil) then
kick()
break
end
end
if (newVal.Name == "ClientScriptMD5") then
if (newVal.Value ~= ServerSecurityLocation.Security.ClientScriptMD5.Value or newVal.Value == nil) then
kick()
break
end
end
end
end
function InitalizeSecurityValues(Location,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
Location = Instance.new("IntValue", Location)
Location.Name = "Security"
local clientValue = Instance.new("StringValue", Location)
clientValue.Value = ClientEXEMD5 or ""
clientValue.Name = "ClientEXEMD5"
local launcherValue = Instance.new("StringValue", Location)
launcherValue.Value = LauncherMD5 or ""
launcherValue.Name = "LauncherMD5"
local scriptValue = Instance.new("StringValue", Location)
scriptValue.Value = ClientScriptMD5 or ""
scriptValue.Name = "ClientScriptMD5"
end
function InitalizeClientName(Location)
local newName = Instance.new("StringValue",Location)
newName.Value = "2009L"
newName.Name = "Name"
end
rbxversion = version()
print("ROBLOX Client version '" .. rbxversion .. "' loaded.")
function CSServer(Port,PlayerLimit,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
assert((type(Port)~="number" or tonumber(Port)~=nil or Port==nil),"CSRun Error: Port must be nil or a number.")
local NetworkServer=game:GetService("NetworkServer")
local RunService = game:GetService("RunService")
local PlayerService = game:GetService("Players")
pcall(NetworkServer.Stop,NetworkServer)
NetworkServer:Start(Port)
PlayerService.MaxPlayers = PlayerLimit
PlayerService.PlayerAdded:connect(function(Player)
if (PlayerService.NumPlayers > PlayerService.MaxPlayers) then
KickPlayer(Player, "Too many players on server.")
else
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' added")
Player:LoadCharacter()
end
Player.CharacterAdded:connect(function(char)
LoadSecurity(newWaitForChild(Player,"Security"),Player,game.Lighting)
if (char ~= nil) then
LoadCharacterNew(newWaitForChild(Player,"Appearance"),char)
wait(0.65)
end
end)
Player.Changed:connect(function(Property)
if (Property=="Character") and (Player.Character~=nil) then
local Character=Player.Character
local Humanoid=Character:FindFirstChild("Humanoid")
if (Humanoid~=nil) then
Humanoid.Died:connect(function() delay(5,function() Player:LoadCharacter() LoadCharacterNew(newWaitForChild(Player,"Appearance"),Player.Character) end) end)
end
end
end)
Player.Chatted:connect(function(msg)
print(Player.Name.."; "..msg)
end)
end)
PlayerService.PlayerRemoving:connect(function(Player)
print("Player '" .. Player.Name .. "' with ID '" .. Player.userId .. "' leaving")
end)
RunService:Run()
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
InitalizeSecurityValues(game.Lighting,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
InitalizeClientName(game.Lighting)
pcall(function() game.Close:connect(function() NetworkServer:Stop() end) end)
NetworkServer.IncommingConnection:connect(IncommingConnection)
end
function CSConnect(UserID,ServerIP,ServerPort,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID,ClientEXEMD5,LauncherMD5,ClientScriptMD5,Ticket)
pcall(function() game:SetPlaceID(-1, false) end)
pcall(function() game:GetService("Players"):SetChatStyle(Enum.ChatStyle.ClassicAndBubble) end)
pcall(function()
game:GetService("GuiService").Changed:connect(function()
pcall(function() game:GetService("GuiService").ShowLegacyPlayerList=true end)
pcall(function() game.CoreGui.RobloxGui.PlayerListScript:Remove() end)
pcall(function() game.CoreGui.RobloxGui.PlayerListTopRightFrame:Remove() end)
pcall(function() game.CoreGui.RobloxGui.BigPlayerListWindowImposter:Remove() end)
pcall(function() game.CoreGui.RobloxGui.BigPlayerlist:Remove() end)
end)
end)
game:GetService("RunService"):Run()
assert((ServerIP~=nil and ServerPort~=nil),"CSConnect Error: ServerIP and ServerPort must be defined.")
local function SetMessage(Message) game:SetMessage(Message) end
local Visit,NetworkClient,PlayerSuccess,Player,ConnectionFailedHook=game:GetService("Visit"),game:GetService("NetworkClient")
local function GetClassCount(Class,Parent)
local Objects=Parent:GetChildren()
local Number=0
for Index,Object in pairs(Objects) do
if (Object.className==Class) then
Number=Number+1
end
Number=Number+GetClassCount(Class,Object)
end
return Number
end
local function RequestCharacter(Replicator)
local Connection
Connection=Player.Changed:connect(function(Property)
if (Property=="Character") then
game:ClearMessage()
end
end)
SetMessage("Requesting character...")
Replicator:RequestCharacter()
SetMessage("Waiting for character...")
end
local function Disconnection(Peer,LostConnection)
SetMessage("You have lost connection to the game")
end
local function ConnectionAccepted(Peer,Replicator)
Replicator.Disconnection:connect(Disconnection)
local RequestingMarker=true
game:SetMessageBrickCount()
local Marker=Replicator:SendMarker()
Marker.Received:connect(function()
RequestingMarker=false
RequestCharacter(Replicator)
end)
while RequestingMarker do
Workspace:ZoomToExtents()
wait(0.5)
end
end
local function ConnectionFailed(Peer, Code, why)
SetMessage("Failed to connect to the Game. (ID="..Code.." ["..why.."])")
end
pcall(function() settings().Diagnostics:LegacyScriptMode() end)
pcall(function() game:SetRemoteBuildMode(true) end)
SetMessage("Connecting to server...")
NetworkClient.ConnectionAccepted:connect(ConnectionAccepted)
ConnectionFailedHook=NetworkClient.ConnectionFailed:connect(ConnectionFailed)
NetworkClient.ConnectionRejected:connect(function()
pcall(function() ConnectionFailedHook:disconnect() end)
SetMessage("Failed to connect to the Game. (Connection rejected)")
end)
pcall(function() NetworkClient.Ticket=Ticket or "" end) -- 2008 client has no ticket :O
PlayerSuccess,Player=pcall(function() return NetworkClient:PlayerConnect(UserID,ServerIP,ServerPort) end)
if (not PlayerSuccess) then
SetMessage("Failed to connect to the Game. (Invalid IP Address)")
NetworkClient:Disconnect()
end
if (not PlayerSuccess) then
local Error,Message=pcall(function()
Player=game:GetService("Players"):CreateLocalPlayer(UserID)
NetworkClient:Connect(ServerIP,ServerPort)
end)
if (not Error) then
SetMessage("Failed to connect to the Game.")
end
end
InitalizeClientAppearance(Player,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID)
wait(0.65)
InitalizeSecurityValues(Player,ClientEXEMD5,LauncherMD5,ClientScriptMD5)
pcall(function() Player:SetUnder13(false) end)
pcall(function() Player:SetMembershipType(Enum.MembershipType.BuildersClub) end)
pcall(function() Player:SetAccountAge(365) end)
Player:SetSuperSafeChat(false)
Player.CharacterAppearance=0
pcall(function() Player.Name=PlayerName or "" end)
pcall(function() Visit:SetUploadUrl("") end)
game:GetService("Visit")
end
function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,IconType,ItemID)
local plr = game.Players:CreateLocalPlayer(UserID)
game:GetService("RunService"):run()
plr.Name = PlayerName
plr:LoadCharacter()
plr.CharacterAppearance=0
InitalizeClientAppearance(plr,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,LeftArmColorID,RightArmColorID,LeftLegColorID,RightLegColorID,TShirtID,ShirtID,PantsID,FaceID,HeadID,ItemID)
wait(0.65)
LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false)
wait(0.65)
game.Workspace:InsertContent("rbxasset://Fonts//libraries.rbxm")
newWaitForChild(game.StarterGui, "Health")
game.StarterGui.Health:clone().Parent = plr.PlayerGui
game:GetService("Visit")
while true do wait()
if (plr.Character.Humanoid.Health == 0) then
wait(5)
plr:LoadCharacter()
LoadCharacterNew(newWaitForChild(plr,"Appearance"),plr.Character,false)
end
end
end
_G.CSServer=CSServer
_G.CSConnect=CSConnect
_G.CSSolo=CSSolo

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More