Skip to content

Commit

Permalink
[add] melt-animation
Browse files Browse the repository at this point in the history
  • Loading branch information
douysu committed Jul 20, 2020
1 parent f37c9ba commit 409c1e1
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

图形学项目案例实现总结(包括渲染、光照、点云等)。我的联系方式是yindou97@163.com,如果对您有帮助还请帮忙点一个star。我的个人总结仓库:<https://github.com/douysu/person-summary>

- [我的知乎](https://zhuanlan.zhihu.com/c_1218472587279433728)
- [我的知乎专栏](https://zhuanlan.zhihu.com/graphics-douysu)
- [我的Github](https://github.com/douysu)
- [我的博客](https://blog.csdn.net/ModestBean)

Expand All @@ -12,6 +12,7 @@
-|-|-|
Ray Tracing(光线追踪) | [源代码位置](./tinyraytracerYD) | <div align=center><img src="./result/tinyraytracer.jpg" width=200 ></div> |
Software Rendering(软渲染) | [源代码位置](./tinyrendererYD) | <div align=center><img src="./result/africanhead.png" width=200 ></div> |
Fluid Simulation(物理动画流体模拟) | [源代码位置](./melt-animation) | <div align=center><img src="./result/IISPH.gif" width=200 ></div> |
基于物理粒子系统的鱼群水族馆 | [源代码位置](./wallpaper) | <div align=center><img src="./result/wallpaper.gif" width=150 ></div> |
医疗项目3D人体展示系统 | [源代码位置](./moving-light-strip) | <div align=center><img src="./result/moving-light-strip.gif" width=150 ></div> |
OpenGL 拖尾、刀光、剑光、尾焰效果| [源代码位置](./streak) | <div align=center><img src="./result/streak.gif" width=150 ></div> |
Expand Down
72 changes: 72 additions & 0 deletions melt-animation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 物理动画流体模拟Fluid Simulation

作者:憨豆酒(YinDou),yindou97@163.com,熟悉图形学,图像处理领域,经常更新的学习总结仓库:[https://github.com/douysu/person-summary](https://github.com/douysu/person-summary) 如果对您有帮助还请帮忙点一个star,如果大家发现错误以及不合理之处,还希望多多指出。

[我的知乎](https://zhuanlan.zhihu.com/graphics-douysu)

[我的Github](https://github.com/douysu)

[我的博客](https://blog.csdn.net/ModestBean)

# 0 介绍

以下为在实验室完成的效果,特殊原因,实验室代码不方便开源,找到了其他开源代码,实现过程如下。

![图片](https://uploader.shimo.im/f/8znanwmtzgLT1Iuv.gif)


Reference:

* [https://github.com/doyubkim/fluid-engine-dev](https://github.com/doyubkim/fluid-engine-dev)
# 1 运行

环境:Ubuntu 18.04.4 LTS 其他操作系统查看原仓库,macOS和Win。

## 1.1 Clone

```plain
git clone https://github.com/doyubkim/fluid-engine-dev.git --recursive
cd fluid-engine-dev
```
## 1.2 Building from Ubuntu

```plain
sudo apt-get install build-essential python-dev python-pip cmake
```
```plain
sudo apt-get install libtbb-dev
```
```plain
mkdir build
cd build
cmake ..
make
```
## 1.3 Run Demo

生成每一帧数据。

```plain
./bin/hybrid_liquid_sim -f 10 -m pos
```
![图片](https://uploader.shimo.im/f/uv42zPUy69P3J4Rz.png!thumbnail)

生成obj。

```plain
./bin/particles2obj -i ./hybrid_liquid_sim_output/frame_000000.pos -r 100,200,100 -g 0.01 -k 0.04 -m zhu_bridson -o ./hybrid_liquid_sim_output/frame_000000.obj
```
## 1.4 导入obj到渲染器完成渲染

Blender渲染器或者Mitsuba renderer渲染器,或者其他您熟练的渲染器。 如果您使用Blender,这里可以供下载我使用的场景文件,场景可能不够完美,因为不是特别擅长美工......

下载场景:

* Google:[https://drive.google.com/file/d/1M511EWM5tiRGgowY9sVHgRbZGaweie1C/view?usp=sharing](https://drive.google.com/file/d/1M511EWM5tiRGgowY9sVHgRbZGaweie1C/view?usp=sharing)

Baidu:链接:[https://pan.baidu.com/s/1dgVHBwL607WLEwVw8vButQ](https://pan.baidu.com/s/1dgVHBwL607WLEwVw8vButQ)  提取码:o4li

![图片](https://uploader.shimo.im/f/xw5L5H7zmEkIcgJx.png!thumbnail)

###

Binary file added result/IISPH.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 409c1e1

Please sign in to comment.