Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://github.com/thunil/ofblend
22 June 2024, 15:59:02 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
Revision 92d43fb1eea21ec77fe31adc0b0c999f1a124737 authored by Nils Thuerey on 08 June 2017, 20:22:23 UTC, committed by Nils Thuerey on 08 June 2017, 20:22:23 UTC
screens
1 parent 0b4d265
  • Files
  • Changes
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • 92d43fb1eea21ec77fe31adc0b0c999f1a124737
    No releases to show
  • 5d19b9f
  • /
  • README.md
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
  • snapshot
origin badgerevision badge
swh:1:rev:92d43fb1eea21ec77fe31adc0b0c999f1a124737
origin badgedirectory badge
swh:1:dir:5d19b9fdcdb88ca45f3764c16686a07f892faa75
origin badgecontent badge
swh:1:cnt:ea8ae7bd42e7136a69be9027fbb708d260ffb6fa
origin badgesnapshot badge
swh:1:snp:92b35bd5e6b77376ffd5ff2ac1643b476f31eba4

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 92d43fb1eea21ec77fe31adc0b0c999f1a124737 authored by Nils Thuerey on 08 June 2017, 20:22:23 UTC
screens
Tip revision: 92d43fb
README.md
# ofblend

Here you can find an reference implementation of the 2017 ACM Transactions on Graphics paper Interpolations of Smoke and Liquid Simulations (or short FlOF). 
Authors: Nils Thuerey 

This source code is based on mantaflow, so it contains some third party components; please check the respective source distribution webpages for copyright details.


## Building the code:
You can follow the mantaflow installation and compilation instructions at http://mantaflow.com/install.html


## Generate sample data:
Run the two commands below to simulate two different liquid drop setups. The first two images on the right illustrate the initial positions. By default a relatively small resolution of 40 cells is used, in order to keep the runtimes low. The following commands assume that you built mantaflow in a separate directory next to source directory "mantaflowgit", which also contains the scene files. 

The two commands will generate a lower resolution 4D SDF ("out_r040_x000.uni" and "out_r040_x001.uni" in this case), and a series of full resolution 3D SDFs ("outxl...").

```
./manta ../mantaflowgit/scenes/dataGen2Drop.py px 0 save4d 1 savehi 1 
./manta ../mantaflowgit/scenes/dataGen2Drop.py px 1 save4d 1 savehi 1 
```


## Calculate a first FlOF deformation:
The FlOF.py script includes all that is necessary to compute a space-time deformation with optical flow. It also has hard coded settings to load the data generated in the previous step. The two data points (0 and 1) will be used as end-points for the calculations in the following.

```
./manta ../mantaflowgit/scenes/flof.py dataid0 0 dataid1 1 mode 1 
```

This will take circa 2-3 minutes, and generate a 4D deformation field called "defo01_000_001_032_vel.uni". the flof script has different modes: mode 1 calculates a deformation, mode 2 applies it for testing, and mode 3 performs the full interpolation between multiple data points.

if you compiled the code with qt support, you can visually check the deformation with: 
```
./manta ../mantaflowgit/scenes/flof.py dataid0 0 dataid1 1 mode 2 showgui 1 
```
add an "alpha x" value (x between 0 and 100) to test intermediate deformations which are not appplied with full strength. 

The previous steps apply the deformation using the lower grid resolution (32 in this case). You can test a one-way, high-resolution output with mode 3 using the following command: 
./manta ../mantaflowgit/scenes/flof.py dataid0 0 dataid1 1 mode 3 showgui 1 alpha 50 


## The second deformation:

To run the full pipeline as described in the paper, you also need a deformation in the other direction. Run the following commands to generate and check it: 
```
./manta ../mantaflowgit/scenes/flof.py dataid0 1 dataid1 0 mode 1 
./manta ../mantaflowgit/scenes/flof.py dataid0 1 dataid1 0 mode 2 showgui 1 
```


## Final output:

Now we have all components ready to generate a real output: the high-res input data, and the deformations in both directions. The following command will apply them with 50% strength, and save a sequence of png images. You can see a preview on the right (the lower two images). 
```
./manta ../mantaflowgit/scenes/flof.py flof.py mode 3 showgui 1 twoway 1 alpha 50 writepngs 1 
```

To generate triangle meshes that could, e.g., be displayed and rendered in blender, add "trimesh 1".

This completes a full simple example. Let me know how it works for you! If you have comments / questions, just send a mail to "nils at thuerey dot de". 

### Acknowledgements

This work was funded by the ERC Starting Grant realFlow (ERC StG-2015-637014).


The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API