Coder Social home page Coder Social logo

How can i define a scene? about gridfluidsim3d HOT 3 CLOSED

rlguy avatar rlguy commented on August 20, 2024
How can i define a scene?

from gridfluidsim3d.

Comments (3)

rlguy avatar rlguy commented on August 20, 2024

Hello vitos1k,

Sorry that I do not have any detailed instructions on how to use the fluid simulator in the readme.

This fluid simulation program generates a triangle mesh for each frame and stores this data in the .ply file format. The fluid simulation is configured in the file src/main.cpp and the default simulation drops a ball of fluid in the center of the fluid domain.

To render the simulation into an animation, you will need to import the series of .ply meshes into a rendering program where you can set up the scene/lighting/camera. I use the free and open source Blender software to render the fluid simulations that I run.

If you are not familiar with Blender, you can try out this .blend file that will import the .ply meshes and render the default simulation. I have highlighted the important areas for configuring the render in this screen shot:

basic_render

To render the animation your will need to

  1. Change the WATER_FILEPATH_DIRECTORY variable to the filepath of your bakefiles folder
  2. Set the resolution and frame range of the animation
  3. Set the output destination
  4. Click the 'Run Script' button
  5. Click the 'Animate' button

I hope this information helps! I should have detailed instructions and documentation on how to use the simulator within the next few weeks.

Best Regards,
Ryan

from gridfluidsim3d.

GottfriedHofmann avatar GottfriedHofmann commented on August 20, 2024

In case you only need to import a single frame, you can also use File -> Import -> Stanford (.PLY)

If you want something else than a drop of water, you will need to edit main.cpp in the src folder as stated above. The available functions can be looked up in fluidsimulation.h.

rlguy: fluidsimulation.cpp/h is not really documented. Do you have some example configurations?

from gridfluidsim3d.

rlguy avatar rlguy commented on August 20, 2024

I have added some documentation to the public methods in src/fluidsimulation.h and some usage examples in the src/examples/ directory.

from gridfluidsim3d.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.