Skip to content

Instantly share code, notes, and snippets.

@ChuckieChen945
Created November 16, 2025 03:22
Show Gist options
  • Select an option

  • Save ChuckieChen945/0ab2e4d4812b62380c1dbc0246ce7a53 to your computer and use it in GitHub Desktop.

Select an option

Save ChuckieChen945/0ab2e4d4812b62380c1dbc0246ce7a53 to your computer and use it in GitHub Desktop.
xgen 表达式
长度随机表达式:
$a = 2.00000; #0.00,10.00
$b = 2.00000; #0.00,10.00
rand(%a,$b)
flyaway 表达式:
$nonStrayValue = 0.0100;#0.0,1.0
$strayValue = 1.0000;#0.0,1.0
$percent = 9.0000;#0.0,100.0
$stray = hash($id) <= $percent/100.0 ? $strayValue :$nonStrayValue;
$stray
flyaway2: 
放到noisemask:
$percentStray=20.0000; #0.00,100
rand() < $percentStray/100.0 ? 1 : 0
放到noise的幅值
$min=0.0100;#0.00,0.20
$max=1.5750;#0.20,10.00
$seed=5;#0,10
$mag=rand($min,$max,$seed);
$strayMin=0.4550;#0.0,5.0
$strayMax=2.4000;#1.00,20.00
$strayNoise=rand($strayMin,$strayMax,8);
$noise = stray() ? $strayNoise : $mag; $fitMax=5.6850;#0.00,20.00
fit($noise, 0,1,0,$fitMax)
随机:
从前数字到后书记随机选择
rand(0.0,1.0)
在clump的mask上面加入随机数值:
$percentStray=5;#0.00,100
rand() < $percentStray/100.0 ? 1 : 0
You can add this expression to the Guide Color Parameter on the output tab:
引导线颜色改变为区域贴图表达式 
map('${DESC}/Region')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment