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.

Part1

Part2

Final render with Maxwell Render.

luisM.

About these ads

~ by luismma on August 13, 2012.

62 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.

      luisM.

  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.

      luisM.

      luisM.

  5. Hey!
    I meant if I use one scene and if I use Hybrido only.. Like here: https://vimeo.com/44529937 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.

      luisM.

      • 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)
      emit.export()
      scene.setCurrentFrame(i)

      luisM.

  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)
    emit.export()
    scene.setCurrentFrame(i)

    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!

    Marco

    • 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.

      luisM

  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?

    cheers

    • 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.

      luisM.

      • 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?

        jk

  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.

      luisM.

  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.

      luisM.

  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 6.2..so 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.

      luisM.

  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? ;)

      luisM.

  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!

  24. Hey Mr LuisM, thanks so much for sharing your knowledge, your script, helped me a lot, the problem is , i’m trying to do something like this, http://www.youtube.com/watch?v=Ci6wuvA-z2Y at least the brain part :p i’m sure you are familiar with the video, but the thing is, i have a coffee spot to do and it involves a brain, and the brain is just killing me, i used your script but the details wont show , i just get the overall the surface shape of the brain, but no details and the simulation is taking really long, with no result :/ not to mention of course, realflow bugging and lagging due to the detailed brain i’m using but here you have not only a brain but a full detailed tiger and it’s just impressive, so can you help, do you know how to achieve the look on the video? the details? thank you so very much, i really appreciate it, thanks :)

    • Hey,

      That video was made by using the morph plugin. I think it would be more useful than using the fill object because it won’t allow you to play with the fluid. However, the morph can be controlled by other daemons or what you need. ;)

      luisM.

  25. Hi there
    I found this tutorial very interesting and thought i would give it a try. however, the script gave me at lot of problems but i worked it out :)
    my issue is now, that it only creates one bin file at the current frame. why doesn’t it create a whole sequence ?
    And i am currently using RF 2013
    here is the script i am currently using:
    emit = scene.get_PB_Emitter(“Fill”)
    minF = scene.getMinFrame()
    maxF = scene.getMaxFrames()

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

    • Hey,

      you have

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

      and it should be

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

      luisM.

      • Hi luisM thanks for helping me out.
        I don’t know what i am doing wrong because when i run the modified script it keep say syntax error at line 4
        This is exactly how it looks like now:

        emit = scene.get_PB_Emitter(“Fill”)
        minF = scene.getMinFrame()
        maxF = scene.getMaxFrames()
        for i in range (minF, maxF +1):
        emit.setParameter(“Fill Volume”, False)
        emit.setParameter(“Fill Volume”, True)
        emit.export()
        scene.setCurrentFrame(i)

  26. Hey Mr LuisM, impressive work, i’m trying to do something like this, http://www.youtube.com/watch?v=Ci6wuvA-z2Y , at least the brain part :p i’m sure you are familiar with the ad, now i have used your script, it’s working and it’s filling the object just fine, but all i get is the overall surface shape of the brain i’m using , no details :/ i’m really struggling here, i have a coffee spot to do and it involves a brain, and the brain is just killing me, the details wont show and the simulation is taking really long, with no result :/ not to mention ofcourse, realflow bugging and lagging due to the detailed brain i’m using but here you have not only a brain but a fully detailed tiger :p and it’s working perfectly can you please help me out, i’d really aprreciate it, thank you :)

  27. Hello Luis, thank you very much and congratulations for this page. I have a problem …. I should simulate a running water horse but the particles are trapped in the mesh, I’d like to make sure that when the horse runs parts of the particles shoot away as if it drips, how can I remedy to this problem? thanks in advance Luis

    • Hi Anthony,

      You can create a container emitter and filter daemon and send particle to that container by using some condition. Once the particles are in the container, you can apply daemons forces, colliding with the horse which could be affecting the sticky parameter, etc.

      luisM.

  28. Hello LuisM, Thank you a lot for all your tutorials. I learned so many stuff with your page.
    Here I have a trouble with this script. I think the syntax is OK but when I try to simulate, realflow crash and say :”The action can’t be completed because of a memory problem”. I have the same problem with windows 7 & 8.1. I work with Realflow 2013 but I also try the 2014 demo version and it’s the same.
    I don’t know if you can help me.
    Thank you very much in advance.

    David

    • Hi David,

      I would need to see the script. It can be due some particle exploding. Try to place a Kvolume to limit the area where the particles are simulating.

      luisM.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

 
Follow

Get every new post delivered to your Inbox.

Join 354 other followers

%d bloggers like this: