Volatile, overly splashy foam

Volatile, overly splashy foam

jan
Enthusiast Enthusiast
1,086 Views
12 Replies
Message 1 of 13

Volatile, overly splashy foam

jan
Enthusiast
Enthusiast

Hi all,

 

I'm having trouble with foam in a river sim and I'm hoping someone will have some advice. Liquid has gone through fine, pretty happy. I simulated the foam in tests and got my settings looking really nice and frothy. Trouble is that when I added my alembic collider of a character riding a tree-bark raft suddenly the foam has become very splashy and volatile...

 

[video]

 

The angry splashes appear to be the foam reacting to the collider. Any thoughts gratefully received!

Jan.

1,087 Views
12 Replies
Replies (12)
Message 2 of 13

syracoj
Autodesk
Autodesk

difficult to tell without having the assets to test with.

 

what happens if you remove the current foam system and then re-add the foam but leave the settings at their defaults? Does the same behavior occur then? If not, perhaps it's due to something in your settings.

 

We trust you are working at a "play every frame, Free" playback rate during the sim?

 

what are your droplet threshold and merge back depth settings on the emitter?

 

It'll be a nice shot when it's complete.

Message 3 of 13

Grahame_Fuller
Autodesk
Autodesk

Hi,

 

As was mentioned, it's hard to say without the scene and settings. One possibility that comes to mind is that the Alembic collider cache might have a velocity channel stored. If that gets added to the collider's actual velocity in the scene, then effectively the simulation sees the collider's velocity as double what it should be (or worse, if the cache was generated with a different scene scale and its velocity channel values are even greater than they would be at this scale). However, in that situation I'd expect the liquid to be affected as well as the foam (although maybe it is but it's just hard to tell with so much foam in the way).

 

If I'm right — and even if I'm wrong — then you should be able to reduce the energy by decreasing Velocity Scale in the collider attributes to somewhere between 0 and 1. Maybe start with 0.5, and adjust from there.

 

If that does not work, then is it possible to attach a simplified version of the scene? Or to reproduce the issue from scratch in a new scene?

 

I hope that helps,

gray


Grahame Fuller
Learning Content Developer
Message 4 of 13

jan
Enthusiast
Enthusiast

Guys this is great, thank you.

 

We've done an update to the animation - our character was wading instead of floating - and I'm rerunning the sim overnight.

 

It's definitely simulating on a frame-by-frame.

 

The alembic velocity idea is fascinating, I shall check this now as it is indeed being animated at a larger scale (1 unit = 1cm) and scaled down (1 unit = 1m) for the sim.

 

Thanks both. I'll report back tomorrow.

Message 5 of 13

jan
Enthusiast
Enthusiast

Can I ask, is there a way to interrogate an alembic file to see whether it contains velocity info? I am exporting using a simple command line:

 

AbcExport -j "-frameRange 1.0 1200.0 -stripNamespaces -worldSpace -s 0.5 -dataFormat ogawa -root barkRaft_geo -file [dirPath]/barkRaft_geo.abc"

 

I would have assumed velocity data would be an additional export parameter rather than default. But I base that on no actual evidence.

0 Likes
Message 6 of 13

Grahame_Fuller
Autodesk
Autodesk

Hi Jan,

 

Velocity and other auxiliary channels typically get stored as color sets. So to check, once the Alembic cache has been imported into Maya, you can select it and choose Mesh Display > Color Set Editor from the Modeling menu set. You'll see a list of color sets that exist on the mesh — look for something with "velocity" in its name.

 

But also note that decreasing Velocity Scale should reduce the energy even if an extra velocity channel is not the ultimate cause, so I'd try that anyway.

 

Good luck,

gray


Grahame Fuller
Learning Content Developer
Message 7 of 13

jan
Enthusiast
Enthusiast

excellent, thank you!

Message 8 of 13

jan
Enthusiast
Enthusiast

Last night some weird hex got into my workstation. Literally 5 minutes after I went to bed BF stopped caching files. Tried tons of stuff this morning but it was plain broken. Restarted my computer and it started working. The take home point here is not a BF/Maya bug. It's that I have run a 3D animation studio for 15 years and the last thing I did here was off/on. Idiot.

 

Anyway, when I got things working again it does appear that reducing the collider velocity is working. It will need to be lower than 0.5 but it is working. Immense relief and effusive thanks.

 

I couldn't find any sneaky velocity saved into the alembic. But as I said the geometry was 100 times bigger when cached. Could it be that this is a factor? Is there something going on behind the scenes that means BF is inflating surface velocity on collision by a factor of 100? My abc file is brought in and scaled down to 0.01 in the scene.

 

 

0 Likes
Message 9 of 13

Grahame_Fuller
Autodesk
Autodesk

I'm glad to know it helped. Without the scene and assets, it's hard to know exactly what happened but at least you seem to be on your way.

 

Cheers,

gray


Grahame Fuller
Learning Content Developer
0 Likes
Message 10 of 13

jan
Enthusiast
Enthusiast

Getting there.

 

The answer to my last was a definitive no. A value of 0.01 on collider velocity results in a barely noticeable collision event.

 

I am also wondering about whether transport/time stepping may be contributing to the volatility. These I've left at the default parameters so far, hesitant to introduce additional cpu overheads as the shot is already pretty unwieldy.

 

I'm playing with the velocity scaling now.

0 Likes
Message 11 of 13

jan
Enthusiast
Enthusiast

Finally finished this sim. Thanks for all the help!

 

[video]

Message 12 of 13

doppelgaenger_digital
Advocate
Advocate

Nice one! Very good! 

0 Likes
Message 13 of 13

Grahame_Fuller
Autodesk
Autodesk

Glad to hear it! And see it too!

 

gray


Grahame Fuller
Learning Content Developer