<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>eduardo simioni</title>
	<atom:link href="http://www.eksod.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eksod.com</link>
	<description>animator/technical artist</description>
	<lastBuildDate>Sat, 04 Feb 2012 17:14:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>wing ide with maya on linux</title>
		<link>http://www.eksod.com/2011/07/wing-ide-with-maya-on-linux/</link>
		<comments>http://www.eksod.com/2011/07/wing-ide-with-maya-on-linux/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 21:09:33 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[autocompletion]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[maya]]></category>
		<category><![CDATA[openmaya]]></category>
		<category><![CDATA[pymel]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[wing]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=135</guid>
		<description><![CDATA[As Jason Parks noted, Wing is definitely a great IDE to work with Python. With OpenMaya and pymel auto-completion together with code debugging it&#8217;s everything you might want to script on Maya. Eric Pavey has a great tutorial on how to setup everything, I will just try to resume it with some tips on getting [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://www.jason-parks.com/artoftech/?p=139">Jason Parks</a> noted, <a href="http://wingware.com/">Wing</a> is definitely a great IDE to work with Python. With OpenMaya and pymel auto-completion together with code debugging it&#8217;s everything you might want to script on Maya. Eric Pavey has <a href="http://mayamel.tiddlyspot.com/#%5B%5BInteraction%20between%20Wing%20and%20Maya%5D%5D">a great tutorial</a> on how to setup everything, I will just try to resume it with some tips on getting it working on Linux. Some considerations:</p>
<ul>
<li><strong>Sending code</strong> works as with Eclipse. You open a port on Maya and send it through a socket. Locally or remotely.</li>
<li><strong>Autocompletion</strong> works and in Maya 2012 is quite easy to setup.</li>
<li><strong>Debug</strong> works by importing wingdbstub in your script. Maya to Wing communication function basically the same way as sending code, but on a different port.</li>
</ul>
<p>Each point is independent from one another and you have to setup each one differently.</p>
<h2><strong>Sending code from Wing to Maya.</strong></h2>
<ol>
<li><em>Open port on Maya</em></li>
<li><em>Copy Eric Pavey&#8217;s scripts to their folders</em></li>
<li><em>Setup hotkeys on Wing&#8217;s keymap.normal</em></li>
</ol>
<p>To open a port on Maya create a shelf button or add to userSetup.mel either:</p>
<pre class="brush: python; title: ;">
import maya.cmds as cmds
    if cmds.commandPort(':7720', q=True) !=1:
        cmds.commandPort(n=':7720', eo = False, nr = True)
</pre>
<p>Or</p>
<pre class="brush: cpp; title: ;">
// userSetup.mel
commandPort -name &quot;127.0.0.1:7720&quot; -echoOutput;
commandPort -name &quot;:7720&quot; -echoOutput;
</pre>
<p>You need then two .py files:</p>
<p><a href="http://www.eduardosimioni.com/scripts/wingide/wingHotkeys.py">wingHotkeys.py</a> &#8211; goes into your /.wingide4/scripts in your /home. This saves what you have on Wing on a temp file, opens a socket and communicates with Maya, calling:<br />
<a href="http://www.eduardosimioni.com/scripts/wingide/executeWingCode.py">executeWingCode.py</a> &#8211; which goes under your /home//maya/scripts. It&#8217;s called inside Maya by the previous script to run the temp file.</p>
<p>Lastly, you need to bind one or more wrappers into a hotkey in Wing, which calls the functions in wingHotkeys.py. You should do this at /usr/lib/wingide4.0/<a href="http://www.eduardosimioni.com/scripts/wingide/keymap.normal">keymap.normal</a>. Just change one key to &#8216;Ctrl-P&#8217;: &#8216;python_to_maya()&#8217; or &#8216;Ctrl-P&#8217;: &#8216;all_python_to_maya()&#8217; for example. The scripts provided above are slightly edited versions of <a href="http://mayamel.tiddlyspot.com/#%5B%5BHow%20can%20I%20have%20Wing%20send%20Python%20or%20mel%20code%20to%20Maya%3F%5D%5D">Eric Pavey&#8217;s</a> version to work on Linux. The only changes are the socket line, the temp file and the send all to python wrappers.</p>
<h2><strong>Auto-completion</strong></h2>
<ol>
<li><em>Add pi files to Wing Source Analysis</em></li>
</ol>
<p>On Wing, under Edit/Preferences/Source Analysis/Advanced/Interface File Path add the directory: /usr/autodesk/maya/devkit/other/pymel/extras/completion/pi. That&#8217;s it. For older versions of Maya you might have to find or download the pi files from somewhere.</p>
<h2><strong>Debug</strong></h2>
<ol>
<li><em>Copy wingdbstub.py from Wing to /maya/scripts</em></li>
<li><em>Edit wingdbstub.py and set kEmbedded=1</em></li>
<li><em>Enable Passive Listen and Kill Externally Launched on Wing</em></li>
<li><em>When you want to debug, import wingdbstub in your script</em></li>
</ol>
<p>To set this up copy /usr/lib/wingide4.0/wingdbstub.py to /maya/scripts in your /home. Open it and search for kEmbedded and change from =0 to =1.</p>
<p>On Wing, under Edit/Preferences/Debugger/External/Remote activate &#8216;Enable Passive Listen&#8217; and &#8216;Kill Externally Launched&#8217;. With this you are good to go, but when you want to debug something you need to add this to the beginning of the code you want to debug:</p>
<pre class="brush: python; title: ;">
import wingdbstub
wingdbstub.Ensure()
</pre>
<p>This procedure is also on <a href="http://download.autodesk.com/global/docs/maya2012/en_us/files/GUID-8A96A8DB-FD6F-434F-A878-288DD84E99C-5331.htm">Maya&#8217;s help</a>.</p>
<p>On Windows the folders are different, but these procedures are exactly the same. Both wingHotkeys.py and executeWingCode.py should also work on Windows, the location of the temp file and the socket line depends on the system you are running everything (left two different if&#8217;s there just for clarity.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/07/wing-ide-with-maya-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xml with dotnet on maxscript</title>
		<link>http://www.eksod.com/2011/04/xml-with-dotnet-on-maxscript/</link>
		<comments>http://www.eksod.com/2011/04/xml-with-dotnet-on-maxscript/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 14:58:38 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[3ds Max]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[3dsmax]]></category>
		<category><![CDATA[hierarchy]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[recursion]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tree]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=101</guid>
		<description><![CDATA[Paul Neale has a very good tutorial about dotnet and maxscript, specially reading and writing xml, but I decided to add some more information from a slightly different approach. First, let&#8217;s translate an XML to dotnetesque: &#60;rootElement&#62; &#60;element1 /&#62; &#60;element2 attributeName=&#34;attribute content&#34;&#62; &#60;element2.1&#62;innerXML of this element&#60;/element2.1&#62; &#60;/element2&#62; &#60;/element&#62; And the entire document is a XmlDocument [...]]]></description>
			<content:encoded><![CDATA[<p>Paul Neale has a very good tutorial about <a href="http://www.paulneale.com/tutorials/dotNet/dotNet.htm">dotnet and maxscript</a>, specially <a href="http://www.paulneale.com/tutorials/dotNet/xml/xmlReading.htm">reading</a> and <a href="http://www.paulneale.com/tutorials/dotNet/xml/xml.htm">writing</a> xml, but I decided to add some more information from a slightly different approach. First, let&#8217;s translate an XML to <em>dotnetesque</em>:</p>
<pre class="brush: xml; title: ;">
&lt;rootElement&gt;
    &lt;element1 /&gt;
    &lt;element2 attributeName=&quot;attribute content&quot;&gt;
        &lt;element2.1&gt;innerXML of this element&lt;/element2.1&gt;
    &lt;/element2&gt;
&lt;/element&gt;
</pre>
<p>And the entire document is a XmlDocument (instance of dotNetObject &#8220;<a href="http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx">System.Xml.XmlDocument</a>&#8220;)</p>
<p>There are many ways to read and write XML with dotnet. If you need to read the whole document first, probably the most optimized is by using XmlParser, but it can be a bit of a pain. If you are using Maxscript you are not doing it in realtime, so a couple miliseconds won&#8217;t make that much of a difference. </p>
<p>Anyway, if you are looking for <em>specific information inside tags</em> you can easily do it using <a href="http://msdn.microsoft.com/en-us/library/dc0c9ekk.aspx">.GetElementsByTagName</a>:</p>
<pre class="brush: plain; title: ;">
	XmlDoc = dotNetObject &quot;System.Xml.XmlDocument&quot;
	XmlDoc.load &quot;D:\\Characters\\Rider\\exportEMFX.xml&quot;

	-- I know &lt;baseCharacter&gt; has only one entry, so I get the first one
	tagBaseChar = XmlDoc.GetElementsByTagName &quot;baseCharacter&quot;
	baseCharacter = (tagBaseChar.item 0).InnerXML

	-- I don't know how many &lt;file&gt;s there is, so I get them into an array
	tagFiles = XmlDoc.GetElementsByTagName &quot;file&quot;
	fileList = (for i=0 to (tagFiles.count-1) collect (tagFiles.item i).InnerXML)
</pre>
<p>To read something like:</p>
<pre class="brush: xml; title: ;">
&lt;mlExportEMFX&gt;
    &lt;baseCharacter&gt;D:\\Characters\\Rider\\rider.max&lt;/baseCharacter&gt;
    &lt;filesToLoad&gt;
        &lt;file&gt;D:\\Characters\\Rider\\FBX\\stopNeutral_L.fbx&lt;/file&gt;
        &lt;file&gt;D:\\Characters\\Rider\\FBX\\stopNeutral_R.fbx&lt;/file&gt;
    &lt;/filesToLoad&gt;
&lt;/mlExportEMFX&gt;
</pre>
<p>Note that GetElementsByTagName doesn&#8217;t care about hierarchy, it just finds the element you are looking for, no matter where in the tree it is or how many times it&#8217;s repeated. If you have a &#8220;file&#8221; under &#8220;filesToLoad&#8221; and also under &#8220;filesToSave&#8221; it won&#8217;t differentiate between them.</p>
<p>If you have a tree/graph structure and you don&#8217;t know each tag name one solution is to recourse through it all loading them on a dictionary or array.</p>
<p>Say you have an hierarchy structure you want to save, together with their layers, into an XML. You can store the data in two arrays with:</p>
<pre class="brush: plain; title: ;">
/*
this two are recursive functions to return the hierarchy in a single array
*/
fn GetHierarchyTree lParent =
(
	toRet = #(lParent.name)
	for o in lParent.children do
		append toRet (GetHierarchyTree o)
	toRet
)
fn GetLayerTree lParent =
(
	toRet = #(lParent.layer.name)
	for o in lParent.children do
		append toRet (GetLayerTree o)
	toRet
)

/*
this is just an example, you shouldn't use globals like this
*/
global parentTree = #()
global layerTree = #()

/*
gets the data into parentTree and layerTree
*/
fn getData =
(
	for o in objects where o.parent == undefined do
	(
		append parentTree (GetHierarchyTree o)
		append layerTree (GetLayerTree o)
	)
)
</pre>
<p>To save this into an XML you also go with recursion:</p>
<pre class="brush: plain; title: ;">

fn recurseTreeToXML baseNode xmlDocNew pTree lTree =
(
    for i=1 to pTree.count do
    (
		-- if it's a leaf, there's data, so we append
        if (isKindOf pTree[i] String) then
        (
            curNode = xmlDocNew.CreateElement pTree[i]
            curNode.SetAttribute &quot;layer&quot; lTree[i]
            baseNode.appendChild curNode
            baseNode = curNode
        )
        else -- it's a branch with more data underneath
        (
            recurseTreeToXML baseNode xmlDocNew pTree[i] lTree[i]
        )
    )
)

fn saveDataOnXML =
(
	-- you cannot append elements to an xmldoc
	-- you have to append elements to a single root element, child of xmldoc
    xmlDocNew = dotNetObject &quot;System.Xml.XmlDocument&quot;
    xmlRoot = xmlDocNew.CreateElement (getFilenameFile maxfilename)
    xmlDocNew.appendChild xmlRoot

    recurseTreeToXML xmlRoot xmlDocNew parentTree layerTree

    xmlDocNew.save (&quot;C:\\temp\\test.xml&quot;)
)</pre>
<p>And also to read an XML:</p>
<pre class="brush: plain; title: ;">

fn recurseXML docElement =
(
	tempPTree = #(docElement.name)
	tempLayerTree = #(docElement.getAttribute &quot;layer&quot;)

	for i = 0 to (docElement.childNodes.count - 1) do
	(
		tmp = (recurseXML docElement.childNodes.itemOf[i])
		append tempPTree tmp[1]
		append tempLayerTree tmp[2]
	)
	return #(tempPTree, tempLayerTree)
)

global parentTreeXML = #()
global layerTreeXML = #()
fn readXML =
(
	xmlDoc = dotNetObject &quot;System.Xml.XmlDocument&quot;
	xmlDoc.load (&quot;C:\\temp\\test.xml&quot;) 

	docElement = XmlDoc.documentElement

	-- if we don't do this here we end up with the root node on parentTreeXML
	-- which can be worked out in anoter way also, of course.
	for i = 0 to (docElement.childNodes.count - 1) do
	(
		tmp = (recurseXML docElement.childNodes.itemOf[i])
		append parentTreeXML tmp[1]
		append layerTreeXML tmp[2]
	)
)
</pre>
<p>Remember, besides <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx">dotnet help website</a>, showproperties and showmethods are your best friends. You can also copy this code and paste on maxscript editor or jedit or somewhere with a syntax highlighter to better read it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/04/xml-with-dotnet-on-maxscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>reading/writing xml with python and maxscript</title>
		<link>http://www.eksod.com/2011/03/readingwriting-xml-with-python-and-maxscript/</link>
		<comments>http://www.eksod.com/2011/03/readingwriting-xml-with-python-and-maxscript/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 19:15:21 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[pipeline]]></category>
		<category><![CDATA[maxscript]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=92</guid>
		<description><![CDATA[If you know where to find the information it becomes quite straight forward if you are not doing anything complex. With python you can use xml.dom.minidom, while with maxscript you can use either .NET Object &#8220;System.Xml.XmlDocument&#8221; or Class &#8220;System.Xml.XmlReader&#8220;. With python you create a root element and append child elements from there. A very good [...]]]></description>
			<content:encoded><![CDATA[<p>If you know where to find the information it becomes quite straight forward if you are not doing anything complex. With python you can use <a href="http://docs.python.org/library/xml.dom.minidom.html">xml.dom.minidom</a>, while with maxscript you can use either .NET Object &#8220;<a href="http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.aspx">System.Xml.XmlDocument</a>&#8221; or Class &#8220;<a href="http://www.google.com/url?sa=t&#038;source=web&#038;cd=1&#038;ved=0CBcQFjAA&#038;url=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fsystem.xml.xmlreader.aspx&#038;ei=tcx3Tf7CDMfIsgbj8vGJBQ&#038;usg=AFQjCNGWb6wWqxXS386Nd9jzB5VLVZ0u9g&#038;sig2=OJFCzZGlLs6afIfP-M1okg">System.Xml.XmlReader</a>&#8220;.</p>
<p>With python you create a root element and append child elements from there. A very good sample can be found on: <a href="http://www.postneo.com/projects/pyxml/">http://www.postneo.com/projects/pyxml/</a>  To read you have getElementsByTagName on both python and dotnet XmlDocument. XmlReader might be a bit faster, but you have to parse elements by yourself.</p>
<p>There&#8217;s an issue with minidom&#8217;s toprettyprintxml, it adds whitespace and tabs between tags, around textNodes. And they are obviously read afterwards. A couple of different solutions are discussed on <a href="http://ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace/">Ron Rothman&#8217;s blog</a>, the easiest one using xml.dom.ext.PrettyPrint.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/03/readingwriting-xml-with-python-and-maxscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>exporting mirrored animations from Motionbuilder</title>
		<link>http://www.eksod.com/2011/03/exporting-mirrored-animations-from-motionbuilder/</link>
		<comments>http://www.eksod.com/2011/03/exporting-mirrored-animations-from-motionbuilder/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 18:27:42 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[MotionBuilder]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[mirror]]></category>
		<category><![CDATA[motionbuilder]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=72</guid>
		<description><![CDATA[It&#8217;s quite easy. Basically you need to: plot to the skeleton; save one animation; turn on Mirror Animation for the character; plot back to the control rig, which then mirrors the animation; rotate the Character Reference model 180 degrees; plot back to the skeleton; save mirrored animation. The tricky part is just number 5 where [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite easy. Basically you need to:</p>
<ol>
<li>plot to the skeleton;</li>
<li>save one animation;</li>
<li>turn on Mirror Animation for the character;</li>
<li>plot back to the control rig, which then mirrors the animation;</li>
<li>rotate the Character Reference model 180 degrees;</li>
<li>plot back to the skeleton;</li>
<li>save mirrored animation.</li>
</ol>
<p>The tricky part is just number 5 where you need to do some matrix rotation. Python for this would be something like:</p>
<pre class="brush: python; auto-links: false; title: ;">
from pyfbsdk import *
app = FBApplication()
char = app.CurrentCharacter
savePath = r&quot;C:\&quot; # could be FB application path or project path
filename = app.FBXFileName
skeleton = FBCharacterPlotWhere.kFBCharacterPlotOnSkeleton
ctrlrig = FBCharacterPlotWhere.kFBCharacterPlotOnControlRig

# plot to skeleton, see bellow
plotAnim(char, skeleton)

# save left animation
sOptions = FBFbxOptions(False) # false = save options
sOptions.SaveCharacter = True
sOptions.SaveControlSet = False
sOptions.SaveCharacterExtension = False
sOptions.ShowFileDialog = False
sOptions.ShowOptionsDialog = False
app.SaveCharacterRigAndAnimation(savePath + &quot;\\&quot; + filename + &quot;_L&quot;, char, sOptions)

# activate mirror and plot
char.MirrorMode = True
plotAnim(char, ctrlrig)

# get reference model
refModel = FBFindModelByName(&quot;Character_Ctrl:Reference&quot;)

# rotating 180, the tricky part
# http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q28
rotateY180 = FBMatrix()
rotateY180[0] = math.cos((180*0.017453292519943295769236907684886))
rotateY180[2] = math.sin((180*0.017453292519943295769236907684886))
rotateY180[8] = -math.sin((180*0.017453292519943295769236907684886))
rotateY180[10] = math.cos((180*0.017453292519943295769236907684886))

refMT = FBMatrix()
refModel.GetMatrix(refMT)

refModel.SetMatrix( MatrixMult(rotateY180, refMT) )
scene.Evaluate()

# plot back to skeleton
plotAnim(char, skeleton)

# save again
app.SaveCharacterRigAndAnimation(savePath + &quot;\\&quot; + filename + &quot;_R&quot;, char, sOptions)
</pre>
<p>The plot and multiplication functions are:</p>
<pre class="brush: python; auto-links: false; title: ;">
# This is from Neil3d: http://neill3d.com/mobi-skript-raschet-additivnoj-animacii?langswitch_lang=en
def MatrixMult(Ma, Mb):
    res = FBMatrix()

    for i in range(0,4):
        for j in range(0,4):
            sum=0
            for k in range(0,4):
                sum += Ma[i*4+k] * Mb[k*4+j]

            res[i*4+j] = sum
    return res

def plotAnim(char, where):
    if char.GetCharacterize:
        switchOn = char.SetCharacterizeOn(True)

    plotoBla = FBPlotOptions()
    plotoBla.ConstantKeyReducerKeepOneKey = True
    plotoBla.PlotAllTakes = True
    plotoBla.PlotOnFrame = True
    plotoBla.PlotPeriod = FBTime( 0, 0, 0, 1 )
    #plotoBla.PlotTranslationOnRootOnly = True
    plotoBla.PreciseTimeDiscontinuities = True
    #plotoBla.RotationFilterToApply = FBRotationFilter.kFBRotationFilterGimbleKiller
    plotoBla.UseConstantKeyReducer = False
    plotoBla.ConstantKeyReducerKeepOneKey  = True

    if (not char.PlotAnimation(where, plotoBla)):
        FBMessageBox( &quot;Something went wrong&quot;, &quot;Plot animation returned false, cannot continue&quot;, &quot;OK&quot;, None, None )
        return False

    return char
</pre>
<p>If you are exporting the character to a game, pay attention to the root node rotation. If you used it in the characterization, changes are it might also be rotated, and you might not want that to happen. You can also establish a convention on the name of the files, and easily detect if the animation currently open ends with _L or _R, and adapt the filename correctly.</p>
<p>FBApplication().SaveCharacterRigAndAnimation() is the equivalent of the Save Character Animation on the Character Controls window, which saves only the animation, without mesh. I prefer to use this when exporting only the animation from Motionbuilder to some other software, since it&#8217;s cleaner, faster and file sizes are smaller, but you could use any other function also.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/03/exporting-mirrored-animations-from-motionbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>installing python modules on Motionbuilder</title>
		<link>http://www.eksod.com/2011/02/installing-python-modules-on-motionbuilder/</link>
		<comments>http://www.eksod.com/2011/02/installing-python-modules-on-motionbuilder/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 12:50:41 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[MotionBuilder]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[motionbuilder]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=68</guid>
		<description><![CDATA[It&#8217;s quite straight forward, once you have the correct package. Here is two places worth looking for 64 bits modules: http://www.lfd.uci.edu/~gohlke/pythonlibs/ http://www.activestate.com/activepython/downloads If you install the module it rests under C:\Python26\Lib\site-packages. You just need to copy it to a sys.path from Motionbuilder&#8217;s python. A good choice is: C:\Program Files\Autodesk\Autodesk MotionBuilder 2011 64-bit\bin\x64\python\lib\plat-win]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s quite straight forward, once you have the correct package. Here is two places worth looking for 64 bits modules:</p>
<p><a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/">http://www.lfd.uci.edu/~gohlke/pythonlibs/</a></p>
<p><a href="http://www.activestate.com/activepython/downloads">http://www.activestate.com/activepython/downloads</a></p>
<p>If you install the module it rests under C:\Python26\Lib\site-packages. You just need to copy it to a sys.path from Motionbuilder&#8217;s python. A good choice is: C:\Program Files\Autodesk\Autodesk MotionBuilder 2011 64-bit\bin\x64\python\lib\plat-win</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/02/installing-python-modules-on-motionbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>changes to the additive animation script</title>
		<link>http://www.eksod.com/2011/02/changes-to-the-additive-animation-script/</link>
		<comments>http://www.eksod.com/2011/02/changes-to-the-additive-animation-script/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 21:53:18 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[MotionBuilder]]></category>
		<category><![CDATA[additive animation]]></category>
		<category><![CDATA[motionbuilder]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=52</guid>
		<description><![CDATA[Made some improvements to the script. After almost blowing my brains out trying to debug again all the matrix math, it seems the additive results were not being added correctly to the control rig&#8217;s bind pose. Anyway, I switched from getting the bind pose from the control rig for the actual &#8220;stance pose&#8221; for the [...]]]></description>
			<content:encoded><![CDATA[<p>Made some improvements to the script. After almost blowing my brains out trying to debug again all the matrix math, it seems the additive results were not being added correctly to the control rig&#8217;s bind pose.</p>
<p>Anyway, I switched from getting the bind pose from the control rig for the actual &#8220;stance pose&#8221; for the bone skeleton. This is the pose stored when you &#8220;add the character&#8221;. I get it&#8217;s matrix and paste it on a frame on another layer at take03. It shouldn&#8217;t be needed if the bones have zeroed out rotations though.</p>
<p>From all that debugging I&#8217;ve learned a couple of things:</p>
<p>- How to install numpy and any other modules/libraries to Mobu&#8217;s python;<br />
- That Mobu crashes if I try to extend a list of FBMatrix() to another list (but append works);<br />
- That to get the stance pose I need to necessarily do a .SetMatrix then .AnimationNode.KeyCandidate(). And obviously a .GetMatrix before that to find the stance matrix.</p>
<p>I will post more about the modules thingy on the next days.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/02/changes-to-the-additive-animation-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>retargeting animation, howto/tutorial/whatis</title>
		<link>http://www.eksod.com/2011/02/retargeting-animation-howtotutorialwhatis/</link>
		<comments>http://www.eksod.com/2011/02/retargeting-animation-howtotutorialwhatis/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 16:33:33 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[motionbuilder]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[retarget]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=46</guid>
		<description><![CDATA[I think a couple more words for new animators might be helpful. Retargeting is just the process of &#8220;copying&#8221; the animation from one skeleton to the other. As you probably know, the simple cut and paste of keyframes between characters do not work. The joints might have different names, might have different rotations, different zeroed [...]]]></description>
			<content:encoded><![CDATA[<p>I think a couple more words for new animators might be helpful.</p>
<p>Retargeting is just the process of &#8220;copying&#8221; the animation from one skeleton to the other. As you probably know, the simple cut and paste of keyframes between characters do not work. The joints might have different names, might have different rotations, different zeroed rotations, positions, etc etc. Some real time engines are able to do this with very strict rules of how the skeletons must be made, most of the time the difference are just and only the proportions, where just the rotation of the joints (except the root node) are used between skeletons that are mostly equal.</p>
<p>When characters have different skeletons, even with different hierarchies, you have to use some sort of tool, like Motionbuidler. The way it does is to have two characters in the scene, and copy it from &#8220;one control rig to the other&#8221;. If you haven&#8217;t, you should familiarize yourself completely with Motionbuilder&#8217;s characterize tools, since they are essential to fully use the software. Characters in Motionbuilder can have many inputs, like an Actor from mocap software, the control rig, which is used to animate or edit the animation of a skeleton, or another character, to &#8220;retarget&#8221; the animation from this character to the current one.</p>
<p>Getting into more detail, to do this, you import or merge both skeleton hierarchies into one scene. You characterize each one of them, correctly. They need both to be on tpose, and ideally should have all their bones above ground (above 0 y). Refer to Motionbuilder help for this, it&#8217;s thoroughly explained there. And this is one of the tricky parts, to use the retargeter script, each animation to be imported must be on tpose on frame 0. You don&#8217;t actually need to create a control rig for each one of them, after both are characterized, you just need to select the input type of the new character to the old character, and activate it. Animation on both characters should then be synched, regardless of differences in hierarchies or proportions.</p>
<p>The <a href="https://github.com/eksod/Retargeter">retargeter script</a> just automates this process, loading a folder containing .fbx or .bvh animations over the new character. It does characterize the animations if needed, but they need to follow either Motionbuilder nomenclature or 3dsMax Biped to be correctly characterized. If they are not, you can just edit the Motionbuilder one inside the script, changing the right column to match the names on your skeleton. You don&#8217;t need to change all of them, just the ones present on your skeleton (if you don&#8217;t have finger animations don&#8217;t bother, for example).</p>
<p>You can, for example, get all or some of the 2600+ mocap files from Carnegie Mellon University <a href="http://mocap.cs.cmu.edu/">Motion Capture Database</a> at <a href="https://sites.google.com/a/cgspeed.com/cgspeed/motion-capture">cgspeed.com</a>, which has .bvh&#8217;s and .fbx&#8217;s with a tpose on frame 0, and with the retargeter script quickly retarget them over your character.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/02/retargeting-animation-howtotutorialwhatis/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>retarget animation tool for MotionBuilder</title>
		<link>http://www.eksod.com/2011/02/retarget-animation-tool-for-motionbuilder/</link>
		<comments>http://www.eksod.com/2011/02/retarget-animation-tool-for-motionbuilder/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 21:55:39 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[MotionBuilder]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[biped]]></category>
		<category><![CDATA[motionbuilder]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[retarget]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=38</guid>
		<description><![CDATA[Finally added some new features, some polish on the code and updated the script on github. You can use it to retarget any amount of animations over your characters without much hassle. You can download it here. You just need a scene with an already characterized character and a folder with animations in .fbx. The [...]]]></description>
			<content:encoded><![CDATA[<p>Finally added some new features, some polish on the code and updated the script on github. You can use it to retarget any amount of animations over your characters without much hassle. You can download it <a href="https://github.com/eksod/Retargeter">here</a>.</p>
<p>You just need a scene with an already characterized character and a folder with animations in .fbx. The animations need to be either already characterized or not. If they are not, they need to be on a tpose on frame 0 and have either Motionbuilder (with or without a prefix) or 3dsMax Biped nomenclature. They need to be characterized to be retargeted from one control rig to the other, so that&#8217;s why it needs a tpose. For a custom bone mapping you can easilly add a new one or edit the mobu one.</p>
<p>I might add bvh support in the future (maybe with FBFileBatch()?) when I find more free time again. Or feel free to add it yourself.</p>
<p>* edit: Ok, added support for bvh, namespace, and custom skeletons. You still need to edit the bone mapping if you have custom skeleton though.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/02/retarget-animation-tool-for-motionbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>additive Animation for Motionbuilder</title>
		<link>http://www.eksod.com/2011/01/additive-animation-for-motionbuilder/</link>
		<comments>http://www.eksod.com/2011/01/additive-animation-for-motionbuilder/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 23:09:31 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[MotionBuilder]]></category>
		<category><![CDATA[additive animation]]></category>
		<category><![CDATA[motionbuilder]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.eksod.com/?p=26</guid>
		<description><![CDATA[Ok, done! Tested with EMotionFX at work and it worked great! It will probably work with both Unity, UDK, or any other animation system, but I&#8217;d love to hear from anyone that tries it out. You can download the .py over at github, or all ziped files here. The readme files explains it all. You [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, done! Tested with <a href="http://www.mysticgd.com/">EMotionFX</a> at work and it worked great! It will probably work with both Unity, UDK, or any other animation system, but I&#8217;d love to hear from anyone that tries it out.</p>
<p>You can download the .py <a href="https://github.com/eksod/additiveAnimation">over at github</a>, or all ziped files <a href="http://www.eduardosimioni.com/other/additiveAnimation.zip">here</a>. The readme files explains it all. You just need a characterized character, an animation ploted on take01, a pose ploted on take02 to be subtracted and an empty take03.</p>
<p>If you find any bugs or have any question, ideas or feature requests just send them my way.</p>
<p>Edit: added an example file using the Gremlin sample scene. Just open it and run the script. You can get a good idea of how it works by studying the content on the takes, it&#8217;s quite simple and straight forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/01/additive-animation-for-motionbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>additiveAnim for Motionbuilder?</title>
		<link>http://www.eksod.com/2011/01/additiveanimation-for-motionbuilder/</link>
		<comments>http://www.eksod.com/2011/01/additiveanimation-for-motionbuilder/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 19:21:56 +0000</pubDate>
		<dc:creator>eks</dc:creator>
				<category><![CDATA[MotionBuilder]]></category>
		<category><![CDATA[additive animation]]></category>
		<category><![CDATA[motionbuilder]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://eks.nfshost.com/?p=22</guid>
		<description><![CDATA[Uploaded a tentative version to github. I got it working with a full character, but will have to try it out on EMotionFX on monday at work. I need to add the pasting of the tpose automatically also.]]></description>
			<content:encoded><![CDATA[<p>Uploaded a tentative version to <a href="https://github.com/eksod/additiveAnimation">github</a>. I got it working with a full character, but will have to try it out on EMotionFX on monday at work.</p>
<p>I need to add the pasting of the tpose automatically also.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eksod.com/2011/01/additiveanimation-for-motionbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

