AWS Thinkbox Discussion Forums

Stoke and Real Flow sims

Hi there,

We’re currently going to start testing stoke mx and I wonder if we can use it directly with bin sequences from real flow or if we have to convert to prt sequences inside 3dsmax using pflow.

Cheers,

Stoke MX does not read BIN files. It uses PRT for caching, so you can use a Stoke Particle Simulator as a PRT loader, but you cannot use it to load BIN files.

If you are using Krakatoa MX, you can already load BIN files using the PRT Loader. If you have to convert the BIN to PRT files, you should use Krakatoa instead.
The latest versions of RealFlow can write PRT files too, but I don’t recommend to use that because some channels are named incorrectly (e.g. “ID” is written as “id” and does not work in Krakatoa and Stoke).

Long story short, if you are using Stoke, you should also be using Krakatoa and its PRT objects.

Hi Bobo,

We’ve just purchased stoke, and I have already real flow sim, krakatoaprtloader to import bin sequence over max. But when using stoke, i’m having some weird results (for sure my fault!). I’m not having the same result in terms of velocity and trajectory’s. Maybe you can give some directions over here (yellow-krakatoaprtloader using bin and pink-stoke simulation using krakatoaprtloader as distribution object and for velocity field (grid spacing 1 and grid padding 5).
Already saw all webinars related to stoke (mindblowing!), but there is no example using this specific procedure (realflow+bin+krakatoaprtloader+stoke).

I’ll continue digging!

Cheers!

Hi Rui,

The Grid Spacing is the main factor that affects how precisely the velocities are transferred. I cannot tell you what value to use because it depends on how fast the particle is moving between frames and how big the simulation is. Often RealFlow simulations are in Meters, and loading them in Max could produce a simulation that is only a few tiny units wide. So a value of 1.0 could be too large.

If you create a sphere around your particles on the very first frame, what would be the radius of that sphere? Once you have that value, divide it by about 50 and use the resulting value for your Grid Spacing. If the value is too small, scale the PRT Loader 100 times - Max does not like working close or below 1.0 generic unit size.

When the Grid Spacing is too large, all the velocities falling in a voxel will be averaged, which probably explains why your Stoke particles are moving in the right general direction, but are lacking all the subtleties of the original motion.
But you have to also keep in mind that you can never reproduce the exact motion, just the general character of the simulation even with the most optimal settings.

Hi Bobo,

Thanks for the tips… even after changing scale, making all the tweakings, etc, it seems to be hard to have the same movement (similar anyways). Maybe it’s a problem with original real flow speed (too fast), but anyways, this was just a simple test.

I have some other questions about stoke:

1 - While partitioning, can we somehow tweak the distance between the new particles. Imagine we have 100 (big value that gives a big gap) units separating two particles and we would like to fill the gaps between them. If we could somehow tweak this value I would be able to lower my original sim resolution and add it while partitioning, right?

2 - Can we add wind effect (or other max force) to stoke but only affecting one axis of it’s velocity? Imagine particles flowing inside a plane. I would like them to keep on that plane but having this force applied to each particle (x axis for example).

Cheers,

A little update:

Changed playback - real time off and now it’s working perfectly… I have nvidia GTX 780…
Even the krakatoaprtloader was having strange behaviors, and that’s why i’ve changed this setting. This strange behavior is only happening while using bin files.

Cheers!

You can retime the BIN file using the PRT Loader to play back 10 times slower - just use the Playback Graph option and set two animation keys with linear type in the beginning and the end. For example, if you have 100 frames animation, you can keyframe Playback Graph with 0 on frame 0 and with 100 on frame 1000, and the animation will play back 10 times slower. If you check Interpolate Frames, the particles should move smoothly between original frames.

Then use this slower version to simulate in Stoke, and then retime the Stoke PRTs to play back 10 times faster.
This way, you can use much smaller voxels without losing as much detail.

Krakatoa PRT Cloner has an option to seed new particles on a grid using base particles. Of course, it does this on every frame, but you could cull the particles by Age using Magma to leave only the new-born ones, then repopulate using the PRT Cloner, and use the result as the seeding points of your Stoke particle simulation.

You could do this using Stoke 2.0 field tools by sampling particle data on a grid yourself, then producing seed points using a Stoke PRT Field object. Stoke 2.0 is in Beta, but should be out soon. If you are not on the Beta yet, let me know…

Again, this is quite easily done using the Stoke 2.0 Field tools. You can use ANY source including Max SpaceWarps, FumeFX, Max Particles and whatnot, then kill some of the components of the vector using Magma.

Privacy | Site terms | Cookie preferences