Mocap + Naiad + Krakatoa

Hey there,

as I have only a few days left of my 30 day evaluation license for Naiad I’m trying to rapidly finish at least one project :smiley:. In this setup I used a motion captured character out of Mayas library, exported it to Naiad and simulated a water dancer (:. Was a bit more complicated than it sounds though…but who am I telling that :wink:.
Of course, I don’t just want to show you how far I’ve gotten yet. I have one question. In the video you’ll notice that sometimes particles are just exploding and flying away quite fast. I thought of killing these by a velocity threshold but I am not sure if that’s possible after I’ve cached the PRTs or if it’s better to do this in Naiad in the conversion process (EMP read -> “kill velocity > x” -> body write PRT). I thought, a bunch of you might have experience with doing this kind of stuff and can give me some advice on fixing particle sims without recalculating everything until it’s perfect.
Since it will still take a while until the video is available on vimeo I already attach one frame where you see 6 streaks on the left of the dancer (viewer’s perspective) resulting from the exploding motion I spoke about and the motion blur samples.

vid (in approximately 20mins):
https://vimeo.com/45073053

EDIT: I guess the video quality is not high enough to see many of these particles shot around. Gonna replace the video file, link stays the same.

I personally would do this in a Magma modifier on top of the PRT Loader. Mainly because you can dial in the threshold to clean up the look as a post process without affecting your source data.

Also, the PRT file saved by Naiad has two channels that can be helpful in this case. In addition to the Velocity (Magnitude), you can also check the Droplet channel which contains the likelihood for a particle to be detaching from the main body of water. A particle deep inside the body of water has a negative value, a particle completely detached has a positive value of 1.0 (guaranteed to be a droplet), the rest have a floating point value somewhere in between depending on their relationship to the surface of the fluid. So checking for both the Droplet and the Velocity Magnitude can ensure that even if a particle is moving very fast, it won’t be deleted unless it is detached from the fluid…

Nice, thank you Bobo. That works perfectly and you are right that it’s better to have all the control which particles to delete after the sim. Right now I am checking if the magnitude of the velocity is greater than float x, convert the result to float and parse this into the selection output. Then I add a Krakatoa Delete modifier that deletes the selection. Is this what you had in mind, too?

I am going to check the Droplet channel now.

Edit:

In this case the Droplet channel might be not as useful. There are no real distinctive values that could be considered as a droplet in a frame where I get the moblur streaks, maybe because they become a droplet in the next frame.
…oh, nevermind. I only displayed 1000 particles in the data viewer, so I might have overlooked them…yep, now I see value 1.0 :blush:

I killed particles with velocity magnitude greater or equal to 10 and this got rid of my “bolters”. I wonder if there’s a way to invert the Krakatoa Delete modifier with a one click solution. Then I could always check that there are no particles deleted that I don’t mean to. One way would be to duplicate the KCM, change it to delete below a vel mag of 10 and then switch both KCM on and off. I am a friend of simple stacks, so a tiny “invert” function on the Delete modifier wouldn’t be too useless, would it :wink: ?
Another thing: is it normal that my KCM modifiers randomly rename themselves to the default name after I copy paste one of them? I named them properly, then wanted to add one and swoosh, they are called KCM_Selection again :confused:

Are you running Krakatoa 1.6?
In the old style KCM modifier, there is a checkbutton at the bottom called “>Disable Auto-Renaming”. It is unchecked by default. When unchecked, the KCM modifier will be named according to its Output channel, so “KCM_Selection” in your case. If you check the button, you can enter custom names.

In Magma 2.0, there is a checkbox called “Auto Rename” which is checked by default. When unchecked, it won’t rename automatically. Since in 2.0 you can have multiple Output channels, we use only 3 letters of the channel name, thus a modifier will be called “Magma_Sel”, and if you also output to Color and Density, it could be “Magma_Sel_Col_Den”

There are several ways to do this.
The simplest way is to insert a LogicalNot operator after the test and before the ToFloat → Selection. Then you can just hit Ctrl+P with the LogicalNot op selected and it will pass through or not, thus not inverting or inverting the value.
But you cannot expose this to the UI. If using a KCM in Krakatoa 1.6, you can insert a Multiply after the ToFloat and before the OUT:Selection and multiply by a Float. When set to 1.0, it will be passed through. If set to -1.0, it will invert. If set to 0.0, it will kill them all. You can make this more elegant by connecting the second socket of the Multiply to a Switch operator, setting the Switch 1st input to 1.0, the second to -1.0, and the third to an Integer InputValue which you can expose to the modifier’s UI. Now when you have the integer set to 0 (FALSE) it will invert, when set to anything else it will be TRUE and the selection will stay.

Even better, in Krakatoa 2.0 using the new Magma 2 modifier, you can expose the Integer and since it is connected to a Switch, it will appear as a checkbutton in the command panel!

I really recommend using the Magma 2 modifier and forgetting the “Krakatoa Channels” ever existed. :slight_smile:

Ah yes, I accidentally used 2 KCM and 1 Magma modifier and didn’t see the Auto-Rename function :open_mouth:
Thanks for the solutions on switching on and off. I used a similar approach with a Switch node, can’t look at it right now as I am rendering my highres sim which took 25hrs in naiad ;D

Heyhey,

wanted to share the current version of the sim with you guys.

http://vimeo.com/45534029

Unfortunately, I got a lot of work to do right now and can’t try compositing tricks :smiley: