Jump to content

foam and spray


borisb2

Recommended Posts

Hi,

 

I have a base Flip-sim where I want to run secondaries. I'm just using foam and bubbles at the moment.

 

This looks a bit odd:

foam.0069.jpg

 

It looks like the foams overshooting the base sim and not sliding fully with the surface.

 

Does that look correct to you? Is that maybe a substeping issue (using 2), because the river flows quite fast?

Link to comment
Share on other sites

Here's a mov of the first 70 frames:

www.ambientfx.de/files/foamTest.mov

 

and the scene:

www.ambientfx.de/files/flip_riverbed13_08.hip

 

the foam is also behaving weirdly in some places.

 

frame 37 and 38:

foamTest.0037.jpg

foamTest.0038.jpg

 

Does the fluid move too fast for 2 substeps?

 

Thanks for any help

Link to comment
Share on other sites

Did another sim including spray. is there anything I can do to avoid the missile trails that are in the secondaries? (guess I would need to isolate individual droplets in the base sim and kill them?)

Also, the spray/foam is looking as it would dive into the base sim in some places rather than properly colliding with it ... again, substepping?

Also, why does the spray/foam always looks like its a bit faster than the base sim? I already tweaked the shape in the whitewater emitter to use no vel-offset adn no stretching

Have a look here:

http://www.ambientfx.de/files/foamTest2.mov

maybe anything completely wrong with my setup?

Damn, I never had such a slow progress in an FX-rig with naiad, flowline or synapse.. Maybe I'm getting too impatient ;)

Edited by borisb2
Link to comment
Share on other sites

I can't run your sim without the riverbed geo, but there are a few things you can try:

 

Copy your collision setup from the FLIP sim to the ww sim just to get the whitewater colliding with the riverbed as well.

 

You could try turning down the Inherit Velocity on the ww emitter by a bit if it seems to be ahead of FLIP too much.

 

I would recommend against turning off all the velocity offset and stretching.  Those settings on the Whitewater Emitter are just from its embedded PointReplicate SOP, so using one of those on the output of Whitewater Source is a good way to test what your emitted whitewater will look like.  Also try adding a little noise on these tabs to further break things up. The noise affects emission velocity as well.

 

Because all of the particles transition from one state to another, you can get some flashing if you've got Spray disabled in a fast sim, when foam particles briefly turn to spray then back to foam.  For a "mostly foam and bubbles" pass I would leave spray on but use the Velocity Offset setting to move the emission back towards the fluid and increase the Foam Depth and maybe Iso Surface to make more particles foam.  Then just delete the spray particles after the sim in SOPs, or (better) keep them and merge them with your dedicated spray pass.

 

Ideally you wouldn't substep at all for the Whitewater Solver, but if you must be careful with caching to files. The default $F used in filenames only expands to integer frames, so you should probably use $FF instead.

 

Hope some of that helps.

Edited by johner
Link to comment
Share on other sites

thanks john for your tips.

 

First, here's the riverbed obj - in case you want to run the sim:

www.ambientfx.de/files/riverbed.obj

 

Igor pointed out as well that it might be a substepping/filecache-issue. I was running the base sim with substeps of 2 (on autodop-node), but wrote out the bgeos only as $F4.bgeo. The whitewater sim I then tried to run with substeps of 2 as well (calling..$F4.bgeo) .. might that be the main problem? .. will run a new sim with substpes of 1 to test that.

 

I think as well the flashing I had in my first was due to the disabled spray and transition to that state .. in the latest sim everything is enabled, no more flashing, but still no propper advection . but again, might be the substepping issue.

 

Another thought: because my base sim is pretty thin, and I tweaked the foam-depth to .02, might that be a problem as well because the base sim is just too shallow? If thats the case, would another secondaries setup be a better idea to add some splashy secondaries on top of a shallow sim? .. or using a bigger foam depth?

 

Thanks again for your help

Link to comment
Share on other sites

so I tried now both:

