Tuesday, December 8, 2009

nParticles

nParticlesMeteor from Doug Holder on Vimeo.



So after Dave sent me some content on nParticles from Siggraph it made me want to dive into nParticles a little more. So I took the Shipkov/Shoneveld method for fluid shading particles in Dave's meteor tutorial, and applied the same technique to nParticles. Let me tell you, that was not as easy as I had hoped it would be. Albeit, it wasn't as hard as I'm making it sound but there were a few things that made it kind of tricky. I did like the built in curve for controlling the radius of the particles over age or ageNorm but I wanted to be able to use more of the curves to control more of the PP attributes instead of using as much of the particleSamplerInfo node. A while back Dave had me add this sonic boom like effect to the meteor I did a while ago so in the spirit of more goofing I decided to try the same effect with nParticles since the nParticles will work within the same solver and I have more control over how other nParticles are affected by each other within the solver, which is awesome. I had to kick up quite a bit of particles (300,000) but the "thick cloud" preset has a defaulted fluid shader attached to it and this made it easier to shade them accrodingly. It worked great. My only complication really was caching the nParticles. You have to make sure that in the nParticleShape node itself you need to set the cacheable attributes to "all" and make sure the box that says "cache data" under "memory caching" is checked. This caused some problems when trying to network render the sequence. I'm not sure and I haven't tested it yet but I think that because nParticles have a default fluid shader on the thick cloud preset that they handle fluid shading the particles better than normal particles. Like I said I haven't tested it yet but I could swear it moved a lot faster than the original meteor I rendered with normal particles. Anyway here is a preview of the nParticle fluid shading I did. The speed is wrong and should be faster but you can see where it was going. The real thing I would pay attention to is the sonic boom sim because this worked a lot better than I expected it to.

No comments: