Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding

morphing with areo /fluids

scubedio
Contributor Contributor
3,319 Views
15 Replies
Message 1 of 16

morphing with areo /fluids

scubedio
Contributor
Contributor

Hi guys,

Need idea in morphing the fluid as the images attached.

3,320 Views
15 Replies
Replies (15)
Message 2 of 16

scubedio
Contributor
Contributor

Why no one from autodesk replying for bifrost queries ???

It's a autodesk forum right?

Message 3 of 16

michael_nielsen
Autodesk
Autodesk

Apologies for the delay in responding. Try to have a look at the influence field called attract_repulse_influence. It takes as input a geometry and uses the gradient of its distance field as a driving force. The in-app docs under the info tab describe it in more detail.

 

More background on a similar type of approach can also be found in this SIGGRAPH paper https://www.cse.huji.ac.il/labs/cglab/projects/tdsmoke/tdsmoke.pdf. The paper has some additional ideas on how to improve the results that one could implement directly in the graph if required.

 

Please let us know if you have suggestions for improvements.

 

Cheers,

Michael 



Michael Nielsen

Principal Engineer
0 Likes
Message 4 of 16

Anonymous
Not applicable

Thanks for your response to the post.

I tried already with bifrost motion field , its working only  with liquid solver. but the look and fluid behavior I need to be smoky. I tried with bifrost graph attract_repulse_influence but not working like motion field for both liquid and areo. Don't know what I'm missing  here.

The paper what you have sent is too technical. Any way I try to read that one.

Message 5 of 16

michael_nielsen
Autodesk
Autodesk

If the look needs to be smoky you could use the aero solver in the Bifrost graph (basic_aero_graph) and the attact_repulse influence. 

It's correct that attract_repulse doesn't work with Bifrost Liquids and the old Aero as they're currently not running in the graph.

If this doesn't help, please provide a bit more detail.

Cheers,

Michael



Michael Nielsen

Principal Engineer
0 Likes
Message 6 of 16

scubedio
Contributor
Contributor

Hi Michael,

Do no how the attract_repulse influence  works.

PFA and guide where it went wrong if possible.

Bifrost Liquid with motion field

Bifrost Graph areo solver

Bifrost graph screenshot

Message 7 of 16

scubedio
Contributor
Contributor

Hi,

After some tests and documents in forum I came up with this.But the smoke coming bulgy compare to the actual mesh. can anyone knows why?

0 Likes
Message 8 of 16

michael_nielsen
Autodesk
Autodesk

Apologies that this issue had been left hanging. 

The reason that the smoke appears bulgy compared to the mesh may be because the aero solver conserves volume, so the smoke cannot contract to fit it exactly with the current version of the attract_repulse node.

One way to possibly work around this could be to emit less smoke -- more specifically, emit approximately an amount of smoke corresponding to the volume occupied by the hands.

Cheers,

Michael



Michael Nielsen

Principal Engineer
0 Likes
Message 9 of 16

scubedio
Contributor
Contributor

Thanks for the reply.

I tried the same ,still getting bulgy look but not like the version i posted.If I reduced further some area seems to be  empty.

 

0 Likes
Message 10 of 16

brinsmeadd
Autodesk
Autodesk

I think that with this it can help to add a modulate_influence with voxel_fog_density. The new attract repulse in the beta does this by default but older versions don’t.

without that modulation the attract affects all space, not just areas with density, and the incompressibility will fight the attraction more.




Duncan Brinsmead
Senior Principal Developer
0 Likes
Message 11 of 16

scubedio
Contributor
Contributor

Hi Brinsmeadd,

Thanks for your reply.

Already done modulate_influence with voxel_fog_density.Any other setting needs to be change.

PFA

0 Likes
Message 12 of 16

michael_nielsen
Autodesk
Autodesk

Regarding the bulging, @jonah.friedman suggested that it might be because the geometry that the attract_repulse uses is offset outwards from your input geometry of the hands. See explanation below.

 

