@pintoanimation in Wrangle node does not work

   3881   4   1
User Avatar
Member
3 posts
Joined: Jan. 2017
Offline
Hallo,

I have following Problem: I need to simulate a person dissolving to ash and particles. Particle sim is working so far, but if I connect both simulations, the ash doesnt work. I have a Boolean object, which is getting bigger and bigger and bools away the object, while transfering its white color to the dissolving object over attributetransfer. The particles are emitted from white scattered Points. I connect the Attributetransfer before he Attributewrangle in the other simulation, so I have the same color attributes. In the Wrangle node I tried to set @pintoanimation to 0 if the points have a @Cd bigger than 0.1, but it doesnt work. I think its a tiny mistake somewhere, but I cant find it. I would appreciate any help.
Thanks, Zac

Attachments:
ParticleAndClothSim.hipnc (484.6 KB)

User Avatar
Member
1743 posts
Joined: March 2012
Offline
ZacFilms
I think its a tiny mistake somewhere
I'm not 100% sure, but I suspect so too. Perhaps the last line of code in attribwrangle2 is scrolled out of view on your screen?

f@b = @Cd.r;

if (f@b > 0.1) {
f@pintoanimation = 0;
}
if (f@b < 0.1) {
f@pintoanimation = 1;
}
f@pintoanimation = 0;

That last line will always set f@pintoanimationto 0, regardless of the value of @Cd.r, since it's not in an if statement. Hopefully that's all that was amiss.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
3 posts
Joined: Jan. 2017
Offline
Oh, thank you. I changed it, but its still not working.
User Avatar
Member
3 posts
Joined: Jan. 2017
Offline
Gosh, looks like I have to figure it out in my own… Anyone want to help a poor student and collect some Karma-Points?
User Avatar
Member
143 posts
Joined: Oct. 2015
Offline
Hey ZacFilms !
i took a look at your file , i switch of some stuff for testing purpose
i saw a few problem …
number one , your script …ndickson was right , you only need :

f@b = @Cd.r;

if (f@b > 0.1) {
f@pintoanimation = 0;
}
if (f@b < 0.1) {
f@pintoanimation = 1;
}

number two :

i add a solver to have the white color accumulate

number three :

the cloth geometry is only import in the first frame
if you want the solver to take the changing attribute pintoanimation into account you need to do that in a sop solver

that's what i've done …

and it seems to work….

what do you think ???

Attachments:
ParticleAndClothSim_ben.hipnc (503.9 KB)

  • Quick Links