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
0
Question by bigOrangeJuice · Feb 17, 2013 at 06:44 PM · importblendermaterialstexturessketchup

Applying materials/textures on imported fbx, dae, etc

Thank you in advance for any help!

I've been learning how to use some 3d modeling tools like blender and sketchup so as to improve the complexity of objects in my game but have run into a problem that I can't seem to find a solution for here in the forum/answers or anywhere else.

Here's my problem:

  1. I create a cube in Blender.

  2. I export the cube as an fbx file (I've also tried all the other formats including dae)

  3. I import the fbx file into my unity project/scene

  4. I try to add a texture to one of the materials associated with the cube

  5. Nothing happens

If I change the "Main Color" of the material, the cube's color does change. But I can't seem to figure out why I can't see the added texture... I run into the same problem even when I create a new material & texture and apply it to the cube. Color works, but no texture is visible?

Am I just doing something wrong, or is there something that I'm missing/not understanding.

Any help would be much appreciated, thank you!

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

2 Replies

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

Answer by FatWednesday · Feb 17, 2013 at 07:03 PM

Not being a modeler, i have almost no experience with the tools themselves, but does blenders cube primitive come with UV coordinates already set? and are those coordinates being exported with the fbx?

That would be my first question when dealing with a non-displaying texture. Here is a small C# script that you can attach to any object with a mesh filter. Drop this script on it and run, you should get the uv coordinates for the object. At least one of the channels (preferably the 1st channel unless you're using a shader that will look in the other channels) should have your uv coordinates. If there are no coordinates being output, then the cube was either never mapped, or material coordinates aren't being exported with the fbx.

 public class UvConfirm : MonoBehaviour
 {
     void Awake () 
     {
         MeshFilter meshRend = GetComponent<MeshFilter>();
         if (meshRend != null)
         {
             LogUVs(meshRend.sharedMesh.uv, 0);
             LogUVs(meshRend.sharedMesh.uv1, 1);
             LogUVs(meshRend.sharedMesh.uv2, 2);
         }
     }
 
     private void LogUVs(Vector2[] uvs, int channel)
     {
         string output = "ArrayData: (";
         for (int i = 0; i < uvs.Length; i++)
         {
             output += uvs[i].ToString();
             if (i < uvs.Length - 1) output += ", ";
         }
         output += ")";
         Debug.Log("UV Channel " + channel.ToString() + ": " + output);
     }
 }
Comment
Add comment · Show 2 · 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 bigOrangeJuice · Feb 17, 2013 at 07:55 PM 0
Share

Hey thanks for the response. I added the script to one of the objects. This was the output:

UV Channel 0: ArrayData: ((0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0))

I'm assu$$anonymous$$g that this means, as you said "the cube was never mapped" - being very new to all of this, I'm unfamiliar with the "mapping" process, but I do now have a way of looking into a possible solution. Thank you!

avatar image FatWednesday · Feb 17, 2013 at 08:11 PM 0
Share

You're welcome, good luck with the 3D assets.

avatar image
0

Answer by bigOrangeJuice · Feb 17, 2013 at 08:22 PM

FatWednesday, thank you again.

The solution, after utilizing your script to reveal the lack of UV information, was to return to Sketchup and simply added a texture to my model. I then, the same as before, exported it and imported it to Unity.

Now, I am able to successfully add textures directly in unity!

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 Yassine28 · Mar 27, 2017 at 09:02 AM 0
Share

I have the same problem with an Alias imported object but I didn't get the solution. Any help please ?

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

11 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

Related Questions

Multiple UVs from Blender (Problem) 0 Answers

Unity not importing materials from blender. 0 Answers

materials and textures import from max. 1 Answer

What is the best way to export textures with objects? 2 Answers

textures importing dark 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