It is possible to visualize the volume that the attract_repulse node uses to attract the smoke to and by default it uses a detail_size (the size of a voxel) of 0.1 (this detail_size parameter can be set on the attract_repulse node). However as you can see in the image below this causes the volume used by attract_repulse (to the right) to be offset from the input geometry (to the left):

 

attract_repulse__detail_size_0_1.png

 

If you set the detail_size on the attract_repulse to a lower value (e.g. 0.01) , you will get a better fit to the input geometry:

 

attract_repulse__detail_size_0_01.png

 

You can also adjust an offset inside the attract_repulse node to make the volume seen by attract_repulse smaller than the input geometry:

attract_repulse__detail_size_0_01__offset_neg0_1.png

 

To set the offset and visualize the volume used by attract_repulse, see the image below. In particular you will need to select the attract_repulse node, right click and select "make editable". Then dive into the node by double clicking. Connect the volume output of convert_to_volume (shown in green below) to the output node's plus sign. And then at the top level in the graph connect this to the output of the Bifrost board.

To set the offset, set the offset parameter (shown in red below) on the convert_to_volume node.

 

attract_repulse_visualize_volume_and_set_offset.png

 

Cheers,

Michael

 



Michael Nielsen

Principal Engineer
0 Likes
Message 13 of 16

scubedio
Contributor
Contributor

Hi Michale,

The attract influence detail size in this scene file is 0.01 and I set the maximum distance to 3.0(attracts fine with this value).

*Maya scene scale is in Cms

*Approximate hand size is 12cms.

*Aero solver setting scale is 20 units.

Will this scene scale settings cause this ?

PFA for the same.

 

0 Likes
Message 14 of 16

michael_nielsen
Autodesk
Autodesk

Please try to visualize the volume used by attract_repulse as I explained above. That's the best way to find out.

Cheers,

Michael



Michael Nielsen

Principal Engineer
0 Likes
Message 15 of 16

brinsmeadd
Autodesk
Autodesk

Here is a scene that roughly does the morph. I tried to create a thing like a hand... the skinny fingers create challenges.

https://www.dropbox.com/s/o0pdgzk1b9the96/aero_morph4.ma?dl=0

https://www.dropbox.com/s/svvwfz4ojwzqxz2/aero_morph4.mp4?dl=0

 

The graph is as follows:

aero_morph.JPG

The mask is set to mask so that there is no effect inside the hand. I made the mask min/max distance slightly negative which pushes the mask inward a little and allows me to use a larger detail size.

 

The mask controls two effects... one is a subtraction of density each step( the modify_influence). I could have used a dissipate node instead of the modify, but subtracting has a stronger effect on thin density but less of an effect on heavy density... the idea is to slowly eat up the fuzzy fringes. The mask keeps it from eating the density inside the hand. This allows one to be less careful with the amount of density emitted.

The other effect is the attraction, and the mask keeps it from applying attraction inside the hand, which I found tended to cause a slight bias that pulled density out of the fingers. The attraction is along the level set gradient so even inside it pushes inward. The incompressibility of the liquid keeps things from collapsing.

 

There is a lot of drag on the attract_repulse which allows it to settle faster. I added a little extra drag as a separate influence( not affected by the mask) that then adds drag inside the hand, and keeps the density from swirling around inside it a bit. The motion inside the hand can bring density near the boundary where the modifier tends to kill it.

 

One needs to emit a slightly smaller volume of density than the volume of the hand because the fluid diffuses over time...especially if there is turbulence or if you have vorticity. However with the modifier that subtracts density one can emit more slop and have it still work. (the mask on dissipation was Michael's idea)

 

Simulations with a smaller voxel size will have less diffusion and be able to fit inside more cleanly with less reliance on the masked density subtraction.




Duncan Brinsmead
Senior Principal Developer
Message 16 of 16

scubedio
Contributor
Contributor

Hi Brinsmeadd,

Went on leave for a week.I will follow the graph and do some tests and get back to the forum.Thanks for the suggestion.