Tanto
You have to reset @age at some point, otherwise the @age>15 condition will remain true.
Yup, you're right. I probably need a coffee.
Just had to add if(@infect==0)@age=0
Thanks!
Tanto
You have to reset @age at some point, otherwise the @age>15 condition will remain true.
int runover = chi("../runover"); string att = chs("../attributes"); string atts[] = split(att,' '); foreach(string i; atts){ float val = runover==1?prim(0, i, @primnum):point(0, i, @ptnum); adddetailattrib(0, i + "_min", 1e10); adddetailattrib(0, i + "_max", -1e10); setdetailattrib(0, i+"_min", val, "min"); setdetailattrib(0, i+"_max", val, "max"); }
int runover = chi("../runover"); string att = chs("../attributes"); string atts[] = split(att,' '); foreach(string j; atts){ float val = runover==1?prim(0, j, @primnum):point(0, j, @ptnum); float min = detail(0, j+"_min"); float max = detail(0, j+"_max"); if(ch("../toggle_fit")==1){ float fit = fit(val,min,max,0,1); setpointattrib(0, j, @ptnum, fit, "set"); } if(ch("../toggle_promote")==1){ setpointattrib(0, j+"_min", @ptnum, min, "set"); setpointattrib(0, j+"_max", @ptnum, max, "set"); } if(ch("../toggle_avg")==1){ float avg = avg(min, max); setpointattrib(0, j+"_avg", @ptnum, avg, "set"); } }
string att = chs("../attributes"); string atts[] = split(att,' '); foreach(string i; atts){ float val = point(0, i, @ptnum); adddetailattrib(0, i + "_min", 1e7); adddetailattrib(0, i + "_max", -1e7); setdetailattrib(0, i+"_min", val, "min"); setdetailattrib(0, i+"_max", val, "max"); }
string att = chs("../attributes"); string atts[] = split(att,' '); foreach(string i; atts){ adddetailattrib(0, i + "_min", 1e7); adddetailattrib(0, i + "_max", -1e7); setdetailattrib(0, i+"_min", "<read (i) as an attribute here>", "min"); setdetailattrib(0, i+"_max", "<read (i) as an attribute here>", "max");
miccetro
I think the ripple solver calculates the delta between the original geo and the rest geo for the ripples. In your setup, the position of the rest geo is animated and the Ripple object is set to 'Use Deforming Rest' (which is good if you want to say use some noise to deform the rest geo and add interest) so the change in delta cause the object to translate.
A better solution might to to update the ripple points as the sim runs. See example file.