- substepping of 1 for base sim and writing that out as $F4.bgeo, then using 1 in substeps for whitewater sim

- substepping of 2 for base sim and writing that out as $FF.bgeo, then using 2 in substeps for whitewater sim

 

substepping of 1definitly looks better, but still streaky and a little ahead of the base sim

 

substepping 1:

foamNewSub1.0023.jpg

 

substepping 2:

foamNewSub2.0023.jpg

 

may I ask again, does the whitewater setup (at least for spray) maybe doesnt work that well for thin sheets of FLIP-fluids because it would need more depth like in water tanks?

Edited by borisb2
Link to comment
Share on other sites

just to be sure .. I tried new scene. just copied my geo.

 

Default flip setup, default whitewater setup. substepping 1, particle separation .01.

 

fuck.jpg

 

so it looks like the spray is the issue. Its hard to control them to not overshoot the base sim. There's the drag attribute but that doesnt seem to have much of an effect. Is there anythign else I could do to better control the spray part of WW-setup?

Edited by borisb2
Link to comment
Share on other sites

..

Ideally you wouldn't substep at all for the Whitewater Solver, but if you must be careful with caching to files. The default $F used in filenames only expands to integer frames, so you should probably use $FF instead.

 

but you're saying it would be ok to cache out main sim with substepping of 2 (but as $F4.bgeo), and still use ww-setup with substepping of 1? Thats what I'm doing at the moment, and for foam and bubbles it looks correct .. just the spray overshoots..

Link to comment
Share on other sites

but you're saying it would be ok to cache out main sim with substepping of 2 (but as $F4.bgeo), and still use ww-setup with substepping of 1? Thats what I'm doing at the moment, and for foam and bubbles it looks correct .. just the spray overshoots..

 

So... turns out the spray overshoot is a bug, and it's been in H13 for a long time.  Thank you for complaining loudly enough and providing a good enough test case to force a thorough investigation  ;)

 

Just a bit of background, the Whitewater Solver first showed up in H12.5 and was the only thing to use the fledgling POPs in DOPs framework.  When that framework was fully fleshed out for H13, we upgraded all the solvers and emitters to use the same tools as POPs, e.g. Whitewater Emitter was upgraded to use a POP Source internally.  Somewhat later in development, POP Source gained the ability to jitter the emitted particles Positive and Negative in time, with a default to Positive.  Unfortunately the Whitewater Emitter already does something similar through its Velocity Stretch option.  We didn't catch that the POPSource was also moving the emitted particles along the velocity vector by default, so it's happening twice.  Hence the overshoots.

 

The problem has been there since H13's release; your case just shows it really well because 1) you have fluid with a high speed leading edge, 2) you've got Timescale set to 0.8, which means time is slightly slowed down in the FLIP and WW solver.  Unfortunately the emitter doesn't know that so was jittering the full timestep.

 

Anyway, we need to discuss the best way to fix this without breaking backward compatibility too badly, probably by exposing that option on the POP Source to the Whitewater Emitter level (or maybe just turning it off; it's really incorrect).  In the meantime you can right-click and Allow Editing of Contents on the Whitewater Emitter and then on the whitewater_source node, set Jitter Birth Time to None (on the Birth tab).

 

I've attached your file with that change and a few other modifications, and I put flipbooks of the sim with (red) whitewater here:

https://s3.amazonaws.com/vfx/FLIP/riverbed_ww_wide.mp4

https://s3.amazonaws.com/vfx/FLIP/riverbed_ww_cam2.mp4

 

The main things I changed:

I switched to 4 substeps only on the FLIP solver, not the DOPnet level.

1 substep only for the whitewater

I cached out the results of the Whitewater Source node to make iterating a bit quicker while playing with emission in the whitewater sim.

A lot of the whitewater is emitted deep in the water, so I cranked up the Bubbles buoyancy a bit to get them on the surface faster.

Velocity Stretch is tied to the Whitewater Solver Timescale.

The Box VDB was causing a few issues so I just disabled it at the moment.

 

 

Otherwise the sim is looking OK, could use some tweaking of course.  Thanks again for the push.

flip_riverbed13_jl.hip

Edited by johner
  • Like 2
Link to comment
Share on other sites

wow .. thanks for these infos -  I hope I didnt complain too loud ;) ..

 

