RW_splashes-less noise more 'crowning'

Discussion about fluid simulation in Realflow 4
ral
Posts: 66
Joined: Mon Sep 11, 2006 7:43 pm

RW_splashes-less noise more 'crowning'

Postby ral » Wed Feb 28, 2007 3:10 pm

I am tweaking my RW_Splash for esthetics.
Currently the particles are a bit too noisy (go in all directions).
I would like them to group and sheet/flatten together more so the splash has distinct 'petals' or 'crowning' effect.

Current settings
int pressure 1
ext pressue 100
Compression = 8000
Surface tension (using the emitters) = 20
Density = 1000

Any other tips/areas/tweak suggestions?

-ral


ranxerox
Posts: 334
Joined: Tue Jan 09, 2007 5:15 pm

RW_splashes-less noise more 'crowning'

Postby ranxerox » Wed Feb 28, 2007 4:27 pm

I would recommend you get into scripting the splash you want if you want something as specific as a crown. I tried playing with splashes for a long time and in the end it didn't take very long to just emulate the splash I wanted in a script.

-ranx

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

RW_splashes-less noise more 'crowning'

Postby shaun_michael » Wed Feb 28, 2007 4:48 pm

Would you care to set-up a scene with a script Greg so that we can see the general process of doing such a thing? Even with Thomas' great tutorials I still struggle with programming. I think my brain's just not wired right, or I'm not putting enough time into it.

I set-up a scene repository in the RF4 forum to dump scenes into like these for people to reverse engineer.

I think many would really appreciate this sort of help/insight.

Shaun

ps - Thomas has also somewhere you can link to scripts if thats easier, but I just thought a scene would be more educational.

ranxerox
Posts: 334
Joined: Tue Jan 09, 2007 5:15 pm

RW_splashes-less noise more 'crowning'

Postby ranxerox » Wed Feb 28, 2007 5:51 pm

I can put something simple together to explain the process. It's really not that hard once you understand the framework.

-ranxx

ranxerox
Posts: 334
Joined: Tue Jan 09, 2007 5:15 pm

RW_splashes-less noise more 'crowning'

Postby ranxerox » Wed Feb 28, 2007 5:56 pm

oh and before I take any credit for this idea let me say that it was actually Dr Mark Stasiuk's idea, I just coded up a version of it. I can't release my code, but I will put up a simple force splash which you could play around with.

-ranxx

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

RW_splashes-less noise more 'crowning'

Postby shaun_michael » Wed Feb 28, 2007 6:31 pm

That would be excellent, thanks Greg.

Shaun

ral
Posts: 66
Joined: Mon Sep 11, 2006 7:43 pm

RW_splashes-less noise more 'crowning'

Postby ral » Thu Mar 01, 2007 2:30 pm

indeed. Some of the most successful 'crowns' I've seen
http://www.fusioncis.com/fusion.html
also seem to be a bit 'small' in scale for what I am trying to do-which is to have a character diving into a pool. Still I'd love to see how they got the control of the leading edges and shaping. The 'sculpting' so to speak.

Any help towards these goals would be appreciated.

-ral

ranxerox
Posts: 334
Joined: Tue Jan 09, 2007 5:15 pm

RW_splashes-less noise more 'crowning'

Postby ranxerox » Fri Mar 02, 2007 8:05 pm

hey guys, I've been working on an example script but I'm really not sure where to draw the line concerning IP. I'm going to hold off on it til I can get approval from all the parties involved. Sorry.

-ranxx

shaun_michael
Posts: 4766
Joined: Sun Sep 10, 2006 8:04 am

RW_splashes-less noise more 'crowning'

Postby shaun_michael » Fri Mar 02, 2007 8:16 pm

Thats fair enough Greg, understood. We all need to be wary of intellectual property issues.

Shaun

ranxerox
Posts: 334
Joined: Tue Jan 09, 2007 5:15 pm

RW_splashes-less noise more 'crowning'

Postby ranxerox » Fri Mar 02, 2007 9:50 pm

alright I got the go ahead to post. Very special thanks to Mark Stasiuk of FusionCIS for the basic idea behind this script. It might not look like much but with some work you can create some very nice splashes. Good luck..

Code: Select all

#
# "scripted_force_example.rfs"
#
# author:  Gregory Ecker (ranxerox)
# with special thanks to skram (Dr. Mark Stasiuk) for the basic idea.
#
# date:  feb/07
#
#--------------------------------------------------
# Function: applyForceToEmitter
# This function is called by the simulation engine
# when external forces should be applied to the   
# particles in the emitter.                       
#--------------------------------------------------

def applyForceToEmitter( emitter ):
   import math

   # parameters:
   start_time = 0.1                                                                  # time at which force starts
   end_time = 0.15                                                                  # time at which force ends
   force_origin = Vector.new( 0.0, -0.5, 0.0)      # position of force
   force_strength = 150.0                                                   # maximum base force
   force_bounds = 0.3

   cur_time = scene.getCurrentTime()   
   if((cur_time < end_time) and (cur_time > start_time)):   # only apply force for a short window
      particle = emitter.getFirstParticle()   
      while( particle ):
         ppos = particle.getPosition()
         dist = ppos.distance(force_origin)

         if(dist < force_bounds):      # if we are within bounds of the force:
               # apply force:
               push_vec = Vector.new(0 , 1, 0)
               push_vec.scale(force_strength)
               particle.setExternalForce( push_vec )
         particle = particle.getNextParticle()
   pass

p.s. how do I post the scene ? link meh.

-ranxx

shaun_michael wrote: Thats fair enough Greg, understood. We all need to be wary of intellectual property issues.

Shaun


Return to “RF4: Fluid simulation”

Who is online

Users browsing this forum: No registered users and 1 guest