(Solved) Need help understanding Phoenix + TyFlow interaction
#1
I did a simple smoke sim with a moving sphere in PhoenixFD, called Phoenix mp4.

I wanted to convert the smoke movements into particles, I've been trying many things but I can't seem to get it. Birth fluid with Fluid Force, Birth Flow with Flow update, nothing really works. I tried going back to PFlow with Phoenix birth and Phoenix Force, and it works immediately.

Am I missing something really basic? I don't understand how to get it to work... I output every single thing in my phoenix source in case I need the data, but it seems that I don't, I don't know how to utilise it. Tyflow version doesn't seem to be moving at all, seems more like it's producing new particles only. Replace option in Fluid Force rollout made it move but it doesn't exactly follow the smoke movement.

I am using Phoenix 3.12. tyFlow 57 build. Any help is appreciated.


Attached Files
.mp4   Phoenix.mp4 (Size: 2.28 MB / Downloads: 52)
.mp4   PFlow.mp4 (Size: 2.22 MB / Downloads: 39)
.mp4   tyFlow.mp4 (Size: 1.3 MB / Downloads: 42)
  Reply
#2
Looks like you forgot to output the Velocity channel in your Phoenix sim. It's required for particle advection, and off by default.
  Reply
#3
Thanks for the reply. I have velocity channel, but I am still in confusion over how to use it properly. I tried turning it on in the birth fluid channel, and the result is tyflow fill the whole phoenix simulation box with particles, so I assumed it was superfluous data.

I am attaching the scene file here, if you'd like to take a look.


Attached Files Thumbnail(s)
   

.max   SmokeSim.max (Size: 948 KB / Downloads: 28)
  Reply
#4
Oh, it might be the Phoenix version itself. Please update to 3.14 Smile
  Reply
#5
(11-10-2019, 05:49 PM)tyFlow Wrote: Oh, it might be the Phoenix version itself. Please update to 3.14 Smile

Noted, will do. Thanks for the help! I'll post here again if it still doesn't work.
  Reply
#6
Updated the Phoenix to Nightly Build, 3.14. Redid the simulation, with all outputs checked just in case. Input grid channel is Smoke+Velocity, but the same behavior still happens. Once Velocity is ticked in Birth Fluid, the whole Simulation Grid is filled with Tyflow particles. I'm quite unsure what I am doing wrong at this point.

If you would like to replicate it, I just create a sphere, clicked on the shortcut to create large scale smoke sim, animated the sphere to move forward in 50 frames. Then using the result in birth fluid and fluid force.
  Reply
#7
Really not sure what is the problem. 
I did it now really quickly, and everything is working. 

ALL I did is checked "velocity" in Phoenix output... everything else, I didn't changed anything. 
Added fluid birth - picked container, added fluid force - picked container... and it works. 

