实现方式
1.noise
2.primuv
3.boolean group
4.使用sort @Time group(0)
使用vex
1.findshort 创建连线
2.explodeview分散线
3
point vex
f@u = frac(d*@Time*s+rand(@ptnum)*@r);
@P = primuv(1,'P',@ptnum,@u);
light vex
v@p0 = point(1,'P',@primnum);
f@cd = distance(@p0,@P);
@Cd = @Cd+5*fit(@cd,0,0.03,1,0)*@u;
【points]
float s = chf("speed");
i@r = chi("random");
f@s = rand(@ptnum)*s;
if(@s>0.5)
@s = @s*2;
f@u = frac(@Time*@s+rand(@ptnum)*@r);
@P = primuv(1,'P',@ptnum,@u);
[light]
f@dec = chi("diffuse"); //光随线长度衰减
if(!@dec)
f@u = 1;
else
f@u = (float)1-point(1,'u',@primnum);
f@lightLen = fit01(rand(@primnum+11),chf("light_minlen"),chf("light_maxLen")); //限制光长度范围
v@p0 = point(1,'P',@primnum);
f@s = point(1,'s',@primnum);
f@cd = distance(@p0,@P);
v@speedcolor = chramp('speed_color',@s);
@Cd = @Cd+@speedcolor*fit(@cd,0,@lightLen*0.1,1,0)*@u;
控制光或线颜色
v@speedcolor = chramp('speed_color',@s);
@Cd = @speedcolor*0.3;
sort-》shift $F
color -> group point 0
foreach prim
2
nprims distance 实现
copy nprim('../copy1')
3
primuv pcopen 实现
随机添加 random @time
4 labs mops 模块实现点移动
通过copytopoint ,fuse ,findshortestpath 建立起基本结构
对只选择的点进行流光
@u = vertexprimindex(0,@ptnum)/float(@numvtx);