Creating an animation rig in Blender: Difference between revisions

Moved "Rotation order issue between Oni and Blender" and "Textures on animated models" subheaders to Blender while linking them
(Moved "Rotation order issue between Oni and Blender" and "Textures on animated models" subheaders to Blender while linking them)
Line 42: Line 42:


===Tools and relevant tutorials===
===Tools and relevant tutorials===
===Rotation order issue between Oni and Blender===
[[Image:Cmder.png|200px|right|thumb|Screenshot showing Cmder's capabilities within the context of modding Oni]]
The previous XSI process allowed us to get to work pretty quickly: you could simply export any animation from Oni as a COLLADA file using OniSplit, then import it to XSI and it would work (mostly) without any quirks. That is not the case with Blender.
* [http://mods.oni2.net/node/38 '''Current version of OniSplit.'''] This is the tool needed to import and export assets out of Oni. '''DO NOT USE OniSplit GUI or Vago for importing Oni assets into Blender''' - neither of these weren't updated in a long time, and thus they don't support OniSplit's v0.9.99.2 -blender option. You can still use them for other purposes though, such sounds and converting .oni files to XMLs, etc.
* [https://cmder.net/ '''Cmder'''] (Windows only) - because OniSplit is a command line tool, it is highly recommended to get any upgrade to Windows' Command Prompt. As shown in the screenshot on the right, Cmder allows you to start it from the context menu in any selected folder, and it also remembers your most recently used commands, vastly improving your workflow when you're forced to use any command line tools.
* [https://docs.google.com/document/d/175uJGklYASAgrFjxuUG4-kJRDoMTjjP7GvNxSj1GscU/edit '''Oni-Blender tutorial'''] by EdT. Please read this in entirety to know likely-to-happen issues and refer to this as your guide for OniSplit commands relating to Blender.
* [http://oni.bungie.org/forum/viewtopic.php?pid=23230#p23230 '''Brief overview on creating TRAMs'''] by EdT - while this was written with XSI in mind, this is still relevant as the process for preparing the XML files for Oni is still the same. Also the next post in that thread, called '''Brief walk through on modifying a TRAM,''' is an example of that overview put into practice.


If you import any Oni animation into Blender as it is, the rotations will be all wrong.


That's because Oni's rotations are stored in XYZ Euler rotation order, while Blender's XYZ is actually ZYX despite being called "XYZ".


You can prove that by simply switching the rotation order of the body parts from XYZ to ZYX, as shown below – the image on the left shows KONCOMcomb_p imported to Blender without any adjustments, with the rotation order set to Blender's default "XYZ", while the image on the right shows the same animation after switching the rotation order to ZYX.
{| class="wikitable"
|-
! KONCOMcomb_p in Blender's XYZ !! KONCOMcomb_p in ZYX
|-
| [[Image:ARB KONCOMcomb p XYZ.png|500px|frameless]]
| [[Image:ARB KONCOMcomb p ZYX.png|500px|frameless]]
|}
Because of this, geyser implemented the '''-blender''' argument in OniSplit, which solves this problem by converting Oni assets' rotation order from XYZ to Quaternions and then to ZYX, and vice versa when exporting assets from Blender to Oni. So that conversion flow looks as follows:
*From Oni to Blender:
XYZ → Quaternions → ZYX
*From Blender to Oni:
ZYX → Quaternions → XYZ
To summarize: '''Always use the -blender argument when you're exporting assets from Oni to Blender''', otherwise you can expect the problem shown in the above screenshots.


===Rotation order issue between Oni and Blender===
[[Blender#Rotation_order_issue_between_Oni_and_Blender|Please refer to THIS.]]


===Textures on animated models===
===Textures on animated models===
'''Currently there is no option in OniSplit that would allow exporting animated models with textures.''' While you don't need textures for animating, they are very useful, particularly in case of Oni - the models are low detail to a point where you can lose sense of which direction elbows and knees are facing, if you don't have the textures on.
[[Blender#Broken_alpha_transparency_and_textures_on_animated_models|Please refer to THIS.]]
 
Because there is no option to export animated models with textures, '''the current workaround for that is to import an unanimated model with textures, then import an animated model,''' and either copy materials from the unanimated model to the animated one (the faster method), or set the materials on the animated model manually.
 
You will also most likely need to set shading settings on some body parts on the unanimated model to fix Alpha transparency issues (much like in XSI) - specifically connect the Alpha parameter of Base Color node to any parameter in Principled BSDF that will work, like Emission Strength (this should be set up differently as that's technically incorrect, but I don't know how at this moment).


{| class="wikitable"
|-
! Konoko upon importing to Blender !! Fixed transparency !! Copying materials !! Setting materials in Shading
|-
| [[Image:ABR Konoko broken alpha.png|200px|frameless|center]] || [[Image:ABR_Konoko_fixed_alpha.png|200px|frameless|center]] || [[Image:ABR_Copying_materials.png|200px|frameless|center]] || [[Image:ABR Konoko fixed alpha.png|200px|frameless|center]]
|-
|}


[[Category:Modding tutorials]]
[[Category:Modding tutorials]]
191

edits