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
1
Question by moonLite · Sep 23, 2012 at 02:57 PM · texturerender

Texture Render Error - black color only

Hi Guys,

I created a png with a cross (tic tac toe). And I imported it and created a material attached with it.

But the texture shown in unity 3d is all black which results when I dragged material to the cube, it's also rendering all black.

alt text

This png file has alpha channel, the background is transparent (edited, earlier it said doesn't have any alpha channel)

What should I do to correct it?

Thanks in advance.

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 Lockstep · Sep 23, 2012 at 03:32 PM 0
Share

What kind of shader do you use? The builtin diffuse shader should work for textures.

How are your import settings for the png? $$anonymous$$ake sure texture type is set to texture.

If it is not the default cube make sure the UV map is set correctly.

The preview is (from my experience) not always to be trusted but it might be worth the efford to check if the png got saved correctly into your assets folder . Doubleclick the png in the inspector to open it with an external program to check.

avatar image moonLite · Sep 23, 2012 at 05:29 PM 0
Share

@Lockstep,

I use the diffuse, shader for my material. And my texture type is Texture. I did check with external program see if I did anything wrong before that. I thought I didn't save properly, so i cropped and make sure it's 256 pixel by 256 pixel. I'm using default cube.

How do I check the UV $$anonymous$$apping in unity?

It has to due with the alpha channel.

It seems that when I click the button under preview section, beside the $$anonymous$$IP setting, when it's in A rect mode, ( I believe it is alpha mode, please correct me if i'm wrong)

the cross become white, and the background black.

I fix it by selecting the shader to transparent/diffuse, and it works fine.

I always believe diffuse will auto include transparent alpha property for us. but I guess i'm wrong. :)

Thanks @Lockstep!

btw, I still want to ask you, how do I check UV mapping in unity? I only know how to check it in maya etc.

P.S. I will post a new answer below (short ver) for others.

avatar image Lockstep · Sep 23, 2012 at 09:00 PM 0
Share

I believe that you would need an additional plugin for the unity editor to show uv maps. Ther has already been a question concerning this: http://answers.unity3d.com/questions/17252/any-way-to-change-uv-mapping.html.

One more thing: Could you accept your own answer as solution? Just to keep things sorted.

avatar image moonLite · Sep 23, 2012 at 09:22 PM 0
Share

Thanks, yes I can select my own answer as solution. Should I?

4 Replies

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

Answer by moonLite · Sep 23, 2012 at 05:32 PM

The above picture has alpha channel. and the background is supposed to be transparent.

Hence, by using Transparent/diffuse to the material's shader, it will do the job. Don't use diffuse, it doesn't apply the alpha property to material.

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
0

Answer by alandgfr · Jul 07, 2017 at 11:25 AM

https://www.youtube.com/watch?v=rn4mmIchgvA find answer here

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
0

Answer by swredcam · Jul 01, 2020 at 06:36 PM

I had a similar problem -- black image texture when using lighting in the Scene window or when running game. My issue turned out to be a lack of lighting UVs for objects I had created myself in Blender. The fix was easy -- on the model import in the Inspector, click the Model tab and click "Generate Lightmap UV". Then hit "apply" at the bottom of the Inspector window. I then had to replace my model in the scene -- basically copy the coordinates of the old one, delete the old one, add a new one from my Project window, and then paste in the coordinates from the old one. No more black image.

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
0

Answer by ShajithaMhd · Jan 05, 2021 at 08:23 AM

I got rid of a similar issue by adding the directional light to the current scene. Right click -> Light -> Directional Light, and transform it accordingly. Now the object showed up with the material applied.

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

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

14 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

Related Questions

Texture render performance - one 1024px, vs two 512px - for modular models? 1 Answer

Render Texture in Scene 1 Answer

Something about Render Texture Transparent.. 2 Answers

Render Texture in Render Texture not Rendering? 0 Answers

How to render a filled circle in a shader given a vertex and radius 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