Update ultra_strip, add split_interest

master
Crystalize 2 years ago
parent b4ece3e30a
commit 4f23e47905
  1. 43
      linkA_split_interest.xml
  2. 28
      linkB_ultra_strip.xml

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="linkA_split_interest">
<node name="input_params">
<real name="split_interest" minval="0.0">1</real>
<real name="split_interest_split">0</real>
<real name="split_interest_spread">0</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="split" />
<real name="spread" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
linkA_split_interest_init_result(split_interest, split_interest_split, split_interest * (split_interest_spread + 2))
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x_plus_weight = p_in.x + weight
x_less_weight = p_in.x - weight
num = x_plus_weight * x_plus_weight + p_in.y * p_in.y
den = x_less_weight * x_less_weight + p_in.y * p_in.y
a = (atan2(p_in.y, x_less_weight) - atan2(p_in.y, x_plus_weight)) * 0.5
r = spread * sqrt(sqrt(num / den))
fluxa = vec2(cos(a), sin(a)) * r
fluxb = vec2(-cos(a), sin(a)) * r
rflux = lerp(fluxa, fluxb, if unit_rnd_0 >= 0.5 then 1.0 else 0.0)
x_offset = if rflux.x >= 0 then split else -split
in
rflux + vec2(x_offset, 0.0)
]]>
</string>
</transform_def>
</user_transforms>

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="linkB_ultra_fill">
<transform_def name="linkB_ultra_strip">
<node name="input_params">
<real name="ultra_fill" minval="0.0">1</real>
<real name="ultra_fill_cyl_length">5</real>
<real name="ultra_fill_cyl_width" minval="0.0" maxval="0.95">0.05</real>
<real name="ultra_fill_cyl_blur_strength">1</real>
<real name="ultra_fill_inside_rotate">2</real>
<real name="ultra_fill_inside_size">1</real>
<real name="ultra_fill_inside_switch" minval="0.0" maxval="0.05">0</real>
<real name="ultra_fill_inside_strength" minval="0.5">1</real>
<real name="ultra_fill_inner_weight" minval="0.0" maxval="1.0">0.99</real>
<real name="ultra_strip" minval="0.0">1</real>
<real name="ultra_strip_cyl_length">5</real>
<real name="ultra_strip_cyl_width" minval="0.0" maxval="0.95">0.05</real>
<real name="ultra_strip_cyl_blur_strength">1</real>
<real name="ultra_strip_inside_rotate">2</real>
<real name="ultra_strip_inside_size">1</real>
<real name="ultra_strip_inside_switch" minval="0.0" maxval="0.05">0</real>
<real name="ultra_strip_inside_strength" minval="0.5">1</real>
<real name="ultra_strip_inner_weight" minval="0.0" maxval="1.0">0.99</real>
</node>
<node name="internal_params">
@ -30,10 +30,10 @@
<string name="winter_init_function">
<![CDATA[
linkB_ultra_fill_init_result(ultra_fill, ultra_fill_cyl_length * 10,
ultra_fill_cyl_width - 0.05, ultra_fill_cyl_blur_strength,
ultra_fill_inside_rotate * quartpi(), ultra_fill_inside_size, ultra_fill_inside_switch,
ultra_fill_inside_strength, ultra_fill_inner_weight)
linkB_ultra_strip_init_result(ultra_strip, ultra_strip_cyl_length * 10,
ultra_strip_cyl_width - 0.05, ultra_strip_cyl_blur_strength,
ultra_strip_inside_rotate * quartpi(), ultra_strip_inside_size, ultra_strip_inside_switch,
ultra_strip_inside_strength, ultra_strip_inner_weight)
]]>
</string>

Loading…
Cancel
Save