Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
2
Question by JMasterBoi · Jul 24, 2020 at 11:12 PM · shadersblender-exportingexporting

How To Export Blender Mesh w/ Shaders to Unity

I am a beginner following CG Geek's How to Create a Low Poly Tree in 1 Minute and I want to export this tree, shaders and all, to Unity so I can add it to my game. How would someone go about exporting a (Cycles Rendered) mesh To Unity? Thank You In advance!

I know It takes a few steps to do this, so since I'm a beginner (and i have no idea what I'm supposed to do) , could you be so kind as to include a step-by-step guide kind of like a for dummies book. THANKS

(BTW, I know there are a lot of people that already asked this but I tried them and they don't work. Also (I think), my circumstance is kind of specific)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by tuinal · Jul 25, 2020 at 12:47 AM

The mesh is easy. Export as FBX. Click 'FBX ALL' with scale, and 'Experimental: Apply Transform' unless you have a lot of nested objects. If this FBX is in your assets folder you can just drop it into the scene.

Materials/shaders are a bit more complicated. You can't strictly speaking export a Blender shader to Unity. You can export material properties, though.

It's probably worth explaining what these things are (admittedly in a quick, slightly abstract way!).

The shader is the code sent to the GPU that says how to position the vertices and render the pixels of it's triangles. Cycles & Unity both provide visual editors that let you tweak inputs and compile the tweaking into the shader, but the heavy lifting is still done by an engine-specific 'master' node (e.g. Principled BSDF in Blender or Standard/Lit in Unity). These 'plug-in' to the pipeline and are not interchangeable between editors.

A material is data, that defines which shader to use, and the inputs (textures, floats etc.) for this shader. You can thus have a lot of materials using the same shader, but inputting different textures. Advanced shaders typically take multiple maps; a basecolor for what color something is, then normal, and metallic and smoothness maps that describe how light interacts with it. This is what lets textures give the illusion of height, wetness, etc. in modern games. If you just want the top of the tree to be green, you just need a base map. If you want it to look like photorealistic leaves, you need to worry more about these additional maps.

A Renderer (meshrenderer etc.) in unity needs a material, which in turn points to a shader compatible with the Unity pipeline. You can't stick Blender's principled BSDF into Unity. But you can use the fact both basically do the same thing, by giving them the same inputs.

The easiest way to do this is: 1) Identify the textures (at a minimum base color, more advanced metallic/smoothness, normal map etc. you're using them in Cycles they'll be input nodes. Export them to /assets as png. 2) Create a new Unity material. Assign these same textures to the material. 3) Drag & drop the material onto the object in Scene view. If you're lucky it will be fine. If not, you will need to edit the textures to conform to the expected material inputs. The common problem is inverted values, e.g. blender might think a black pixel in a metallic/smoothness is maximum smoothness whilst Unity thinks a red pixel is (this is example not fact!). I recommend using texturing software (e.g. Substance) if you're serious about texturing, since it deals with a lot of this for you.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JMasterBoi · Jul 25, 2020 at 01:21 AM 0
Share

Thank you so much man! I really appreciate you taking the time to write all this (:

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

144 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Animations not showing up in the animation tab when exporting a model but showing up in the asset menu 0 Answers

How do you correctly export from blender so i can apply a custom Shader Graph Material to it? 0 Answers

Exporting models/color problem 1 Answer

Exporting files from blender to unity 2 Answers

Model Messed up(the Arms Partculary) when Imported to Unity 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges