Skip to content

Tensorflow implementation of Style Transfer for Smoke Simulations. Created as part of ETH Zurich Student Summer Research Fellowship

License

Notifications You must be signed in to change notification settings

Ozeuth/Houdini-Plugin-for-Tensorflow-Smoke-Stylization

Repository files navigation

Tensorflow implementation of Style Transfer for Houdini Smoke Simulations

An artist-centered tool for Transport-Based Neural Style Transfer for Smoke Simulations. Combines the original implementation with a Houdini Digital Asset, making a user-friendly, integrated plugin for Smoke Stylization.

Development: Penelope Tay, Byungsoo Kim, Vinicius C. Azevedo, Markus Gross, Barbara Solenthaler

Computer Graphics Laboratory, ETH Zurich

teaser

Description

As an artist, this tool lets you take smoke simulations you've created in Houdini and stylize them. This gives them the aesthetic and apperance of your choice, whilst remaining governed by the physical accuracy of the simulation.

There are two types of transfer you can conduct: Stylistic and Semantic. Stylistic Transfer lets you specify a target image, whilst Semantic Transfer lets you specify a target layer and channel. The stylizer will then alter the smoke to mimic the target.

style_sem

Development

Current Progress: Complete with Maintenance

Feel free to contact me if you have any problems using the Houdini Plugin, or if you'd like to report a bug.

Installation

Python 3.6

Use this installation method unless you have very specific requirements

  1. Ensure you have Python 3.6 installed and on your Environment Path. If not, download it.

  2. Download the necessary libraries. Install these via command prompt:

     pip install --user --upgrade tensorflow-gpu==1.12 tqdm matplotlib Pillow imageio scipy scikit-image
    
  3. Download CUDA and CuDNN and add them on your Environment Path.

  • You may need to create a NVIDIA Developer Account to download CuDNN.
  • Please Download cuDNN v7.6.5 (August 23, 2019), for CUDA 10.1.
  1. Open the command prompt and download our code:

     git clone https://gitlab.com/ozeuth/Python-Houdini-Plugin-for-Tensorflow-Smoke-Stylization.git
    
  2. Ensure you have Houdini installed. If not, download it.

  • You do not need the commercial version.

Python 2.7

Whilst Houdini (as of 8/26/2019), runs off Python 2.7, you still need a second copy should you wish to proceed with this method. The reason being Tensorflow is not technically not supported for Python 2.7, and a special setup is required. This problem may be trivialised for Linux users, who benefit from both a flexible Python environment for Houdini and Tensorflow support for Python 2.7.

  1. Ensure you have a Houdini-independent Python 2.7 installed and on your Environment Path. If not, download it

  2. Download the necessary libraries. You must get Numpy, Scipy, Pillow and Tensorflow from these exact wheels, and install the rest via command prompt:

     pip install --user --upgrade tqdm matplotlib imageio scikit-image
    
  • For numpy and scipy, install "numpy-1.16.4+mkl-cp27-cp27m-win_amd64.whl" and "scipy-1.2.2-cp27-cp27m-win_amd64.whl" respectively. Numpy must be installed first.
  • You will receive incompatability warnings. Ignore them, they are not relevant in this particular context.
  1. Download CUDA and CuDNN and add them on your Environment Path.
  • You may need to create a NVIDIA Developer Account to download CuDNN.
  • Please Download cuDNN v7.6.3 (August 23, 2019), for CUDA 9.2.
  1. Open the command prompt and download our code:

     git clone https://gitlab.com/ozeuth/Python-Houdini-Plugin-for-Tensorflow-Smoke-Stylization.git
    
  2. Ensure you have Houdini installed. If not, download it.

  • You do not need the commercial version.

Usage

  1. Open a Houdini smoke simulation or create one from scratch. Regardless, you should have a "pyro_import" geometry node.

  2. File > Import > Houdini Digital Asset..., navigate to the Python-Houdini-Plugin-for-Tensorflow-Smoke-Stylization directory and select a .hdanc file. Choose "smoke_stylizer.hdanc" if you do not intend to modify the Digital Asset, "smoke_stylizer_unlocked.hdanc" otherwise. Click Install.

  3. Enter the "pyro_import" geometry node. In the /obj/pyro_import Network view, Add > Node > Digital Assets > Smoke stylizer.

  4. Connect the "import pyrofields" node's output to the input of our "Smoke_Stylizer_Oz" node.

  5. Click on the Smoke Stylizer digital asset. Set the "Python version" and "Python Path" (e.g., C:\Users\user_name\AppData\Local\Programs\Python\Python36) to that of the Houdini-independent python you have installed. Set the "Stylizer Path" (e.g., C:\Users\user_name\dev\Python-Houdini-Plugin-for-Tensorflow-Smoke-Stylization) to that of the stylizer you have installed. setup

  6. Tweak other details as you wish. Otherwise, click "New Stylization". Stylization will begin on the next frame after.

  • If confused, you may refer to our example scene, demo.hipnc

Results (single frame)

single

Results (sequence)

sequence

About

Tensorflow implementation of Style Transfer for Smoke Simulations. Created as part of ETH Zurich Student Summer Research Fellowship

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages