﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3ARomanp%2FGSoC_Mantaflow_Framework%2FDocs</id>
	<title>利用者:Romanp/GSoC Mantaflow Framework/Docs - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3ARomanp%2FGSoC_Mantaflow_Framework%2FDocs"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Romanp/GSoC_Mantaflow_Framework/Docs&amp;action=history"/>
	<updated>2026-09-07T12:05:21Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Romanp/GSoC_Mantaflow_Framework/Docs&amp;diff=147713&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Romanp/GSoC_Mantaflow_Framework/Docs&amp;diff=147713&amp;oldid=prev"/>
		<updated>2018-06-28T21:09:29Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 21:09時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Romanp/GSoC_Mantaflow_Framework/Docs&amp;diff=147712&amp;oldid=prev</id>
		<title>wiki&gt;Romanp: /* GSoC 2014, Mantaflow integration */</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Romanp/GSoC_Mantaflow_Framework/Docs&amp;diff=147712&amp;oldid=prev"/>
		<updated>2014-10-25T18:13:15Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;GSoC 2014, Mantaflow integration&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=GSoC 2014, Mantaflow integration, Roman Pogribnyi=&lt;br /&gt;
Following is the outline of my work during GSoC 2014.&lt;br /&gt;
&lt;br /&gt;
During this project, I have started the integration of Mantaflow framework into Blender.&lt;br /&gt;
My per-week progress can be seen [http://wiki.blender.org/index.php?title=User:Romanp/GSoC_Mantaflow_Framework/Progress here]&lt;br /&gt;
&lt;br /&gt;
[[File:Manta_sim.png|640px]]&lt;br /&gt;
&lt;br /&gt;
=Work Done=&lt;br /&gt;
My main purpose was to integrate the framework as loosely as possible, to account for further expansion of Mantaflow, as it is currently under development.&lt;br /&gt;
 &lt;br /&gt;
====User Interface configured for MantaFlow interaction====&lt;br /&gt;
[[File:Manta_ui.png|right|250px]]&lt;br /&gt;
Currently, there is a checkbox for switching to Mantaflow framework functionality. User currently can specify start/end frames of simulation, plus settings of noise fields of emitter. Once hit &amp;quot;Create Manta Setup&amp;quot;, python script with mantaflow settings will be created and simulation begins. &lt;br /&gt;
*Solver resolution parameter will be used to switch to 2D solver&lt;br /&gt;
*UVs Couns: how many textures are used for turbulence modeling in wavelets&lt;br /&gt;
*Noise settings: noise field for emitter. To deactivate, set &amp;quot;scale&amp;quot; to 0. &lt;br /&gt;
&lt;br /&gt;
===Scene transfer to MantaFlow===&lt;br /&gt;
====Setup Script====&lt;br /&gt;
To begin simulation, Mantaflow needs a setup script. Each time the &amp;quot;Create Manta Setup&amp;quot; button is hit, or current frame is set to '0' with mantaflow &amp;quot;Use Mantaflow&amp;quot; enabled, a setup file is generated. Currently, script is written to &amp;lt;i&amp;gt;manta_scene.py&amp;lt;/i&amp;gt; file, but later will be passed to manta module directly. &lt;br /&gt;
====Scenarios====&lt;br /&gt;
These are templates for Mantaflow setups that will be preprocessed. Currently, I'm integrating one for smoke. Since the Nodes  &lt;br /&gt;
====Geometry====&lt;br /&gt;
Flow and Collision objects are exported to two files, &amp;lt;i&amp;gt;manta_flow.obj&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;manta_coll.obj&amp;lt;/i&amp;gt; respectively. Objects are grouped by their type(flow or collision) and written to disk. Since domain sizes and &amp;quot;zero location&amp;quot;(0,0,0) are different, I introduced a repositioning and rescaling step each time geometry is exported. Meshes are linked as children to domain, and then the domain is scaled down to (1,1,1). The linking allows rotated meshes to be scaled on axes of &lt;br /&gt;
domain, not their own. When loaded to Mantaflow, meshes are resized and repositioned accordingly.&lt;br /&gt;
&lt;br /&gt;
====SDF====&lt;br /&gt;
When in Mantaflow, meshes must be transferred to grid representation. For that, signed distance field(SDF) function was  added. Initial function used triangle centers and normals for SDF computation, which led to false results in highly-resolution domains with low-resolution meshes. After introducing a sampling factor, to check multiple vertices per triangle, problem was resolved.&lt;br /&gt;
[[File:SDF_mantaflow_2.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
====Force Fields====&lt;br /&gt;
External Blender forces are passed to Mantaflow on a per-step basis. This allows to account for animated force fields, which are not yet implemented in Mantaflow. On each step, a unified force grid is passed to manta sim, where it is accumulated to running simulation.&lt;br /&gt;
&amp;lt;vimeo width=&amp;quot;640&amp;quot; height=&amp;quot;360&amp;quot; &amp;gt;103561002&amp;lt;/vimeo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running and getting data back===&lt;br /&gt;
My first task was to be able to read simulations produced by Mantaflow and account for different dimension representation. After every step of simulation, Mantaflow setup script creates density files that are read by Blender. These are of format &amp;lt;i&amp;gt;den%04d.uni&amp;lt;/i&amp;gt; for low-res smoke and &amp;lt;i&amp;gt;densityXl_%04d.uni&amp;lt;/i&amp;gt; for wavelets smoke(den0001.uni and densityXl_0001.uni respectively) &lt;br /&gt;
&amp;lt;vimeo width=&amp;quot;640&amp;quot; height=&amp;quot;360&amp;quot; &amp;gt;96128483&amp;lt;/vimeo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Internal integration====&lt;br /&gt;
For the best performance, Mantaflow had to be integrated as internal Blender module. It took time to solve the problems with compiling together, and then importing all Mantaflow classes during runtime. I added the option to include Mantaflow as external module(for update-during-compile possibility), if such necessity occurs.&lt;br /&gt;
&lt;br /&gt;
====Per-Step====&lt;br /&gt;
I added the per-step simulation operation to mantaflow, to allow to stop sim mid-running, and also for further elimination of the &amp;quot;Bake&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
===Integration details===&lt;br /&gt;
The code for Mantaflow library is taken from [http://mantaflow.ethz.ch here]. Among dependencies, currently:&lt;br /&gt;
*CUDA for some functions with vortex sheets&lt;br /&gt;
*Intel TBB/ OpenMP&lt;br /&gt;
*Zlib package(using version 1.2.8)&lt;br /&gt;
&lt;br /&gt;
There are two options of building Mantaflow in Blender: from original sources and from preprocessed files. Both options are located in &amp;lt;i&amp;gt;/source/blender/python/manta_pp&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;/source/blender/python/manta_full&amp;lt;/i&amp;gt; folders.&lt;br /&gt;
When compiling, Mantaflow has a preprocessing step, which transforms some of the original files and adds them to final compile sources. There preprocessed files are used in compiling the manta library, and can be found in &amp;lt;i&amp;gt;/pp&amp;lt;/i&amp;gt; folder. &lt;br /&gt;
&lt;br /&gt;
For now, Blender uses preprocessed files directly. To compile with them, one has to build Mantaflow and add files manually. I included second version, i.e is compiling from original sources. This will later be used to make Mantaflow a cmake &amp;quot;external project&amp;quot;, with possibility to update sources from Maktaflow repository during compile time.&lt;br /&gt;
&lt;br /&gt;
====Other====&lt;br /&gt;
Other work included adding functions to Mantaflow for receiving information form Blender(force fields, SDFs), threading the simulation functions(to leave Blender responsive while sim is running) and fixing reported bugs.&lt;br /&gt;
&lt;br /&gt;
==Demo==&lt;br /&gt;
Here is a short demo of what can currently be done with mantaflow:&lt;br /&gt;
&amp;lt;vimeo width=&amp;quot;640&amp;quot; height=&amp;quot;360&amp;quot; &amp;gt;103540182&amp;lt;/vimeo&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
==Further work==&lt;br /&gt;
Though I have integrated basic smoke functionality, there is still much to be done. Next step would be &lt;br /&gt;
*adding emission maps to Mantaflow setup&lt;br /&gt;
*integrating particle systems &lt;br /&gt;
*fluid simulations. From there, setting up fluid simulations and k-eps turbulence modeling can take place. * *automatically adjust SDF settings based on mesh triangulation.&lt;br /&gt;
*adding OpenMP&lt;br /&gt;
*would be nice to have fluids configurable with Nodes&lt;/div&gt;</summary>
		<author><name>wiki&gt;Romanp</name></author>
		
	</entry>
</feed>