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
@pintoanimation in Wrangle node does not work
3880 4 1- ZacFilms
- Member
- 3 posts
- Joined: Jan. 2017
- Offline
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
ZacFilmsI'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?
I think its a tiny mistake somewhere
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@pintoanimation
to 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]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- ZacFilms
- Member
- 3 posts
- Joined: Jan. 2017
- Offline
- ZacFilms
- Member
- 3 posts
- Joined: Jan. 2017
- Offline
- Benjamin Lemoine
- 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 ???
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 ???
-
- Quick Links