Meshing with small Geometry Scale

Discussions about the use of Realflow
Post Reply
Toorop
Posts: 4
Joined: Mon Jul 13, 2015 9:06 pm

Meshing with small Geometry Scale

Post by Toorop » Mon Jul 13, 2015 9:27 pm

Hi!

I'm having issues with meshing SPH fluids in the scale of centimeters. I made a dummy project to showcase the error. It contains a simple emitter pouring liquid into a cube_top_open geometry (10x10x5 cm). Set the geometry scale to 0.01 before running the script and set resolution manually for the emitter.
I cannot create a nice looking geometry around my particles, it is just a huge blob no matter what polygon size I use. If I turn on "Auto polygon size", RealFlow stacks in an infinite loop, I have to kill the process. RealFlow version 2014.

Code: Select all

# how can you set Geometry Scale from script? :P

emitter = scene.add_PB_Emitter("Circle")
position_vector = Vector.new(-0.075, 0.05, -0.005)
rotation_vector = Vector.new(-45,0,45)
scale_vector = Vector.new(0.02,0.02,0.02)

emitter.setParameter("position", position_vector)
emitter.setParameter("rotation", rotation_vector)
emitter.setParameter("scale", scale_vector)
emitter.setParameter("type","Liquid")
# why on Earth this doesn't work???
# set resolution manually
emitter.setParameter("resolution",400000)
emitter.setParameter("speed", 0.3)

container = scene.addCubeTopOpen()
position_vector = Vector.new(-0.05, 0.0, 0.05)
scale_vector = Vector.new(10,5,10)

container.setParameter("position", position_vector)
container.setParameter("scale", scale_vector)

grav = scene.addDaemon("Gravity")
grav.setParameter("position", Vector.new(5,0,5))

k_vol = scene.addDaemon("k Volume")
position_vector = Vector.new(-0.05, 0.025, 0.05)
scale_vector = Vector.new(0.1,0.1,0.125)

k_vol.setParameter("position", position_vector)
k_vol.setParameter("scale", scale_vector)
k_vol.setParameter("Visible", False)

scene.reset()
Run the simulation till you fill the container with some particles and try to mesh it.

I appreciate any advices, thank you!

Toorop
Posts: 4
Joined: Mon Jul 13, 2015 9:06 pm

Re: Meshing with small Geometry Scale

Post by Toorop » Tue Jul 14, 2015 2:59 pm

I can confirm that the Legacy Particle Mesher works as intended.

And to round things up, the correction for my little script:

Code: Select all

scene.setGeometryScale(0.01)

Code: Select all

emitter.setParameter("resolution",400000.0)
If you have a solution for the new Particle Mesher, don't hold it back! ;)

User avatar
Oldcode
Posts: 806
Joined: Thu Nov 03, 2011 11:28 pm

Re: Meshing with small Geometry Scale

Post by Oldcode » Tue Jul 14, 2015 7:49 pm

Why do you need your scale to be so small? There is a reason why the default scale is = 1.

One of the most important rules about Real Flow is "Don't get hung up on numbers!"

Make the scale what ever it needs to be to make the shot look good.

Real Flow generally works better with higher scales. I suggest setting the scale back to 1 and then, if you need to, reduce the size of the geometry and Real Flow mesh in your rendering program afterwards.

I use Lightwave, and the Real Flow connection software adjusts for scale for me automatically. For example, I've got a shot where I use standard particles on a high detailed mesh. But because it is so highly detailed, I have to set the scale to a huge 25!!!!

But when I bring my Real Flow geometry into Lightwave, I used to have to reduce its size by a factor of 25, but with the latest plugin, that's no longer necessary. But even if it was necessary, all I have to do is get the right ratio.

For example. A Real Flow scale of 25 would be 1/25 = 0.04

Then I'd set my scales...

X Scale 0.04
Y Scale 0.04
Z Scale 0.04

Hope this helps.

Good Luck,
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."

Toorop
Posts: 4
Joined: Mon Jul 13, 2015 9:06 pm

Re: Meshing with small Geometry Scale

Post by Toorop » Fri Jul 17, 2015 9:50 pm

Thank you for your feedback!

From a technical viewpoint, if you want to create a realistic liquid simulation, you have to account for proper scene scale to resolve the details in the fluid.

Let's take for example a glass of water, modeled in centimeters. If you import this object into RealFlow, it can appear as a huge water tank, since RealFlow's standard scale is meters (1 grid unit equals 1 meters). You can look up this in the documentation.

Even with this setup, you can create good looking fluid like motion, but the splashes and drops are not like in a glass of water. So ideally, one has to stick with correct scales to get somewhat real life results.

BUT. I cannot get RealFlow to simulate anything in the centimeters scale nor can I find a tutorial that uses proper scale, so my whole argument is just a rant and you are right. Do whatever to make your shot look good.

Nevertheless, I would be very interested how a RealFlow developer interprets the issue.

User avatar
Oldcode
Posts: 806
Joined: Thu Nov 03, 2011 11:28 pm

Re: Meshing with small Geometry Scale

Post by Oldcode » Fri Jul 17, 2015 11:30 pm

Again, don't get hung up on the numbers. Real Flow is not a 100% realistic fluid simulator. It is a special effects program that is designed to look good.

Look at a real glass of water and try to get a picture in your mind of how you want the fluid to behave, then adjust the scale to what ever it has to be to look good. If you're looking for super realistic, this is not going to do it for you.

Good Luck,
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."

chrispan
Posts: 118
Joined: Fri Jan 28, 2011 2:23 pm

Re: Meshing with small Geometry Scale

Post by chrispan » Mon Jul 20, 2015 7:59 am

But scene scale is important, cause the particles interact different with the daemons. you don't have to go too small. You can control it even with the scale otions in realflow.

Toorop
Posts: 4
Joined: Mon Jul 13, 2015 9:06 pm

Re: Meshing with small Geometry Scale

Post by Toorop » Wed Aug 05, 2015 10:45 am

Hi Cris!

Thanks for your comment. I'm aware of the importance of scene scale, but somehow I couldn't make RealFlow2014 work with somewhat realistic scene scenarios. I guess that's the reason why everyone replicates huge splashes even if simulating a glass with liquid in it.

The devs at NextLimit have made some progress with smaller scale simulations with RealFlow2015. At least, the new Dyverso SPH particle system works for me much better.

Post Reply

Return to “Realflow”