27-03-2019, 11:17 AM
Hi,
I am trying to use ObiFluidPropertyColorizer which is a sample script that colors fluid particles based on their vorticity (2D only). However, vorticity returns always zero. Actually, it's not. I think there's a problem with taking data correctly;
float v = emitter.Solver.userData[emitter.particleIndices[i]][0];
What does zero here (emitter.particleIndices[i]][0]) mean? Does the zero channel give vorticity? I have tried to change it to different values, but get no data. Actually, I am trying to get particles colored according to (density-restDensity)/1000.0f). Is this possible?
I am trying to use ObiFluidPropertyColorizer which is a sample script that colors fluid particles based on their vorticity (2D only). However, vorticity returns always zero. Actually, it's not. I think there's a problem with taking data correctly;
float v = emitter.Solver.userData[emitter.particleIndices[i]][0];
What does zero here (emitter.particleIndices[i]][0]) mean? Does the zero channel give vorticity? I have tried to change it to different values, but get no data. Actually, I am trying to get particles colored according to (density-restDensity)/1000.0f). Is this possible?