Vray and large scale particle simulations. Part one…

I have definitely been guilty of having software fanboy tendencies in the past. If I find something that performs a specific task well, I want to use it for everything! I dig in, I buy the t-shirt, and shout it’s praises from the hilltops! Then the inevitable day comes when a scenario presents itself where that beloved software fails me, or at the very least fails to shine as brightly as I expected it to. I ran into this situation again recently with Krakatoa MY. The results of the renders were just not quite hitting the mark of where I needed them to be. The main problem being that with Krakatoa MY you cannot generate accurate shadows…or any shadows for that matter to cast from your particles to the surrounding geometry. I spoke recently with the guys at Thinkbox Software about this problem at Siggraph, and they confirmed that there is in fact currently no way to have Krakatoa MY cast a shadow onto surrounding geometry unlike its Studio Max cousin. I’m sure it will be there in a future release, but as for now you need to find a creative alternative.

I’ve managed to find a somewhat passable workaround, but it’s far from perfect. My particles originated in Realflow, and I was able to jimmy rig a shadow caster for my Krakatoa render by meshing those particles in Realflow, and bringing that mesh back into the Maya scene under my Krakatoa particles. Using a combination of render layers and turning the primary visibility off on the meshed particles I was able to get a cast shadow on the other geometry in the scene. That’s all well and good, but the next problem would be getting believable self shadowing and occluding contact shadows in the Krakatoa render itself. Are you sensing a pattern here? To be fair, I love Krakatoa. I think it’s an amazing software and tool under the right set of circumstances, but like I mentioned earlier I caught myself becoming a Krakatoa fanboy and needed to accept the fact that I had to start looking for alternatives depending on the desired look of the specific job at hand. If you’re looking for ethereal additive beautiful smoky wispy redners, then Krakatoa is the best in the biz. It renders lightning fast, and eats particle counts in the hundreds of millions for breakfast! The viewport particle load slider alone is a thing of beauty. It allows you to navigate and maneuver around effortlessly in your viewport with scenes in excess of hundreds of millions of particles, but only calculating a small potion to actually be visible in the scene. So in other words your viewport shows a particle load of say 200k particles, but at render time it actually sees and computes the full 100 million particle sim. Amazing!

So now that I’ve cut the chord, where to now? Sitting at my desk staring blankly at the wall as I often do, I thought to myself, “What about Vray and Arnold?”. Surely they can render particles. Why not?! I use both on a daily basis, and had never actually tried to throw particles at them before. This could be fun! So I sat down with friend and MPC colleague particle guru Matt Johnson after lunch one day last week, and we hatched a plan to throw a sim of about 5 million nParticles at both Arnold and Vray just to see what happens. The results were both awesome and troubling lol, but mostly awesome!

As you can see, Vray actually holds it’s own in the particle rendering department. Each frame taking about 25 to 45 minutes depending on lighting and motion blur values. A few preliminary findings:

1) Vray casts accurate shadows, and has accurate self shadowing and occlusion! Hallelujah!!!! They do however render slower by at least a factor of ten compared to Krakatoa from my testing, but who cares!!! Accurate shadows baby!!!! Sometimes you have to pay the piper to get the look you’re after, but if you are clever you can get those render times down by using a higher threshold if you know you will have major motion blur or plan to use zdepth in comp. You can always get away with hiding a lot in comp with the right passes, and no one has a better render pass selection than Vray. Work smarter not harder I always say!!!

2) It’s not all rainbows and unicorns though kiddies, sadly you cannot use Vray RT to look dev your particles as of version 2. Perhaps in version 3? For fast lighting, and color testing I suggest raising your threshold value to something like .80 then when you are happy with the look take that number back down to .01 for rendering.

3) Motion blur is costly at render time, and there is a sweet spot that you will have to find for your own simulation. Sometimes 1 is almost nothing, 2 is good, and 2.5 is too much. It also depends on your scene scale, and the distance of the particles from your camera. There is no one magic setting, you will have to test multiple settings. Start with the default, and move up in increments of one half.

4) Like most particle sims if you don’t have adequate motion blur it will look very “Sandy”. Krakatoa to my eye still does the best job in terms of smoothing out the grain, but Vray can get you pretty darn sexy pretty darn fast comparatively.

5) If you set your Vray standard material to be 50% grey, you can paint the color you choose onto your particles using your scene lights. Setting the color value of the shader on the particles to anything with a more true saturation of any one color will totally overpower this effect in favor of the chosen color. So stray from grey at your own risk when using this light painting method.

6) You can get a depth pass using particles, just be sure to verify your min and max distance values. I usually use a locator in conjunction with the hud display, or select my camera and manipulate the “far clipping plane” up and down to locate my optimal focus plane as well as the exact distance variable for where the visibility of my scene ends. If you leave the min/max at default settings your zdepth pass can sometimes come out blank because the distance calculated was too large to return an accurate result. Stick to verifiable values, it only takes a second to find them anyway. Don’t be lazy!!!

Finally here is an animation test using a single area light, and a sky dome with a low value.

I hope Part one of this experiment was informative, and please look out for future installments where I will test the same particle load in Arnold, and then compare and contrast the big three Vray, Arnold, and Krakatoa.

Special thanks again to my friend Matt Johnson for the particle rig. You can check him out at www.postTread.com

3 comments on “Vray and large scale particle simulations. Part one…”

Still working on it! Some of these particle sims can take forever to run. I like to do a good deal of benchmarking and testing before I post my results, but I will have an update in the next few weeks. Thanks for the interest!

Great to hear – we’re currently looking into larger scale particle sims ourselves here, for the first time really. Choosing the appropriate render engine is going to be part of that process sooner or later, too.

So far we spend most of the time trying to work on the workflow itself – it just seems to be too time consuming running all those simulations, re-simming everything etc. etc. Haven’t really gotten to the point of testing the rendering part in our little R&D part, yet, so your tests here are super valuable to us! We owe you a beer 😉