how to handle the .uni files

157 views
Skip to first unread message

kyri...@outlook.com

unread,
Mar 11, 2019, 6:49:02 AM3/11/19
to mantaflow Forum
Hello,
Recently, I have been running the source code of TempoGAN. To the last step, I have already got some .uni files with 3d_trained_gan, and I really want to know how to load these uni files back into mantaflow for viewing?
I am very new to Mantaflow and fluid simulation. Thank you in advance!

Nils Thuerey

unread,
Mar 12, 2019, 8:43:46 AM3/12/19
to mantaflow Forum
Hi, to load the files it would be enough to add a line such as 'grid.load(<filename>)' to a python scene file. E.g., if you do 'density.load("density_%04d.uni" % t)' at the end of the simple-plume main loop, it will try to load the corresponding uni file from the local directory. Just make sure the resolution of your scene matches the one of the uni files (you could detect it from the files, but for now I'd recommend to set it manually). If it doesn't match you'll see an error with the sizes.

Cheers, Nils

kyri...@outlook.com

unread,
Mar 17, 2019, 9:30:16 PM3/17/19
to mantaflow Forum
Thank you for your answer. 
But I still have some questions. I added the line "density.load("density_%04d.uni" % t)" to the main loop of gen_sim_data file. It actually worked but just showed in the command. I want to know that how can I get the 3D result just like the paper shows to us. What else should I do except getting the .uni files? Forgive me for the stupid question cause I'm really new to this.
Again, thanks a lot for your help! 

在 2019年3月12日星期二 UTC+8下午8:43:46,Nils Thuerey写道:

Nils Thuerey

unread,
Mar 22, 2019, 1:11:42 PM3/22/19
to mantaflow Forum
Ah, do you mean the 3D renderings of the smoke? Those were done with a version of PBRT (https://pbrt.org). Alternatively, you could also write out .vol files and render them with mitsuba (https://www.mitsuba-renderer.org). Unfortunately, both require a bit more work to set up. With the mantaflow load, you can look at the data in the mantaflow UI though, or you could create simple previews with the "projectPpmFull()" plugin. 

On Monday, March 18, 2019 at 2:30:16 AM UTC+1

kyri...@outlook.com

unread,
Mar 23, 2019, 9:32:22 PM3/23/19
to mantaflow Forum
Thank you so much for your answer! I will learn the two framework and try to render the  3D smoke. You are so kind and thank you again!

在 2019年3月23日星期六 UTC+8上午1:11:42,Nils Thuerey写道:

Kelvin Cai

unread,
Apr 8, 2019, 5:53:36 PM4/8/19
to mantaflow Forum
https://github.com/kelvincai522/houdini/blob/master/uniio_houdini.ipynb

Wrote some Python snippets to read/write .uni in Houdini.  If you know how to use Houdini, you could use these.
Reply all
Reply to author
Forward
0 new messages