realflow to max

I am exporting particles from houdini and use a PRT Loader to load them, but the location of the PRT loader in 3dmax can not match which is in houdini.

two images below:1.jpg is rendered in houdini,2.jpg is in max, export camera use FBX, export geo with obj format, match exactly! so there is no problem with camera matching.
2.jpg
1.jpg

flipbook preview in houdini is like this
3.jpg

use PRT loader to pick up realflow bin files, rendering with Krakatoa. see this image.
4.jpg

so my question is : how to modify PRT’s location to match with realflow?

I first rotate PRT 90 deg in x axis and 90 deg in z axis, seems the height of these particles mirror from the "correct " positions respect to Y axis in world space.

here is my scene.I delete ocean obj.
rf.rar (448 KB)
scene.rar (17.2 KB)

It is tricky to figure out the cause for this, but I suspect there is something going on with the conversion of coordinate systems (Y up vs. Z up).

Assuming that the BIN file contains Y up positions, you would expect the world Z axis to end up as the negative Y axis in Max, and the world Y axis from the original scene to translate to the positive Z axis in Max. There are two ways to shift the coordinates in the PRT Loader - either by transforming the scene object by the correct matrix, or by using a KCM to swap the Y axis for negative Z and the Z axis for positive Y.

The transformation matrix to convert from Y up to Z up would be, in MAXScript,
(matrix3 [1,0,0] [0,0,1] [0,-1,0] [0,0,0])

For example, if you have a point with coordinates [1,2,3], then
[1,2,3] * (matrix3 [1,0,0] [0,0,1] [0,-1,0] [0,0,0])
[1,-3,2] --> the X axis remains the same, the Y axis in Max is the -Z axis from the source, the Z is the Y.

The KCM just took the Position channel, used ToScalar to split the X, Y and Z components and combined the X, the -Z and the Y using ToVector which was output back as Position. The resulting particle placement matched the result from the the above transformations (transformations were of course disabled while running the KCM).

In both cases the resulting particle positions were rotated at 90 degrees relative to the fluid mesh/PRT Loader you posted, so there must be something wrong in the way the BIN file was exported, or the way we are converting the coordinate systems.

I am not an expert when it comes to RealFlow, so I wonder if there is anything special about the way that BIN file was created that would explain the 90 degrees rotation about the vertical axis I am seeing… This does not explain why the particles are off compared to the source (as no scale factor can bring them where they belong visually), but if the rotation doesn’t make sense, I cannot even start figuring out the other problem. Also, are we absolutely sure the BIN file contains the exact same particles (same frame) as the screenshot you posted from Houdini? They appear similar, but not 100% the same. For example, in the center back there is a small “hill” covered with particles in Houdini, but with absolutely no particles in your Max Krakatoa rendering. So I wonder if the frame 0001 you sent really contains the particles we see in Houdini…

ok,I made it. I will make this problem clear tomorrow, too tired today.
5.jpg

YAY! Let me know what the issue was when you know more, I would love to learn something from this experience too :slight_smile:

BoBo, I sent u an email but not sure u receive it well, so I post here, but can not upload my scene its big.

After using PRT loader to load bin files, simply rotate 90 deg in X axis and 90 in Z axis, then 180 deg in Y axis, last I use KCM to only negate Y component, 100% match!

Before discussing this I am sure there’s no coordinate system problem with realflow plugin. you can do an experiment with exporting and importing with houdini and realflow.

Refer to this page: euclideanspace.com/maths/alg … /index.htm, what is happen between conversion of coordinate systems from houdini to 3dmax, let’s see below:

a point with coordinates [1,2,3], then [1,2,3](matrix3 [1,0,0] [0,0,-1] [0,1,0])(matrix3 [0,-1,0] [1,0,0] [0,0,1])*(matrix3 [-1,0,0] [0,1,0] [0,0,1])

vector P comes to be [-3,-1,-2] , at last I negate Y,so P get its new coordinate [-3,1,-2]

but I am not sure things alway go on ,just in my case.

If you like to play with realflow win64 plugin for houdini non-commercial,
you can download below,both are free

realflow.com/descg_240107_02.htm

sidefx.com/index.php?option= … Itemid=208

Exactly this problem occurs if you export Bin sequence with Krakatoa and load the Bin back with the RF Particle Loader or Pflow Rf particle loader operator.
The particles are rotated and mirrored. If you load them back with PRT loader they are fine.
Would it be possible to add some options to change axis orientation and mirroring when we export out the particles with Krakatoa. Because you cant mirror particles in Realflow at all (they come in into RF mirrored too) and its not that easy if you load them back into Max either.

Doesn’t RF have axis settings, like you set it to be like Maya, 3ds max, or LW? I thought there was a preference for that…

Hello Chad (long time no talk),
Yes RF has preferences to flip the axis, but If you work in max and export everything out and comes out normal (Z up), than you export particles and the come in mirrored to RF, does’nt help. You cant mirror binLoaders in RF:)
And the RF particle loader in max should work and know which axis is up. I reported the RF connection plugin problems to Next-Limit, but we’ll see what happens in therms of fixing it. Not a big feature I am asking just some parameters to have control when we export the particles…
Thx

We are adding to Krakatoa the automatic conversion of Max right-handed Z up space to RF left-handed Y up space when dealing with BIN files. After all, a BIN file should always be in RF’s own coordinate space.
The next Beta build should hopefully solve this problem.

Oh Hi! Didn’t know you were that Atka, thought you might have been one of the other 006. :slight_smile:
Going to see you at SIGGRAPH this year?