From aa12410328a1464812c56e52410e8c1970ddc6af Mon Sep 17 00:00:00 2001 From: Luca Scheller Date: Mon, 5 Aug 2019 20:40:43 +0200 Subject: [PATCH] LYNX | HOUDINI | LYNX_fabric.hda The twist randomize settings in LYNX_fabric_thread can now randomize twist offsets and twist counts for both fibers and threads. --- .../HSITE/otls/LYNX_fabric.hda/INDEX__SECTION | 8 +- .../Contents.dir/.OPdummydefs | Bin 29567 -> 29567 bytes .../Contents.dir/Contents.mime | 35 ++++--- .../DialogScript | 86 ++++++++++++++++-- .../Help | 17 ++-- 5 files changed, 114 insertions(+), 32 deletions(-) diff --git a/HOUDINI/HSITE/otls/LYNX_fabric.hda/INDEX__SECTION b/HOUDINI/HSITE/otls/LYNX_fabric.hda/INDEX__SECTION index 90b1320..3266836 100644 --- a/HOUDINI/HSITE/otls/LYNX_fabric.hda/INDEX__SECTION +++ b/HOUDINI/HSITE/otls/LYNX_fabric.hda/INDEX__SECTION @@ -10,7 +10,7 @@ Inputs: 1 to 1 Subnet: true Python: false Empty: false -Modified: Sat Mar 16 05:27:20 2019 +Modified: Thu Mar 14 16:27:20 2019 Operator: LYNX::LYNX_fabric_convert::1.0 Label: LYNX fabric convert @@ -38,7 +38,7 @@ Inputs: 0 to 1 Subnet: true Python: false Empty: false -Modified: Sun Mar 17 21:12:51 2019 +Modified: Sat Mar 16 08:12:51 2019 Operator: LYNX::LYNX_fabric_resample::1.0 Label: LYNX fabric resample @@ -108,7 +108,7 @@ Inputs: 0 to 2 Subnet: true Python: false Empty: false -Modified: Sat Mar 16 06:11:12 2019 +Modified: Thu Mar 14 17:11:12 2019 Operator: LYNX::LYNX_fabric_pattern::1.1 Label: LYNX fabric pattern @@ -150,7 +150,7 @@ Inputs: 2 to 2 Subnet: true Python: false Empty: false -Modified: Sat Aug 3 12:53:11 2019 +Modified: Mon Aug 5 20:33:17 2019 Operator: LYNX::LYNX_fabric_thread_profile::1.1 Label: LYNX fabric thread profile diff --git a/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Contents.dir/.OPdummydefs b/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Contents.dir/.OPdummydefs index 49fdf1c54ef0051244859db80170cc5f13b02bab..d1adaad14ae5f80e18f1b9f1585a59f94f3c03c6 100644 GIT binary patch delta 553 zcmezWjPd_7#tB-?9%Z=`b>+d7zX7vHY34+KsmZo{y!8wW+$jtU!mP1CF$M+(zTo@< z{lt=zqRgbEoYEo&205T8S9`2Si8fGH03n-_nv+_R%D|xUfq{XY7b-7^kS{Mv%uCM! zD$xH6G$aM6Koe+y7)U`%YFd6#ZemGheqQf&iB?>e+grECKdvuv{Pe1P-tq10%y^US3sD$W1<| zCC0|$6YDnTdJ#De*+*@G|^vbvMnEPJp%)G3Il^MYb;QVfq{W9IKMzY zv81FZGbt&j6euE>$-uzX9_yO29w;k-kWER=Ni9ibV9@x$z`)K6l@~G*8k^)sA22zlcnwDRbn^=;WpI1J40V~^NJw{GThy`3>K>5tPvecpy28M)e1_qWV zP@Oy=ncUKx z*jRjGZBMmM4&*gqH#9OcHZ?PvJW;`5@*ZBH$-GRwo4;__vB1>|Wnojhc@J;35ZJ*$ z^CkxOGBP#aJW)ZH3n~!+69k%Ww%Jd+mJP1si6LAESTfq^iY#2xBLG>_VDruZ Q4H>xPuN+j#>|7Bx0MWm!VgLXD diff --git a/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Contents.dir/Contents.mime b/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Contents.dir/Contents.mime index ca7683b..6f4888a 100644 --- a/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Contents.dir/Contents.mime +++ b/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Contents.dir/Contents.mime @@ -34,7 +34,7 @@ sopflags sopflags = comment "" position -1.09831 -12.2477 connectornextid 3 -flags = lock off model off template off footprint off xray off bypass off display on render on highlight off unload off savedata off compress on colordefault on exposed on +flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on outputsNamed3 { 0 "output1" @@ -52,7 +52,7 @@ inputs stat { create 1560896659 - modify 1564829557 + modify 1565029965 author USER@lynx.localdomain access 0777 } @@ -213,7 +213,7 @@ inputs stat { create 1552418958 - modify 1560018211 + modify 1565024422 author LYNX@LucaScheller access 0777 } @@ -237,6 +237,9 @@ vex_threadjobsize [ 0 locks=0 ] ( 1024 ) snippet [ 0 locks=0 ] ( "float LYNX_fabric_fiber_twist_random_seed = ch(\"../fabric_fiber_twist_random_seed\"); float LYNX_fabric_fiber_twist_random_min = ch(\"../fabric_fiber_twist_random_min\"); float LYNX_fabric_fiber_twist_random_max = ch(\"../fabric_fiber_twist_random_max\"); +float LYNX_fabric_fiber_twist_offset_random_seed = ch(\"../fabric_fiber_twist_offset_random_seed\"); +float LYNX_fabric_fiber_twist_offset_random_min = ch(\"../fabric_fiber_twist_offset_random_min\"); +float LYNX_fabric_fiber_twist_offset_random_max = ch(\"../fabric_fiber_twist_offset_random_max\"); float LYNX_fabric_fiber_offset = ch(\"../fabric_fiber_offset\"); float LYNX_fabric_fiber_offset_random_seed = ch(\"../fabric_fiber_offset_random_seed\"); float LYNX_fabric_fiber_offset_random_min = ch(\"../fabric_fiber_offset_random_min\"); @@ -247,12 +250,15 @@ float LYNX_fabric_fiber_offset_noise_min = ch(\"../fabric_fiber_offset_n float LYNX_fabric_fiber_offset_noise_max = ch(\"../fabric_fiber_offset_noise_max\"); int LYNX_fabric_fiber_offset_remap_reverse = chi(\"../fabric_fiber_offset_remap_reverse\"); int LYNX_fabric_thread_twist_scale_post_toggle = chi(\"../fabric_thread_twist_scale_post_toggle\"); -float LYNX_fabric_thread_twist_offset = ch(\"../fabric_thread_twist_offset\"); float LYNX_fabric_thread_twist = ch(\"../fabric_thread_twist\"); float LYNX_fabric_thread_twist_random_seed = ch(\"../fabric_thread_twist_random_seed\"); float LYNX_fabric_thread_twist_random_min = ch(\"../fabric_thread_twist_random_min\"); float LYNX_fabric_thread_twist_random_max = ch(\"../fabric_thread_twist_random_max\"); int LYNX_fabric_thread_twist_remap_reverse = chi(\"../fabric_thread_twist_remap_reverse\"); +float LYNX_fabric_thread_twist_offset = ch(\"../fabric_thread_twist_offset\"); +float LYNX_fabric_thread_twist_offset_random_seed = ch(\"../fabric_thread_twist_offset_random_seed\"); +float LYNX_fabric_thread_twist_offset_random_min = ch(\"../fabric_thread_twist_offset_random_min\"); +float LYNX_fabric_thread_twist_offset_random_max = ch(\"../fabric_thread_twist_offset_random_max\"); vector @P; float @width = 0; @@ -270,10 +276,9 @@ float LYNX_fabric_thread_width = point(1,\"width\",@LYNX_fabric_target); vector LYNX_fabric_thread_scale = haspointattrib(1,\"scale\")?point(1,\"scale\",@LYNX_fabric_target):set(1,1,1); // Calc Attr -float LYNX_fabric_fiber_twists = 360 * .1 * fit01(rand(rand(@LYNX_fabric_id_fiber)+LYNX_fabric_fiber_twist_random_seed),LYNX_fabric_fiber_twist_random_min,LYNX_fabric_fiber_twist_random_max); float LYNX_fabric_thread_twists_uv = clamp(LYNX_fabric_thread_twist_remap_reverse?LYNX_fabric_thread_uv[0]:(1-LYNX_fabric_thread_uv[0]),0,1); -float LYNX_fabric_thread_twists = LYNX_fabric_thread_twist + fit01(rand(rand(@LYNX_fabric_id_thread)+LYNX_fabric_thread_twist_random_seed),LYNX_fabric_thread_twist_random_min,LYNX_fabric_thread_twist_random_max); -float LYNX_fabric_twists = LYNX_fabric_thread_twist_offset + LYNX_fabric_fiber_twists + LYNX_fabric_thread_twists * 360 * chramp(\"../fabric_thread_twist_remap\",LYNX_fabric_thread_twists_uv); +float LYNX_fabric_twists = LYNX_fabric_thread_twist_offset + fit01(rand(rand(@LYNX_fabric_id_thread)+LYNX_fabric_thread_twist_offset_random_seed),LYNX_fabric_thread_twist_offset_random_min,LYNX_fabric_thread_twist_offset_random_max) + fit01(rand(rand(@LYNX_fabric_id_fiber+10)+LYNX_fabric_fiber_twist_offset_random_seed),LYNX_fabric_fiber_twist_offset_random_min,LYNX_fabric_fiber_twist_offset_random_max); +LYNX_fabric_twists += (LYNX_fabric_thread_twist * fit01(rand(rand(@LYNX_fabric_id_thread+20)+LYNX_fabric_thread_twist_random_seed),LYNX_fabric_thread_twist_random_min,LYNX_fabric_thread_twist_random_max) * fit01(rand(rand(@LYNX_fabric_id_fiber+30)+LYNX_fabric_fiber_twist_random_seed),LYNX_fabric_fiber_twist_random_min,LYNX_fabric_fiber_twist_random_max)) * 360 * chramp(\"../fabric_thread_twist_remap\",LYNX_fabric_thread_twists_uv); float LYNX_fabric_fiber_offset_uv = clamp(LYNX_fabric_fiber_offset_remap_reverse?LYNX_fabric_thread_uv[0]:(1-LYNX_fabric_thread_uv[0]),0,1); float LYNX_fabric_fiber_offset_random = fit01(rand(rand(@LYNX_fabric_id_fiber) + LYNX_fabric_fiber_offset_random_seed), LYNX_fabric_fiber_offset_random_min, LYNX_fabric_fiber_offset_random_max); @@ -1062,7 +1067,7 @@ inputs stat { create 1552418958 - modify 1560018211 + modify 1565024864 author LYNX@LucaScheller access 0777 } @@ -1096,7 +1101,7 @@ vector LYNX_fabric_thread_uv = @uv; // Calc Attr float LYNX_fabric_thread_twists_uv = clamp(LYNX_fabric_thread_twist_remap_reverse?LYNX_fabric_thread_uv[0]:(1-LYNX_fabric_thread_uv[0]),0,1); -float LYNX_fabric_thread_twists = LYNX_fabric_thread_twist + fit01(rand(rand(@LYNX_fabric_id_thread)+LYNX_fabric_thread_twist_random_seed),LYNX_fabric_thread_twist_random_min,LYNX_fabric_thread_twist_random_max); +float LYNX_fabric_thread_twists = LYNX_fabric_thread_twist * fit01(rand(rand(@LYNX_fabric_id_thread+20)+LYNX_fabric_thread_twist_random_seed),LYNX_fabric_thread_twist_random_min,LYNX_fabric_thread_twist_random_max); @LYNX_fabric_thread_twists = LYNX_fabric_thread_twists * 360 * chramp(\"../fabric_thread_twist_remap\",LYNX_fabric_thread_twists_uv); " ) exportlist [ 0 locks=0 ] ( * ) @@ -1382,7 +1387,7 @@ inputs stat { create 1559061581 - modify 1564829555 + modify 1565029738 author LYNX@LucaScheller access 0777 } @@ -1466,7 +1471,7 @@ inputs stat { create 1559996359 - modify 1564829555 + modify 1565029738 author USER@lynx.localdomain access 0777 } @@ -2004,7 +2009,7 @@ Content-Type: text/plain { version 0.8 -input [ 8 locks=0 ] ( [ input 1 ] ) +input [ 8 locks=0 ] ( [ input 0 ] ) } --HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY @@ -2083,7 +2088,7 @@ Content-Type: text/plain { version 0.8 -input [ 0 locks=0 ] ( [ input 1 ] ) +input [ 0 locks=0 ] ( [ input 0 ] ) } --HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY @@ -2162,7 +2167,7 @@ Content-Type: text/plain { version 0.8 -input [ 0 locks=0 ] ( [ input 1 ] ) +input [ 0 locks=0 ] ( [ input 0 ] ) } --HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY @@ -2369,7 +2374,7 @@ Content-Type: text/plain { version 0.8 -input [ 0 locks=0 ] ( [ input 1 ] ) +input [ 0 locks=0 ] ( [ input 0 ] ) } --HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY diff --git a/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/DialogScript b/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/DialogScript index 181dbae..7fc7ba0 100644 --- a/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/DialogScript +++ b/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/DialogScript @@ -139,6 +139,13 @@ label "Randomize" grouptag { "group_type" "simple" } + parm { + name "Randomize_Twist_Fiber_Cycles" + label "Randomize Twist Cycles" + type label + joinnext + default { "" } + } parm { name "fabric_fiber_twist_random_seed" label "Seed" @@ -152,15 +159,45 @@ label "Min" type float joinnext - default { "0" } - range { -1 1 } + default { "1" } + range { 0 2 } } parm { name "fabric_fiber_twist_random_max" label "Max" type float + default { "1" } + range { 0 2 } + } + parm { + name "Randomize_Twist_Fiber_Offset" + label "Randomize Twist Offset" + type label + joinnext + default { "" } + } + parm { + name "fabric_fiber_twist_offset_random_seed" + label "Seed" + type float + joinnext + default { "0" } + range { 0 10 } + } + parm { + name "fabric_fiber_twist_offset_random_min" + label "Min" + type float + joinnext default { "0" } - range { -1 1 } + range { -360 360 } + } + parm { + name "fabric_fiber_twist_offset_random_max" + label "Max" + type float + default { "0" } + range { -360 360 } } } @@ -315,6 +352,13 @@ label "Randomize" grouptag { "group_type" "simple" } + parm { + name "Randomize_Twist_Thread_Cycles" + label "Randomize Twist Cycles" + type label + joinnext + default { "" } + } parm { name "fabric_thread_twist_random_seed" label "Seed" @@ -328,15 +372,45 @@ label "Min" type float joinnext - default { "0" } - range { -10 10 } + default { "1" } + range { 0 2 } } parm { name "fabric_thread_twist_random_max" label "Max" type float + default { "1" } + range { 0 2 } + } + parm { + name "Randomize_Twist_Thread_Offset" + label "Randomize Twist Offset" + type label + joinnext + default { "" } + } + parm { + name "fabric_thread_twist_offset_random_seed" + label "Seed" + type float + joinnext default { "0" } - range { -10 10 } + range { 0 10 } + } + parm { + name "fabric_thread_twist_offset_random_min" + label "Min" + type float + joinnext + default { "0" } + range { -360 360 } + } + parm { + name "fabric_thread_twist_offset_random_max" + label "Max" + type float + default { "0" } + range { -360 360 } } } diff --git a/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Help b/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Help index d6f4bc5..4a281fd 100644 --- a/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Help +++ b/HOUDINI/HSITE/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__thread_8_81.1/Help @@ -48,8 +48,11 @@ Transfer Attributes: Fiber settings refer to settings per actual output curve. The term `fiber` is synonymous with the term `output curve`. === General === -Automatically Resample Fiber: +Automatically Resample Fiber: + #id: LYNX_fabric_thread_fiber_general_resample This auto resamples the input curves to account for the [Twist Cycles|#LYNX_fabric_thread_thread_twist_twist]. The `Segments Per 360` parameter controls how many segments are created for every 360 twists. + :warning: + When enabling this the resampling only takes the thread twist settings into account and not the fiber twist settings when calculating the resample density. Detangle Fiber: #id: LYNX_fabric_thread_fiber_general_detangle Detangle the curves after they have been extruded around the input curves. Higher iterations yield better results. The detangling is only done on the [Rest Frame|#LYNX_fabric_rest_frame]. @@ -60,12 +63,12 @@ Smooth: These settings control how each output curve is twisted around the orginal curve. ==== > Randomize ==== -Randomize the rotation offset per fiber. This is useful to break up the look and to introduce irregularities. +Randomize the twist cycles and twist offset per fiber. This is useful to break up the look and to introduce irregularities. Using small values is recommended. Seed: Sets the seed per fiber used for generating a random value between 0 and 1. Min/Max: - Remaps the random value to this range and adds it to the twist offset. + Remaps the random value to this range and multiplies it with the twist cycle count / adds it to the twist offset. === Offset === These settings control how each output curve is offset to the orginal curve. @@ -104,13 +107,13 @@ Offset: This offsets the twist of the whole thread around the input curves. ==== > Randomize ==== -Randomize the rotation offset per thread. This is useful to break up the look and to introduce irregularities. +Randomize the twist cycles and twist offset per thread. This is useful to break up the look and to introduce irregularities. Seed: - Sets the seed per thread used for generating a random value between 0 and 1. + Sets the seed per fiber used for generating a random value between 0 and 1. Min/Max: - Remaps the random value to this range and adds it to the cycle offset. - + Remaps the random value to this range and multiplies it with the twist cycle count / adds it to the twist offset. + ==== > Scale ==== Apply Scale After Twist: If a scale attribute is present on the input curves, this will influence if the scale attribute is applied before or after the twist. This can be useful for "flat" threads.