HySPH Wetmaps

Post Reply
CG_Nema
Posts: 67
Joined: Fri May 31, 2013 5:23 am

HySPH Wetmaps

Post by CG_Nema » Fri May 31, 2013 5:27 am

Is it possible to create wetmaps with HySPH particles? I haven't been able to get it to work. Everything is checked in export central and RF writes out the image files, but the object never actually gets marked with wet spots. It works with standard SPH particles, but I can't seem to figure out how to do it with HySPH secondaries from a Hybrido2 system.

User avatar
Alex
Site Admin
Posts: 143
Joined: Mon Jun 14, 2010 9:35 am

Re: HySPH Wetmaps

Post by Alex » Fri May 31, 2013 10:20 am

Hi,

right now HySPH emitters are not affecting wetmaps directly.

You can give the attached scene a try. It contains a graph that, when the distance of a particle is close enough to an object, it creates a standard emitter particle which actually creates the wetmap.
hybrido_wetmaps.zip
Sorry for the inconvenience
You do not have the required permissions to view the files attached to this post.
Alex Ribao
RealFlow Team
Next Limit Technologies

CG_Nema
Posts: 67
Joined: Fri May 31, 2013 5:23 am

Re: HySPH Wetmaps

Post by CG_Nema » Fri May 31, 2013 8:17 pm

Thank you very much! I'll try this right away.

o.delellis@gmail.com
Posts: 63
Joined: Thu Aug 02, 2012 7:22 am

Re: HySPH Wetmaps

Post by o.delellis@gmail.com » Sun Jun 02, 2013 5:39 am

that works..!

...but the SPH creation threshold is not responsive..

i got 10 million H2 particles and want to avoid having and extra 20million SPH particles if that is possible


:shock:
picking up 16TB on monday..
:shock:

CG_Nema
Posts: 67
Joined: Fri May 31, 2013 5:23 am

Re: HySPH Wetmaps

Post by CG_Nema » Sun Jun 02, 2013 6:05 am

The graph didn't work for me (because I use the Learning Edition) so I wrote python script for it:

Code: Select all

#Rename the nodes to match your scene:

#HyFLIP Domain:
domain  = scene.get_HY_GridDomain("HY_Domain")
#SPH Emitter:
sph = scene.get_PB_Emitter("Container")
#Optional HySplash Emitter:
hySplash = scene.get_HY_Splash("HY_Splash")

#Change Surface Bandwidth if you need to:
surface = domain.getSurfaceParticles(0.05)

splash = hySplash.getParticles()
sph.removeAllParticles()

for p in surface:
	sph.addParticle(p.getPosition(), p.getVelocity())

for p in splash:
	sph.addParticle(p.getPosition(), p.getVelocity())
Put it in FramesPre in the Simulation Flow window. There are some things you might want to tweak to fit your scene. I'm not sure how the graph worked, but this only copies the splash particles, and surface particles from the domain rather than all the grid particles. Using dumb particles is enough, and you can raise the min substeps if you want a little more realism in your wetmap. Hope this helps someone.

User avatar
Alex
Site Admin
Posts: 143
Joined: Mon Jun 14, 2010 9:35 am

Re: HySPH Wetmaps

Post by Alex » Sun Jun 02, 2013 10:51 am

CG_Nema wrote:The graph didn't work for me (because I use the Learning Edition) so I wrote python script for it:

Code: Select all

#Rename the nodes to match your scene:

#HyFLIP Domain:
domain  = scene.get_HY_GridDomain("HY_Domain")
#SPH Emitter:
sph = scene.get_PB_Emitter("Container")
#Optional HySplash Emitter:
hySplash = scene.get_HY_Splash("HY_Splash")

#Change Surface Bandwidth if you need to:
surface = domain.getSurfaceParticles(0.05)

splash = hySplash.getParticles()
sph.removeAllParticles()

for p in surface:
	sph.addParticle(p.getPosition(), p.getVelocity())

for p in splash:
	sph.addParticle(p.getPosition(), p.getVelocity())
Put it in FramesPre in the Simulation Flow window. There are some things you might want to tweak to fit your scene. I'm not sure how the graph worked, but this only copies the splash particles, and surface particles from the domain rather than all the grid particles. Using dumb particles is enough, and you can raise the min substeps if you want a little more realism in your wetmap. Hope this helps someone.
Hi again,
Yes, that is pretty much what the graph does. Except that instead of transfering the surface particles, we transfer particles within a certain distance threshold to the desired geometry.
Alex Ribao
RealFlow Team
Next Limit Technologies

Post Reply