﻿<?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=Dev%3ASource%2FModeling%2FMetaMesh</id>
	<title>Dev:Source/Modeling/MetaMesh - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3ASource%2FModeling%2FMetaMesh"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/MetaMesh&amp;action=history"/>
	<updated>2026-07-12T17:37:54Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/MetaMesh&amp;diff=42300&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/MetaMesh&amp;diff=42300&amp;oldid=prev"/>
		<updated>2018-06-28T17:45: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日 (木) 17:45時点における版&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=Dev:Source/Modeling/MetaMesh&amp;diff=42299&amp;oldid=prev</id>
		<title>2010年4月3日 (土) 12:34にwiki&gt;Terrywallworkによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Modeling/MetaMesh&amp;diff=42299&amp;oldid=prev"/>
		<updated>2010-04-03T12:34:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=MetaMesh=&lt;br /&gt;
&lt;br /&gt;
MetaMesh project is part of my thesis. Purpose of this project is to create simple and easy way of [[BlenderDev/MetaBall|MetaBall]] editting. Non-manifold Mesh will be directing structure for MetaBalls.&lt;br /&gt;
&lt;br /&gt;
[[Image:meta-mesh.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Data structure==&lt;br /&gt;
&lt;br /&gt;
*visualisation of [[BlenderDev/MetaVert|MetaVert]] data structure:&amp;lt;br/&amp;gt; [[Image:MetaVert.png|visualisation of MetaVert data structure]]&lt;br /&gt;
&lt;br /&gt;
*visualisation of [[BlenderDev/MetaEdge|MetaEdge]] data structure:&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; [[Image:MetaEdge.png|visualisation of MetaEdge data structure]]&lt;br /&gt;
&lt;br /&gt;
*visualisation of [[BlenderDev/MetaFace|MetaFace]] data strucure:&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt; [[Image:MetaFace.jpg|visualisation_of_MetaFace_data_structure]]&lt;br /&gt;
&lt;br /&gt;
== Theory of MetaBalls==&lt;br /&gt;
&lt;br /&gt;
=== Implicit Function===&lt;br /&gt;
&lt;br /&gt;
Polygonised surface of [[BlenderDev/MetaBalls|MetaBalls]] is just set of points in space with the same value of implicit function:&lt;br /&gt;
&lt;br /&gt;
[[Image:implicit_function.png|implicit function]]&lt;br /&gt;
&lt;br /&gt;
where F(P) is value of implicit funciton. Points at polygonised surface has zero value. c parameter is &amp;quot;stiffness&amp;quot; of each MetaElem. F blending function and r is distance from each MetaElem.&lt;br /&gt;
&lt;br /&gt;
=== Blending Function===&lt;br /&gt;
&lt;br /&gt;
We use Blending function with this form:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
 |valign=top|[[image:Dev-blending_function.png|blending_function]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
r parameter is distance from [[BlenderDev/MetaElem|MetaElem]] and R is radius of MetaElem. [[BlenderDev/MetaElem|MetaElem]] behind this radius has no influence at polygonised surface.&lt;br /&gt;
&lt;br /&gt;
=== Computation of distance from directing structures===&lt;br /&gt;
&lt;br /&gt;
==== Point (Vertex)====&lt;br /&gt;
&lt;br /&gt;
Distance from point is very easy to computate:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
 |valign=top|[[image:Dev-point_length.png|distance_from_point]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==== Segment (Edge)====&lt;br /&gt;
&lt;br /&gt;
Computation of distance from segment isn't so easy as computation distance from a point. I will show you how hard it is if we computate it 3D space. I don't do it so stupid, of course ;-)&lt;br /&gt;
&lt;br /&gt;
Segment is part of the line. Line is identified by two points A[a0, a1, a2], B[b0, b1, b2] in space. Parametric simultaneous sequations of line has these form:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
 |valign=top|[[image:Dev-line_equations.png|line_equations]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
At the first time we have to computate parameter tI of rectangular projection of point P[p0, p1, p2] to the line.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
 |valign=top|[[image:Dev-rectangular_projection.png|rectangular_projection]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
If parameter tI is inbetween &amp;lt;0,1&amp;gt; then we can computate position C[c0, c1, c2] of this projection using previous simultaneous equations. If parameter tI is bigger then 1 or smaller then 0 value, then it means, then rectangular projection doesn't intersects segment.&lt;br /&gt;
&lt;br /&gt;
If rectangular projection intersects segment then distance from this segment is:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
 |valign=top|[[image:Dev-two_points_length.png|two_points_length]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
It rectangular projection doesn't intersect segment, then we have to computate distance from point P[p0, p1, p2] to the both end points of segment. Minimal distance is distance from segment.&lt;br /&gt;
&lt;br /&gt;
Computation distance from segment using these math formulas isn't too much smart. We use different way. We pre-computate inverse transformation matrix for each segment(edge), which &amp;quot;transfer&amp;quot; an segment to the origin of coordinates. Computation of distance from such segment is much more simple.&lt;br /&gt;
&lt;br /&gt;
Ilustration of transformation in 2D:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
 |valign=top|[[image:Dev-metaball-segment-distance.jpg|metaball-segment-distance]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
We don't have transform segment with inverse trnasform matrix, because we know, that transformed segment will lay in the origin of coordinates. We have to transform only point P=X[x,y,z,w] w (weight of point is 1):&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
 |valign=top|[[image:Dev-transform_matrix.jpg|transform_matrix]]&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
This transformation could be computate using modern instruction set (MMX/SSE) of our processors.&lt;br /&gt;
&lt;br /&gt;
Computation of distance transformed point from segment laing in th origin of coordinates is very easy then:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/* simplificated densfunc() in mball.c&lt;br /&gt;
 * vec ... coordinates of point X&lt;br /&gt;
 * ball ... segment primitive */&lt;br /&gt;
float densfunc(MetaElem *ball, float *vec)&lt;br /&gt;
{&lt;br /&gt;
	 float dist2;&lt;br /&gt;
&lt;br /&gt;
	 Mat4MulVecfl(ball-&amp;gt;imat, vec);&lt;br /&gt;
	 if(ball-&amp;gt;type==MB_EDGE) {&lt;br /&gt;
		  if( vec[0] &amp;gt; ml-&amp;gt;expx) vec[0]-= ml-&amp;gt;expx;&lt;br /&gt;
		  else if(vec[0]&amp;lt; -ml-&amp;gt;expx) vec[0]+= mll-&amp;gt;expx;&lt;br /&gt;
		  else vec[0]= 0.0;&lt;br /&gt;
	 }&lt;br /&gt;
	 /* only powers of distance squared are used in blending function */&lt;br /&gt;
	 dist2= (vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);&lt;br /&gt;
	 /* calculation of blending function */ &lt;br /&gt;
	 dist2= 1.0f-(dist2/ball-&amp;gt;rad2);&lt;br /&gt;
	 if(dist2 &amp;lt; 0.0) return 0.5f;&lt;br /&gt;
	 return 0.5f-ball-&amp;gt;s*dist2*dist2*dist2;&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Triangle (Face)====&lt;br /&gt;
&lt;br /&gt;
I captured several demonstraiting videos of my devel version:&lt;br /&gt;
&lt;br /&gt;
*http://e-learning.vslib.cz/~hnidek/captured-videos/meta-mesh.avi&lt;br /&gt;
*http://e-learning.vslib.cz/~hnidek/captured-videos/point-dist.avi&lt;br /&gt;
*http://e-learning.vslib.cz/~hnidek/captured-videos/meta-edge-ellipsoid.avi&lt;br /&gt;
&lt;br /&gt;
[[User:JiriHnidek|Ji&amp;amp;#345;í Hnídek]]  01 Nov 2004&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Terrywallwork</name></author>
		
	</entry>
</feed>