Smoke Simulator support for emitting from Particle Children and Trail
Open, NormalPublic


This patch fixes ignoring of particle settings like children and trail by smoke emitters. I think it's necessary to support those for serious special effects work to get rid of those smoke "bubbles" produced each frame by very fast moving objects like rockets and explosion debris, especially in highres domains. Currently only the key position of a particle is used for smoke emitting and this only per cell not even taking into account the particle's radius.

I threw some heavy scenes at it and it seems to be stable. I have also added a patch for children support only, since it's much less invasive than the trail code and therefor should be easier to review and can serve as alternative.

A simple test scene and screenshot is added as well.



Assigning to Daniel. :) The screenshot looks promising, thanks for that Kai!

Looks nice.

Just one thing: You're mentioning that Smoke is not even taking the particle radius into account. This is correct. But your statement sounds like you have a patch to fix that, too? :-) Otherwise, I would add that code.

Thanks for the patch, very usefull indeed.
Will apply after review.

No, I'm afraid I have no further code for particle size. I just hope performance won't suffer to much from filling in spherical volumes like this in highres domains. Although I think it's something expected to be implemented. So, thanks in advance to you too. :)

Will have to re-check this patch before commit since at least "trails" make no sense and are also buggy ("ChildParticle *cpa= &psys->child[p-totpart];" results in a negative index).
I am also unsure if trails make any sense since "trails" mean that you are actually rendering the particles. So if you are drawing the particles in the render, why do you need smoke? Smoke uses particles _only_ to determine where to emit smoke. And using "trails" acutally mean that you end up with halos from the rendered particles in addition to the simulated smoke.

Stil have to review the child particle patch.

@ Kai: I just commited the child particles potion of this patch. Thank you very much!

I'm unsure about the bug at the moment too, since I didn't look at the code again. But I can show you an example where emitting smoke from trailing particles can be useful. Check the bubble-example image I attached, that might illustrate my first explanation better.

I didn't care to much about the halos since I always ended up having halos there when I set up a new particle system for a smoke simulation. I get used to the habit to just put the particle system in a different layer to get rid of the halos. But I think you are right about the fact that the way how particle render/display options work with the patch is quite confusing. My suggestion would be to make the option for particle trails also available when the render option is set to none. That way you can use it just like single particles as smoke emitter and the UI would make sense again. And most importantly you can easily disable halo rendering again, of course.

I'm still convinced that they would be a useful additon. They are like motion blur for smoke.

Hello Kai,

I didn't want to be blund :) And I can see your reasoning now. I love the idea of having the possibility of trails without rendering them. Will have to check with jahka though.