Hey Dominic,
I had a similar problem few weeks ago.. I haven't found a perfect
solution but this might help you
and/or point you in a good direction!
cheers
RB
On 25/09/2012 11:07 AM, Dominik Kirouac wrote:
Hey all,
Anyone know if a compound exist to smooth strands deformation. I have
some weird strand deformation after applying simulation and I want to
smooth them in a postprocess icetree.
I'm able to do it for weightmap by getting the average of neighboring
points and reapply it to the point, but I'm not able to apply this
technic to strands.
Anyone could help me with this?
Thanks,
*Dominik Kirouac // SHED **
*3D Artist / FX - SIMULATION
1410, RUE STANLEY, 11E ETAGE MONTREAL (QUEBEC) H3A 1P8
T 514 849-1555 F 514 849-5025 WWW.SHEDMTL.COM <http://www.shedmtl.com/>
<?xml version="1.0" encoding="UTF-8"?>
<xsi_file type="CompoundNode" name="SmoothStrands" author="Renaud Bousquet" formatversion="1.4" compoundversion="1.0" constructionmode="Modeling" backgroundcolor="10510879">
<description><![CDATA[WIP]]></description>
<definition>
<nodes>
<node type="GetArraySizeNode" index="0">
<param name="array.array_x" type="4" value="0.000000"></param>
<param name="array.array_y" type="4" value="0.000000"></param>
<param name="array.array_z" type="4" value="0.000000"></param>
<portdef name="array" type="16" structure="2" group="0" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">-1324</prop>
<prop name="posy">239</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="AddNode" index="1">
<param name="value1" type="3" value="0"></param>
<param name="value2" type="3" value="1"></param>
<portdef name="value1" type="2" structure="2" group="0" instance="0" port="0"></portdef>
<portdef name="value2" type="2" structure="1" group="0" instance="1" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">-979</prop>
<prop name="posy">291</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="SubtractNode" index="2">
<param name="first.first_x" type="4" value="0.000000"></param>
<param name="first.first_y" type="4" value="0.000000"></param>
<param name="first.first_z" type="4" value="0.000000"></param>
<param name="second.second_x" type="4" value="0.000000"></param>
<param name="second.second_y" type="4" value="0.000000"></param>
<param name="second.second_z" type="4" value="0.000000"></param>
<portdef name="first" type="16" structure="2" group="0" instance="0" port="0"></portdef>
<portdef name="second" type="16" structure="2" group="0" instance="0" port="1"></portdef>
<datablob category="ui_infos">
<prop name="posx">-591</prop>
<prop name="posy">246</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="MultiplyByScalarNode" index="3">
<param name="value.value_x" type="4" value="0.000000"></param>
<param name="value.value_y" type="4" value="0.000000"></param>
<param name="value.value_z" type="4" value="0.000000"></param>
<param name="factor" type="4" value="0.500000"></param>
<portdef name="value" type="16" structure="2" group="0" instance="0" port="0"></portdef>
<portdef name="factor" type="4" structure="1" group="0" instance="0" port="1"></portdef>
<datablob category="ui_infos">
<prop name="posx">-460</prop>
<prop name="posy">230</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="AddNode" index="4">
<param name="value1.value1_x" type="4" value="0.000000"></param>
<param name="value1.value1_y" type="4" value="0.000000"></param>
<param name="value1.value1_z" type="4" value="0.000000"></param>
<param name="value2.value2_x" type="4" value="0.000000"></param>
<param name="value2.value2_y" type="4" value="0.000000"></param>
<param name="value2.value2_z" type="4" value="0.000000"></param>
<portdef name="value1" type="16" structure="2" group="0" instance="0" port="0"></portdef>
<portdef name="value2" type="16" structure="2" group="0" instance="1" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">-249</prop>
<prop name="posy">265</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="[embedded_0]" index="5">
<param name="Size" type="3" value="0"></param>
<portdef name="Size" type="2" structure="1" group="-1" instance="-1" port="-1"></portdef>
<datablob category="ui_infos">
<prop name="posx">-1178</prop>
<prop name="posy">236</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="[embedded_1]" index="6">
<param name="Reference" type="31" value="self.strandposition"></param>
<param name="Value.Value_x" type="4" value="0.000000"></param>
<param name="Value.Value_y" type="4" value="0.000000"></param>
<param name="Value.Value_z" type="4" value="0.000000"></param>
<param_ext name="Reference" type="31" value="self.strandposition"></param_ext>
<portdef name="Value" type="16" structure="2" group="2" instance="0" port="0" groupname="Value"></portdef>
<portdef name="In_Name" type="8192" structure="1" group="-1" instance="-1" port="-1"></portdef>
<datablob category="ui_infos">
<prop name="posx">-5</prop>
<prop name="posy">185</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="SelectInArrayNode" index="7">
<param name="index" type="3" value="0"></param>
<param name="array.array_x" type="4" value="0.000000"></param>
<param name="array.array_y" type="4" value="0.000000"></param>
<param name="array.array_z" type="4" value="0.000000"></param>
<portdef name="index" type="2" structure="2" group="0" instance="0" port="0"></portdef>
<portdef name="array" type="16" structure="2" group="0" instance="0" port="1"></portdef>
<datablob category="ui_infos">
<prop name="posx">-769</prop>
<prop name="posy">329</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="SelectInArrayNode" index="8">
<param name="index" type="3" value="0"></param>
<param name="array.array_x" type="4" value="0.000000"></param>
<param name="array.array_y" type="4" value="0.000000"></param>
<param name="array.array_z" type="4" value="0.000000"></param>
<portdef name="index" type="2" structure="2" group="0" instance="0" port="0"></portdef>
<portdef name="array" type="16" structure="2" group="0" instance="0" port="1"></portdef>
<datablob category="ui_infos">
<prop name="posx">-773</prop>
<prop name="posy">214</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="GetDataNode" index="9">
<param name="reference" type="31" value="self.StrandPosition"></param>
<param_ext name="reference" type="31" value="self.StrandPosition"></param_ext>
<portdef name="source" type="2048" structure="1" group="1" instance="0" port="0"></portdef>
<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">-1573</prop>
<prop name="posy">360</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="GetDataNode" index="10">
<param name="reference" type="31" value="self.StrandPosition"></param>
<param_ext name="reference" type="31" value="self.StrandPosition"></param_ext>
<portdef name="source" type="2048" structure="1" group="1" instance="0" port="0"></portdef>
<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">-486</prop>
<prop name="posy">339</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="ExecuteNode" index="11">
<portdef name="port1" type="4096" structure="1" group="0" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">265</prop>
<prop name="posy">128</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="IfNode" index="12">
<param name="condition" type="11" value="true"></param>
<portdef name="condition" type="1" structure="1" group="0" instance="0" port="0"></portdef>
<portdef name="iftrue" type="4096" structure="1" group="0" instance="0" port="1"></portdef>
<portdef name="iffalse" type="4096" structure="1" group="0" instance="0" port="2"></portdef>
<datablob category="ui_infos">
<prop name="posx">151</prop>
<prop name="posy">144</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="IfNode" index="13">
<param name="condition" type="11" value="false"></param>
<param name="iftrue.iftrue_x" type="4" value="0.000000"></param>
<param name="iftrue.iftrue_y" type="4" value="0.000000"></param>
<param name="iftrue.iftrue_z" type="4" value="0.000000"></param>
<param name="iffalse.iffalse_x" type="4" value="0.000000"></param>
<param name="iffalse.iffalse_y" type="4" value="0.000000"></param>
<param name="iffalse.iffalse_z" type="4" value="0.000000"></param>
<portdef name="condition" type="1" structure="1" group="0" instance="0" port="0"></portdef>
<portdef name="iftrue" type="16" structure="2" group="0" instance="0" port="1"></portdef>
<portdef name="iffalse" type="16" structure="2" group="0" instance="0" port="2"></portdef>
<datablob category="ui_infos">
<prop name="posx">-98</prop>
<prop name="posy">223</prop>
<prop name="state">Normal</prop>
</datablob>
<datablob category="vis_1">
<prop name="colorb">0.000000</prop>
<prop name="colorg">1.000000</prop>
<prop name="colorr">1.000000</prop>
<prop name="displaymode">2</prop>
<prop name="enable">1</prop>
<prop name="port">iftrue</prop>
</datablob>
</node>
</nodes>
<exposed_ports>
<port index="3" portname="factor" username="factor" basename="factor" portlabel="factor" exposetype="single"> </port>
<port index="11" portname="execute" username="Execute" basename="Execute" portlabel="Execute" exposetype="single"> </port>
<port index="12" portname="condition" username="Enable" basename="Enable" portlabel="Enable" exposetype="single"> </port>
<port index="13" portname="condition" username="Visualize_Strand_Position" basename="Visualize Strand Position" portlabel="Visualize Strand Position" exposetype="single"> </port>
</exposed_ports>
<connections>
<cnx from_node="7" from_port="value" to_node="2" to_port="first"> </cnx>
<cnx from_node="8" from_port="value" to_node="2" to_port="second"> </cnx>
<cnx from_node="2" from_port="result" to_node="3" to_port="value"> </cnx>
<cnx from_node="1" from_port="result" to_node="7" to_port="index"> </cnx>
<cnx from_node="0" from_port="size" to_node="5" to_port="Size"> </cnx>
<cnx from_node="3" from_port="result" to_node="4" to_port="value1"> </cnx>
<cnx from_node="5" from_port="Indices" to_node="1" to_port="value1"> </cnx>
<cnx from_node="5" from_port="Indices" to_node="8" to_port="index"> </cnx>
<cnx from_node="6" from_port="Execute" to_node="12" to_port="iftrue"> </cnx>
<cnx from_node="13" from_port="result" to_node="6" to_port="Value"> </cnx>
<cnx from_node="12" from_port="result" to_node="11" to_port="port1"> </cnx>
<cnx from_node="10" from_port="value" to_node="4" to_port="value2"> </cnx>
<cnx from_node="9" from_port="value" to_node="0" to_port="array"> </cnx>
<cnx from_node="9" from_port="value" to_node="7" to_port="array"> </cnx>
<cnx from_node="9" from_port="value" to_node="8" to_port="array"> </cnx>
<cnx from_node="4" from_port="result" to_node="13" to_port="iftrue"> </cnx>
<cnx from_node="4" from_port="result" to_node="13" to_port="iffalse"> </cnx>
</connections>
<layout>
<item type="input" name="Enable"> </item>
<item type="input" name="factor"> </item>
<item type="input" name="Visualize_Strand_Position"> </item>
<item type="output" name="Execute"> </item>
</layout>
<blob_dictionary>
</blob_dictionary>
</definition>
<embedded_0 name="Build Index Array" category="Array" formatversion="1.4" compoundversion="1.0" constructionmode="Current" backgroundcolor="6732954">
<nodes>
<node type="GetArraySubIndicesNode" index="0">
<param name="array" type="3" value="0"></param>
<portdef name="array" type="2" structure="2" group="0" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">439</prop>
<prop name="posy">-56</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="IntegerNode" index="1">
<param name="value" type="3" value="0"></param>
<portdef name="value" type="2" structure="1" group="0" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">103</prop>
<prop name="posy">-13</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="BuildArrayFromConstantNode" index="2">
<param name="size" type="3" value="0"></param>
<param name="value" type="3" value="0"></param>
<portdef name="size" type="2" structure="1" group="0" instance="0" port="0"></portdef>
<portdef name="value" type="2" structure="1" group="0" instance="0" port="1"></portdef>
<datablob category="ui_infos">
<prop name="posx">205</prop>
<prop name="posy">-62</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
</nodes>
<exposed_ports>
<port index="0" portname="indices" username="Indices" basename="Indices" portlabel="Indices" exposetype="single"> </port>
<port index="2" portname="size" username="Size" basename="Size" portlabel="Size" exposetype="single"> </port>
</exposed_ports>
<connections>
<cnx from_node="2" from_port="array" to_node="0" to_port="array"> </cnx>
<cnx from_node="1" from_port="result" to_node="2" to_port="value"> </cnx>
</connections>
<layout>
<item type="input" name="Size"> </item>
<item type="output" name="Indices"> </item>
</layout>
</embedded_0>
<embedded_1 name="Set Data" category="Data Access" author="Softimage" formatversion="1.4" compoundversion="1.0" constructionmode="Current" backgroundcolor="12693621">
<description><![CDATA[Sets the specified attributes to the supplied values.]]></description>
<nodes>
<node type="PassThroughNode" index="0">
<portdef name="in" type="8192" structure="1" group="0" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">49</prop>
<prop name="posy">114</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="ExecuteNode" index="1">
<portdef name="port1" type="4096" structure="1" group="0" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">368</prop>
<prop name="posy">114</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
<node type="SetOneDataNode" index="2">
<param name="reference" type="31" value="self.strandposition"></param>
<param name="source.source_x" type="4" value="0.000000"></param>
<param name="source.source_y" type="4" value="0.000000"></param>
<param name="source.source_z" type="4" value="0.000000"></param>
<param_ext name="reference" type="31" value="self.strandposition"></param_ext>
<portdef name="source" type="16" structure="2" group="1" instance="0" port="0"></portdef>
<portdef name="inname" type="8192" structure="1" group="3" instance="0" port="0"></portdef>
<datablob category="ui_infos">
<prop name="posx">209</prop>
<prop name="posy">114</prop>
<prop name="state">Normal</prop>
</datablob>
</node>
</nodes>
<exposed_ports>
<port index="0" portname="in" username="In_Name" basename="In Name" portlabel="In Name" exposetype="single">
<description><![CDATA[Name prefixed to each attribute to be set. Use this to specify the object name, and then specify each attribute in the Reference ports.]]></description>
</port>
<port index="1" portname="execute" username="Execute" basename="Execute" portlabel="Execute" exposetype="single"> </port>
<port index="2" portname="source" username="Value" basename="Value" overridelabel="Reference" portlabel="Value" exposetype="use_node_import">
<description><![CDATA[The value to set.]]></description>
</port>
<port index="2" portname="reference" username="Reference" basename="Reference" portlabel="Reference" exposetype="use_node_import">
<description><![CDATA[The name of the attribute to set.]]></description>
</port>
</exposed_ports>
<connections>
<cnx from_node="2" from_port="value" to_node="1" to_port="port1"> </cnx>
<cnx from_node="0" from_port="out" to_node="2" to_port="inname"> </cnx>
</connections>
<layout>
<item type="input" name="In_Name"> </item>
<item type="input" name="Value" min="0" max="0"> </item>
<item type="input" name="Reference"> </item>
<item type="output" name="Execute"> </item>
</layout>
</embedded_1>
</xsi_file>