{"id":172,"date":"2015-09-09T12:29:19","date_gmt":"2015-09-09T19:29:19","guid":{"rendered":"http:\/\/outofmymindgames.com\/blog\/?p=172"},"modified":"2021-12-14T17:49:16","modified_gmt":"2021-12-15T01:49:16","slug":"unity-and-blender-files","status":"publish","type":"post","link":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/","title":{"rendered":"Unity And Blender Files"},"content":{"rendered":"<h1>Importing Blender Into Unity<\/h1>\n<p>Since I&#8217;m using <a href=\"http:\/\/www.blender.org\/\" target=\"_blank\" rel=\"noopener\">Blender<\/a> and <a href=\"https:\/\/unity3d.com\/\" target=\"_blank\" rel=\"noopener\">Unity<\/a> for my current projects, I&#8217;ve had to figure out a common problem with this integration.<\/p>\n<h2>Right-handed&#8230; left-handed&#8230;&nbsp;up is forward&#8230; forward is up&#8230; dogs and cats living together.<\/h2>\n<p>There are a bunch of posts about importing models from Blender into Unity, and how they always come in rotated incorrectly. Blender is right-handed with (right, forward, up) orientation, while Unity is left-handed with the&nbsp;(right, up, forward) orientation. The primary axes seem to be forward and up, since the objects rotate around the axis that bisects those two.<\/p>\n<p>Basically, you want your Blender model to face forward along the z-axis and up along the y-axis. This causes your model to appear to be pointing up in the Blender workspace, which is not really how you want to work on things. Blender has the ability to distinguish between applied rotation and displayed rotation, which I use to fix this apparent problem.<\/p>\n<p>After researching and experimenting, I&#8217;ve decided to use the following method.&nbsp;However, I have not attempted to animate any of my objects yet, so that may not work properly. If animations, or any other feature, breaks this method in the future, I will update this post to reflect the fix.<\/p>\n<h2>Blender Workflow<\/h2>\n<ul>\n<li>In Blender, create your model upright using (right, forward, up) orientation.<\/li>\n<li>Rotate the model (-90, 180, 0) using XYZ Euler rotation.<\/li>\n<li>Apply the rotation.<\/li>\n<li>Rotate the model (-90, 180, 0) using XYZ Euler rotation.<\/li>\n<\/ul>\n<p>This will apply the corrective rotation, which fixes the rotation in Unity. Then it uses the second rotation to make the object appear correctly aligned in Blender. It just so happens that the complementary rotations are equal, since it&#8217;s effectively rotating the object 180 degrees around the (0,0.7071,0.7071) axis.<\/p>\n<p>You could also rotate the model using (0, 0, 0.7071, 0.7071) in quaternions, or (0, 0.7071, 0.7071, 180) in axis-angle notation. It&#8217;s up to you. Generally these are safer, since they don&#8217;t suffer from potential gimble-lock, but this rotation works fine in Euler angles.<\/p>\n<p>I&#8217;ve found that as I join objects together, they remain properly rotated. I haven&#8217;t tried anything too complicated though, like multiple objects or joining to a non-rotated object. I&#8217;ll test those situations out soon and update this post with any findings.<\/p>\n<a class=\"synved-social-button synved-social-button-follow synved-social-size-16 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Follow us on Facebook\" href=\"https:\/\/www.facebook.com\/OutOfMyMindGames\" style=\"font-size: 0px;width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Follow us on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-follow\" width=\"16\" height=\"16\" style=\"display: inline;width:16px;height:16px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/outofmymindgames.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-follow synved-social-size-16 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Follow us on Twitter\" href=\"https:\/\/twitter.com\/OutOfMyMindDave\" style=\"font-size: 0px;width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Follow us on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-follow\" width=\"16\" height=\"16\" style=\"display: inline;width:16px;height:16px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/outofmymindgames.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-follow synved-social-size-16 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Find us on Linkedin\" href=\"https:\/\/www.linkedin.com\/company\/out-of-my-mind-games\" style=\"font-size: 0px;width:16px;height:16px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Find us on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-follow\" width=\"16\" height=\"16\" style=\"display: inline;width:16px;height:16px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"http:\/\/outofmymindgames.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/linkedin.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>Importing Blender Into Unity Since I&#8217;m using Blender and Unity for my current projects, I&#8217;ve had to figure out a common problem with this integration. Right-handed&#8230; left-handed&#8230;&nbsp;up is forward&#8230; forward is up&#8230; dogs and cats living together. There are a bunch of posts about importing models from Blender into Unity, and how they always come &hellip; <a href=\"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Unity And Blender Files<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[11,10],"class_list":["post-172","post","type-post","status-publish","format-standard","hentry","category-development","tag-blender","tag-unity"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Unity And Blender Files - Out Of My Mind Blog<\/title>\n<meta name=\"description\" content=\"Importing Blender files into Unity comes with unwanted rotation. Here&#039;s a method to make the models appear correctly in both tools.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unity And Blender Files - Out Of My Mind Blog\" \/>\n<meta property=\"og:description\" content=\"Importing Blender files into Unity comes with unwanted rotation. Here&#039;s a method to make the models appear correctly in both tools.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/\" \/>\n<meta property=\"og:site_name\" content=\"Out Of My Mind Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-09T19:29:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-15T01:49:16+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dave\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/\"},\"author\":{\"name\":\"dave\",\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/#\\\/schema\\\/person\\\/77aa27070f7702b731c0f3ecbe8905d5\"},\"headline\":\"Unity And Blender Files\",\"datePublished\":\"2015-09-09T19:29:19+00:00\",\"dateModified\":\"2021-12-15T01:49:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/\"},\"wordCount\":381,\"keywords\":[\"Blender\",\"Unity\"],\"articleSection\":[\"Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/\",\"url\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/\",\"name\":\"Unity And Blender Files - Out Of My Mind Blog\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/#website\"},\"datePublished\":\"2015-09-09T19:29:19+00:00\",\"dateModified\":\"2021-12-15T01:49:16+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/#\\\/schema\\\/person\\\/77aa27070f7702b731c0f3ecbe8905d5\"},\"description\":\"Importing Blender files into Unity comes with unwanted rotation. Here's a method to make the models appear correctly in both tools.\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/2015\\\/09\\\/09\\\/unity-and-blender-files\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unity And Blender Files\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/#website\",\"url\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/\",\"name\":\"Out Of My Mind Blog\",\"description\":\"Things from Out Of My Mind\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/#\\\/schema\\\/person\\\/77aa27070f7702b731c0f3ecbe8905d5\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/883d5058977cd4896a172c4a3c14b8d8ad6620ffb8666d4b0c2a967888c17911?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/883d5058977cd4896a172c4a3c14b8d8ad6620ffb8666d4b0c2a967888c17911?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/883d5058977cd4896a172c4a3c14b8d8ad6620ffb8666d4b0c2a967888c17911?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"url\":\"http:\\\/\\\/outofmymindgames.com\\\/blog\\\/author\\\/dave\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unity And Blender Files - Out Of My Mind Blog","description":"Importing Blender files into Unity comes with unwanted rotation. Here's a method to make the models appear correctly in both tools.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/","og_locale":"en_US","og_type":"article","og_title":"Unity And Blender Files - Out Of My Mind Blog","og_description":"Importing Blender files into Unity comes with unwanted rotation. Here's a method to make the models appear correctly in both tools.","og_url":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/","og_site_name":"Out Of My Mind Blog","article_published_time":"2015-09-09T19:29:19+00:00","article_modified_time":"2021-12-15T01:49:16+00:00","author":"dave","twitter_card":"summary_large_image","twitter_misc":{"Written by":"dave","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/#article","isPartOf":{"@id":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/"},"author":{"name":"dave","@id":"http:\/\/outofmymindgames.com\/blog\/#\/schema\/person\/77aa27070f7702b731c0f3ecbe8905d5"},"headline":"Unity And Blender Files","datePublished":"2015-09-09T19:29:19+00:00","dateModified":"2021-12-15T01:49:16+00:00","mainEntityOfPage":{"@id":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/"},"wordCount":381,"keywords":["Blender","Unity"],"articleSection":["Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/","url":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/","name":"Unity And Blender Files - Out Of My Mind Blog","isPartOf":{"@id":"http:\/\/outofmymindgames.com\/blog\/#website"},"datePublished":"2015-09-09T19:29:19+00:00","dateModified":"2021-12-15T01:49:16+00:00","author":{"@id":"http:\/\/outofmymindgames.com\/blog\/#\/schema\/person\/77aa27070f7702b731c0f3ecbe8905d5"},"description":"Importing Blender files into Unity comes with unwanted rotation. Here's a method to make the models appear correctly in both tools.","breadcrumb":{"@id":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/outofmymindgames.com\/blog\/2015\/09\/09\/unity-and-blender-files\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/outofmymindgames.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Unity And Blender Files"}]},{"@type":"WebSite","@id":"http:\/\/outofmymindgames.com\/blog\/#website","url":"http:\/\/outofmymindgames.com\/blog\/","name":"Out Of My Mind Blog","description":"Things from Out Of My Mind","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/outofmymindgames.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/outofmymindgames.com\/blog\/#\/schema\/person\/77aa27070f7702b731c0f3ecbe8905d5","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/883d5058977cd4896a172c4a3c14b8d8ad6620ffb8666d4b0c2a967888c17911?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/883d5058977cd4896a172c4a3c14b8d8ad6620ffb8666d4b0c2a967888c17911?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/883d5058977cd4896a172c4a3c14b8d8ad6620ffb8666d4b0c2a967888c17911?s=96&d=mm&r=g","caption":"dave"},"url":"http:\/\/outofmymindgames.com\/blog\/author\/dave\/"}]}},"_links":{"self":[{"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/posts\/172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/comments?post=172"}],"version-history":[{"count":6,"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/posts\/172\/revisions"}],"predecessor-version":[{"id":629,"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/posts\/172\/revisions\/629"}],"wp:attachment":[{"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/media?parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/categories?post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/outofmymindgames.com\/blog\/wp-json\/wp\/v2\/tags?post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}