Attaching you file... just re-sim (it's simple, low res sim), and it should work. 

Make sure you download the latest Tyflow (from today), because I did that, before doing this test.


Attached Files
.rar   Phoenix_sim_velocity_ty_flow_2017.rar (Size: 177.92 KB / Downloads: 30)
  Reply
#8
(11-11-2019, 10:25 AM)d4rk3lf Wrote: Really not sure what is the problem. 
I did it now really quickly, and everything is working. 

ALL I did is checked "velocity" in Phoenix output... everything else, I didn't changed anything. 
Added fluid birth - picked container, added fluid force - picked container... and it works. 

Attaching you file... just re-sim (it's simple, low res sim), and it should work. 

Make sure you download the latest Tyflow (from today), because I did that, before doing this test.

Thanks for the help. I'll try it out.
  Reply
#9
Yours works, and I think I understand where we differ. But I am not sure if my understanding is correct. Feel free to correct me.

Looks like the primary reason why my simulation doesn't work with tyflow is because I was simulating something that was moving in time, and I parented the sim grid to the sphere while it is moving, and the grid keeps expanding over time. I did this because it will be pretty fast to sim at the beginning frames before it started expanding. For illustration purposes, imagine my sphere is 50cm, and moving forward for 1000cm. and I created a grid of 70x70x70 cm instead of something like.. 70x70x1100 cm.

Tyflow produced particles correctly but as soon as it left the initial grid (since the grid is moving forward together with the sphere, even though technically the grid itself is adaptive and therefore expanding), it loses the fluid force influence and it is stuck moving in 1 axis only.

After gaining this knowledge, I tried creating a grid that encompasses my whole animation path, and did not allow it to move with my sphere, essentially covering the whole path with the sim grid. Adaptive grid disabled.

Voila, it works perfectly, and I am still using version 57.

So, can I assume that anything that uses adaptive grid, and when the particle left the initial grid size, is ignored by tyflow fluid force calculation?

Also, what's the use of velocity channel input in the birth fluid? It still fills my whole grid with particles that's not part of the smoke. I did the velocity output in the sim, but looks like tyflow detected those automatically, so there's no need to tick the velocity channel in birth fluid. The documentation stated that anything with velocity above 0 will spawn particles, Does that mean the whole grid has velocity above 0?
  Reply
#10
Hi Syu,

The velocity thresholds should be used in combination with the velocity channel option in order to properly tune velocity-based birth. The higher the minimum value, the more velocity a cell will need to have in order to trigger a particle birth. If you are seeing particles born everywhere in the grid, it's because your velocity threshold is too low. In your scene, a min value of 75 gives a good result. One thing to keep in mind is that the velocity threshold is in the Phoenix container's unit scale, which I believe is in units per second, not frame.

The reason your Fluid Force is not working, is because you didn't actually select your phoenix container as the source, but instead a "PhoenixForce" object in your scene. You need to choose the fluid container directly. It seems the PhoenixForce object returns the same interface as a phoenix container (hence it being selectable within a Fluid Force operator)...even though it's not technically a compatible object with the operator. I didn't even know a PhoenixForce was a thing until I looked at your scene, heh.

So yea....increase your velocity thresh and select the proper container and your scene will work.

Edit: ah, I see the issue now: when upgrading tyFlow to support Phoenix4.0+, I changed the code which filters out non-Phoenix objects in Phoenix-related pickbuttons, and it's simply not working at all at the moment...that's why it allowed you to select a non-Phoenix-container object (the PhoenixForce)...this will be fixed in the next build.
  Reply
#11
(11-14-2019, 05:27 AM)tyFlow Wrote: Hi Syu,

The velocity thresholds should be used in combination with the velocity channel option in order to properly tune velocity-based birth. The higher the minimum value, the more velocity a cell will need to have in order to trigger a particle birth. If you are seeing particles born everywhere in the grid, it's because your velocity threshold is too low. In your scene, a min value of 75 gives a good result. One thing to keep in mind is that the velocity threshold is in the Phoenix container's unit scale, which I believe is in units per second, not frame.

The reason your Fluid Force is not working, is because you didn't actually select your phoenix container as the source, but instead a "PhoenixForce" object in your scene. You need to choose the fluid container directly. It seems the PhoenixForce object returns the same interface as a phoenix container (hence it being selectable within a Fluid Force operator)...even though it's not technically a compatible object with the operator. I didn't even know a PhoenixForce was a thing until I looked at your scene, heh.

So yea....increase your velocity thresh and select the proper container and your scene will work.

Edit: ah, I see the issue now: when upgrading tyFlow to support Phoenix4.0+, I changed the code which filters out non-Phoenix objects in Phoenix-related pickbuttons, and it's simply not working at all at the moment...that's why it allowed you to select a non-Phoenix-container object (the PhoenixForce)...this will be fixed in the next build.

Ah, yeah I noticed that after I uploaded the scene. I selected PhoenixFDFire most of the time (the simulation grid), but I was trying to see if I can get the Pflow version (PhoenixForce) to work in one of my test haha. The fluid force with the correct grid selected still doesn't produce correct movement until I disable adaptive and do a big enough grid to cover the whole simulation path.

Noted about the velocity threshold, but is the movement correct on your end? I can't recall if i tested it before but I think the movement after it left the initial grid is still not accurate to the smoke movement, threshold enabled or not. I will test and update this post.
  Reply
#12
Quote:The fluid force with the correct grid selected still doesn't produce correct movement until I disable adaptive and do a big enough grid to cover the whole simulation path.

Hmm, ok I think I see the issue here. Will aim to get it fixed up for the next build.
  Reply
#13
Great! Thanks so much for the responsiveness, it's been a joy working with tyflow.
  Reply


Forum Jump: