• 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
4
Question by AnOrdinarySandwich · Apr 20, 2017 at 07:34 AM · unity 5texturematerialimportblender

Blender 2.78 Unity 5.5 the correct way to retain material/textures on import?

2017/04/20

[edit for clarification] I am not trying to import blend files into unity. As per my list of steps I'm taking, my last step was to export FBX. This is what I am using, not the blender file itself :) [/end edit]

I've done searching for this in google and here for a while now and everyone seems to say the same things, that the texture has to be saved separately in blender and placed into the material manually in unity. As well, most posts I find are for older version of unity or blender.

Now, I know I can import a model made in Blender with textures/materials intact w/o having to save a separate image. How do I know? I've done it twice, somehow. I don't know exactly what I've done that made it work. But, generally, I can't reproduce this, and it's frustrating. I'm looking for help from someone using the current version of blender (2.78) and unity (5.5 in my case), that also knows the correct steps to make this happen.

Here's what I'm doing :

  1. Make model in blender.

  2. Add new Material to the object (w/ object selected, in Properties->material - assuming one hasn't already been assigned)

  3. Add new Texture to the object (Properties->texture, click on empty slot, click new, then under image mapping->coordinates: UV)

  4. In edit mode, mark appropriate edges as seams

  5. In UV/image edit pane, make new texture

  6. Select all of model, then UVUnwrap

  7. In UV/image edit pane, go to paint mode and paint texture

  8. Under UVs, pack as PNG.

  9. Back in properties->textures, under the Image section, I click the browse image to be linked, and select my newly painted texture.

  10. Export to FBX.

After import in unity, no texture :( I really don't know what I did those two times I got it to work. I've been trying for about a month to get this to work again, where I can reproduce it, and no go.

Comment
Add comment · Show 4
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 Kamil1064 · Apr 20, 2017 at 06:00 PM 0
Share

Hi @AnOrdinarySandwitch, packing textures is saving texture to blend file, not to exported file.

avatar image AnOrdinarySandwich Kamil1064 · Apr 21, 2017 at 12:46 AM 0
Share

Hi $$anonymous$$amil! Thanks for the comment :) I know that packing saves the image in the blend file, what I'm looking for is retaining it in the exported fbx.

I see lots and lots of older posts that say oh you can't there's no way but I beg to differ as I have somehow managed to do it twice! :) And if it can't be done at all as those posts suggest, then $$anonymous$$aya couldn't do it either. As well, in Unity, I can preview fbx imports that show their textures, while others don't.

avatar image AnOrdinarySandwich Kamil1064 · Apr 21, 2017 at 12:50 AM 0
Share

Oh, and there's no 't' in my name :)

avatar image Kamil1064 AnOrdinarySandwich · Apr 21, 2017 at 06:53 PM 2
Share

Sorry for T :D From my experience I can say you just saved image in your asset folder when it was working.

7 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by AnOrdinarySandwich · Apr 21, 2017 at 11:12 AM

I've been thinking, trying to remember everything I did and tried when I got it to work with an FBX. I don't recall saving out the image file, but I can't say definitely I didn't either.

I hate to admit defeat when I've been so sure it was possible! lol But at least not having to manually assign textures to albedo's for every model import is a step in the right direction.

Thanks, Zilppuri, I'll contemplate this and see if I can't find my old project files for comparison.

Comment
Add comment · 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
-1

Answer by Zilppuri · Apr 21, 2017 at 10:25 AM

You can't embed image data in .blend file and import it to Unity.

You can have a Texture/Material name in a .blend file that corresponds to a image file in a subfolder. Unity will automatically create a material with the Texture/Material name in the .blend and create .mat files to match. If a corresponding image file is found, it will also auto assign that.

So: 1. Unity searches for a .mat file with matching name as .blend files texture/material 2. If no .mat file is found, it creates one. If image matching the material/texture is found, it is used when creating this material

So if you simply match your texture/material names and have the image files in correct folders (or adjust the import settings), then the textures will be retained.

What you might have done, is exported an fbx file, where the correct images have been exported to filename.fbm folder, where Unity could have looked them up when creating the necessary material files.

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 AnOrdinarySandwich · Apr 22, 2017 at 02:40 PM 1
Share

@Zilppuri & @$$anonymous$$amil1064,

Through my current research, I came across a post about this topic from around 2011 (sorry, I can't find that post anymore) where someone much later casually commented (in 2014) that FBX added embedded media support into the file itself. To support this, according to this older version of blender's fbx export documentation, the fbx format does indeed store texture data in it, as well as material<->texture connection. Additionally, from the video link I posted in a comment above, $$anonymous$$aya can do this as well. And, user $$anonymous$$ in this blender stack exchange post answers a slightly different question by saying the fbx exporter packs textures used by the model, indicating that yes FBX files exported from blender can include not just materials, but textures as well. And one more bit of evidence that FBX can include textures that get imported in another program/engine, this older post from 2014 about FBX importing into Unreal Development $$anonymous$$it (Unreal 3 Engine), $$anonymous$$itchell Stokes says "Just confir$$anonymous$$g that the Embed Texture option works with packed textures []" (in regards to exported FBX from blender into UD$$anonymous$$ with textures intact).

So, where lies the issue? Has blender's modern version of export FBX broken the embed media? Does Unity just not understand the embedded media? Is it embedding the wrong format of texture? I still say it should work, based on all this!

  • ‹
  • 1
  • 2

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

160 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 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

Material not shown on imported FBX sphere 0 Answers

Importing Blender FBX into Unity (pictures) 1 Answer

texture not applied, despite many attempts 2 Answers

Texturing blender models in Unity 2 Answers

Blender to unity texture 1 Answer


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