I will have a look on the subnet as you mentioned and also will make a test with timescale of 1, just to see if that fixes everything in my setup

 

Thanks again for your help!

Link to comment
Share on other sites

so I made a new sim based on your suggestions:

substep 1, FLIPsolver-substep 4, JitterBirthTime to None (in ww-emitter). I decreased the foam-depth to .01 to tighten up the foam and increased the buoyancy

I then cached out the base sim, and after that I cached out the whitewater with just the foam and bubbles (spray improved a little with that new jitter-setting, but it was still too much ahead of sim)

The result definitly improved (also due to the thinner foam-depth I guess), but the foam still looks ahead of sim (ww-solver has substep of 1). Would it make sens to match the substepping from the base sim?

can try that as well

particles

foamNew2prt.jpg

debug shader vor visualization purpose

foamNew2.jpg

looks not too bad, but a little like ground fog. The foam-particles kind of follow the base-sim but not close enough to be read as foam.. Looks like the vel-foeld is somehow averaged or something

Not sure what I'm doing wrong here

Edited by borisb2
Link to comment
Share on other sites

  • 2 weeks later...

any help still very much appreciated.

 

As it stands for me until today, coming from a naiad- and flowline-background, it's still impossible to get anything useful out of the whitewater-setup in this riverbed example. The foam/spray-sim is traveling ok-ish with the main sim but would never be read as foam.

 

Is spencer Lueders setup for secondaries really the only way to produce good looking spray? .. can't believe that

Edited by borisb2
Link to comment
Share on other sites

any help still very much appreciated.

 

As it stands for me until today, coming from a naiad- and flowline-background, it's still impossible to get anything useful out of the whitewater-setup in this riverbed example. The foam/spray-sim is traveling ok-ish with the main sim but would never be read as foam.

 

Is spencer Lueders setup for secondaries really the only way to produce good looking spray? .. can't believe that

 

Is the problem at this point still with the motion of the particles or now the rendering?  If the former, there's more you can do to make the foam "stick" to the surface, even going so far as to use GasParticleMoveToIso to snap the foam to the zero isosurface.  The problem is this can cause flickering if you're not careful, and also the zero isosurface exists at the collision boundaries, not just the top "surface" of the fluid.  Also decreasing the foam Isosurface setting can move the foam back down below the surface a bit if that's what you're looking for.

 

If rendering, you might need to increase the resolution of the VDB volume into which the whitewater particles are being rasterized, so they look more like small points and less like fog.  Or you could try appending an Add SOP with Create Particle System enabled, then just rendering the particles as either semi-transparent points or as Uniform Volumes (though this is usually just a faster, motion-blurred version of the VolumeRasterize workflow).

 

Generally people are able to get good results from the whitewater setup, although in the past we have heard complaints specifically about rivers, i.e. the foam is not stringy enough and too diffuse for a small stream.  Some of those customers have indeed tried an approach more like Spencer's, occasionally still using Whitewater Source as the emitter but using custom forces in a POP Solver.

  • Like 1
Link to comment
Share on other sites

very useful tips. Thanks a lot John.

I had the feeling that some of my secondaries-problem were due to the timescale of 0.8 I was using in the base-sim .. not sure. But I made a new sim with timescale of 1, using 1 substep in DOP-node and 4 on Flip-solver. Looking at the new foam-sim I think it looks better now, following the base-sim better.

 

Here's a render test:

https://vimeo.com/108588693

So I guess in the end I will use WW-setup for foam/bubbles and another Flip-sim, emitted by WW-source for splashes..

The volumeRasterize-workflow can't do motion blur?

Edited by borisb2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...