Tips and Tricks: How to fill a character with an Fill Object emitter without losing volume?

Hey all!

When filling objects in RealFlow, the particles move out of the object and it is difficult to keep the character volume. With a simple script, we can get a complete sequence of particles with the shape we want. It doesn’t matter the number of particles we have for our Fill Object emitter. So, we are going to see how to fill a tiger character and meshing the particles with the particles from a Hybrido scene.



Final render with Maxwell Render.


About these ads

~ by luismma on August 13, 2012.

52 Responses to “Tips and Tricks: How to fill a character with an Fill Object emitter without losing volume?”

  1. Thanks for this simple and powerful script.
    This blog is great, full of useful info. Gracias Luis! :)

  2. Pretty cool, very useful! Waiting for more tuts, thank you~
    Also waiting for 2013~~

  3. can I separate the emitters? I mean is there any option to render main fluid and character fluids not in one go? maybe there is something like delete by partcles ID or something else?

    • Hi,

      Yes of course. If you take a look at the video, you’ll see that all emitters are independent emitters before meshing them. You can import the mesh for your character creating a rfrk node, and then you can create another rfrk object to impor the others bin sequences.


  4. hiya was wondering if projects can be saved within realflow to use another time & improve on

    • Hi :),

      Yes of course. You can save the scene as you want in the same folder, for example, scene1.flw, scene2.flw, sceneN.flw and all with different parameters. The only thing is, if you save the scenes in the same folder, the files will be overwritten. But you can create a preview with your simulation and then simulate the scene you like.



  5. Hey!
    I meant if I use one scene and if I use Hybrido only.. Like here: I did this falling sphere in Hybrido as an emitter, second emitter was the cube for the water surface.. How can I substract sphere fluid after sim to not render it and to have a possibility to replace this with a 3dmodel?

    • Hey!

      I don’t understand very well you question. Do you mean how to export a 3d model to realflow to use it as emitter?. You must use the plugin for your 3d platform, and export it as SD file. Once exported, you can import it into RealFlow and indicate it is a GFEmitter. By selecting the GFEmitter you can remove the sphere object to emit and select your 3D model.


      • well, I know it, actually.. what I mean is:
        1. create GFD;
        2. create GFEmitter (sphere) which with stream water;
        3. create GFEmitter (cube) which will be our ‘ground’ water;
        4. simulate
        5. How can I import to my 3d platform those emitters but not together? Let say that I want to have only one of them? When we do GFD simulation and then import it to 3DSMax (in my case) there is two emitters lives together and no way to separate them.

      • Hey,

        Go to the export central and check on the BIN format for the emitter you want to export. Once exported, go to your 3D platform and load the GridFluidEmitter sequence from the particles folder of your project.

        luisM. ;)

  6. where i can download that script as i failed to just coping it from the video and make just u do so plz help in that ??? and thanks

    • Hey Ahmed,

      here you are.

      emit = scene.getEmitter("Fill_Object01")
      minF = scene.getMinFrame()
      maxF = scene.getMaxFrames()

      for i in range (minF, maxF +1):
      emit.setParameter("Fill Volume", False)
      emit.setParameter("Fill Volume", True)


  7. Why does it give me a (WARNING: Script syntax error at line number 5)
    whenever i run the script???
    I tried with more than one object and still have the same issue, PLZ sir help me out of this -_-

  8. emit = scene.getEmitter(“Fill_Object01″)
    minF = scene.getMinFrame()
    maxF = scene.getMaxFrames()

    for i in range (minF, maxF +1):
    emit.setParameter(“Fill Volume”, False)
    emit.setParameter(“Fill Volume”, True)

    the problem was solved after i added space before the 5th till 8 line

    • Nice!!!

      Yeah, python has this kind of thing and the script editor in realflow doesn’t show too much information either.

      luisM. ;)

  9. Hello thanks so much for all this aid and tutorials, you are really a great person! One question: when I start the script, RealFlow writes an error message. WARNING: Script syntax error at line number 5.
    Do you know how can I fix it?
    thank you very much!


    • Hi Smoka,

      Thank you for your kind words. ;)

      Make sure you have tabs instead of empty spaces when using “if” or “for”, so on. Python recognizes tabs and empty spaces when we are putting sentences but, unfortunatelly, empty spaces at the begin of the line is not valid for it. Removes the empty spaces and put a tab instead.


  10. Thanks a lot Luis for this amazing script, you really saved my life as i’m working on a Sandman test simulation and i didn’t know how to come around this issue with the falling particles while my character was moving. I will send you a video link of my test when it’s finished. Thanks again

  11. i get script syntax eroor at line number 0.Thank you so much.

    • Hey,

      Make sure you don’t have any empty space but TAB keys at the begin of the lines. Sometimes when downloading text files from internet, the download manager checks out the files and adds empty spaces instead of leaving the text’s format as it was.

      luisM. ;)

  12. hi, would be great if this script worked… i love the idea, but yeah i get the same syntax error thing, is there a rfs i can just download and open in the script editor rather than copy pasting the text from above?


    • Hey Jay,

      What error do you have?. Make sure you have Tab key and not spaces in the script. Sometimes, downloading from internet remove the tab key and add empty spaces instead.


      • you are absolutely right! using tab rather than space fixed it… thanks for taking the time to get back to me, can i also ask, is there a way to reconfigure this script to work with the particle layer function of the fill object emiter?… i tried replacing the ‘fill object’ with ‘particle layer’ but nothing actually happend, what im actually trying to acheive is a ‘scatter’ effect to cover thge surface of an object evenly…. any tips or tricks for that sort of effect?


  13. hey luism. i saw your work now and even i am learning realflow. my concept was using a 3d model dancing …so have to use this script for loss of water while moving…but it is still giving me error .. WARNING: Script syntax error at line number 0…..i tried with replacing all the spaces with tabs but still its not working…can you give me the script through downloadz or help me to use it other way round

    • Hey,

      Try to remove the empty space and apply TAB instead. It is a problem ulploading text files. The TAB are replaced by empty space which is not good for python.


  14. update: i got rid of that error by typing the whole scripting manually…but now there’s some new error of……WARNING: Script error: Parameter “Fill Volume” not found. now i dont know whats this…

    • Hey Shanky,

      Take a look if you are putting a Fill Object emitter, and if it is named at the same way that the script does.


  15. yeah i already looked at that point where both the script name and the emitter name are same…should it be realflow version problem ???as i am using v2012 ..6.0.0 sumthng like that…the new 1 is 6.02 or is that creating a problem????….can you upload the file so that there’s no mistake as i have manually typed it with only using tabs…and the last thanks for reverting back….

  16. Hey I tried my best by changing all spaces in tab, manually typing the whole script and other etc methods but this “Fill Volume” error is always popping…I really wanted to use the script for my project submission but my bad luck…newyz thxs…if u got any ideas do lemme know i’ll still try them…

  17. Hi Luis!

    I’m using this script in RF 2013, I’ve copied the script directly and have removed spaces and replaced with tabs – I’m getting the error ‘Syntax error at line number 0″ – and my Fill_Object01 is named correctly. Any ideas? :)

  18. Hello Luis ! thank you for this interesting tutorial.
    The script works for me with tab tips, only on RF 2012 it’s not a problem for me. Is it normal ?

    I’m wondering something, how is it possible to avoid your meshing aliasing on the tiger ? In order to have a perfect mesh during the animation. Thanks a lot.

  19. Thanks man! I’m a dick at script and this one is 100% pure gold! . Saved me a lot of time of pain. Thanks again!

  20. Hi Luis,
    I’m using rf 2013 trying to run the script. rf just gives me a warning saying “Script error: “getEmitter” at line number 1.” Else the “getEmitter” isn’t highlighted in yellow as it should be .. i guess. When looking it up in the rf scripting reference I found out that “getEmitter” doesn’t exist (any more?) it’s now called “getEmitters” (plural) .. maybe they’ve changed that…
    Anyway, it’t still not working giving me the same error again and again.
    Oh.. and I kept everything in mind from the comments above.
    thanks a lot , stoney

    • Hi again,
      Just solved it on my own:
      Any of you guys using rf 2013.. “getEmitter” doesn’t exist any longer. Apparently you have to replace it with “get_PB_Emitter”!

    • Hi stoney,

      Try with get_PB_Emitter() instead. getEmitter() was deprecated in older version.


  21. How come my script doesn’t work?
    Tried replacing all empty spaces with TAB, i still get this error: WARNING: Script error: Parameter “Fill Volume” not found.
    Any idea how to fix this? I really need your help.

    Thanks in advance

    • Hi,

      Maybe the Fill Volume you have has a different name that the script. Could you paste the script and a screenshot of your scene? ;)


  22. Script still not working, any idea how to troubleshoot this one? I replaced all spaces already and still not working.

  23. i got it already, maybe i just keyed in something weird.
    thanks anyway and good job with your test, its pretty awesome!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 245 other followers

%d bloggers like this: