• 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 smtabatabaie · Jul 13, 2014 at 11:55 PM · texturematerialwwwtilingloadimageintotexture

Image loaded with LoadImageIntoTexture gets inverted

I'm trying to use an image loaded with LoadImageIntoTexture as the texture of a simple plane. I have to set the tiling of my texture to (1,-1) for some other logic in my project. the problem is when I load the image using LoadImageIntoTexture the image gets distorted and doesn't show up correct with my tiling values. this problem doesn't happen when manually assign the same texture with inspector.
I'll appreciate if someone can help me with this , here's the code I use :

 WWW www = new WWW(url);
 texTmp = new Texture2D(500,333,TextureFormat.DXT5,false);
 www.LoadImageIntoTexture(texTmp);
 myPlane.renderer.material.mainTexture = texTmp;
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 Bunny83 · Jul 14, 2014 at 12:56 AM 0
Share

What does "distorted" mean and what's the textures format (jpg or png)? Btw you can't set a tiling of a texture, only of materials which might use your texture. It would help if you explained all those points more in detail. A screenshot would save hundreds of words. If you don't want to show your texture, can you reproduce your problem with a dummy texture of the same size / type?

avatar image smtabatabaie · Jul 14, 2014 at 06:04 AM 0
Share

@Bunny83 the tiling causes my loaded image with LoadImageIntoTexture to gets distorted but the same tiling won't cause any effect when I assign the same image from my assets on inspector

avatar image Bunny83 · Jul 14, 2014 at 08:16 PM 1
Share

@smtabatabaie: ... really, how are we supposed to help you when you don't provide any useful information. I asked what does distorted means. I don't want to know this one, we need to know what's actually wrong. If you visit a doctor and you just tell him: "I feel sick" he won't be able to help you.

$$anonymous$$e and thousands others have downloaded images at runtime and used them successfully. You might be doing something wrong, but we can't find out what that something is with the information you gave us.

I ask for a screenshot which shows the problem. You said you can produce a "good" result when you assign the texture from your assets. If would be great to have two screenshots, one correct and one that shows the problem.

If you can't improve your question i'm going to close it since we can't reproduce your problem.

avatar image smtabatabaie · Jul 16, 2014 at 08:41 PM 0
Share

I tried other image files for download function and it was ok , it seems the problem was my image, still don't know what was wrong with the image and I'm afraid if it happens some time in the future for other images. The thing I was suspected was that doing tiling and different shaders may not work on files downloaded from a url and files should be local to do shader processing on them , and this theory is now obviously incorrect. thank @Bunny83

0 Replies

· Add your reply
  • Sort: 

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

22 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

Related Questions

Repeat texture common question 2 Answers

Repeating a texture over an object 2 Answers

Material tiling unique to object 1 Answer

Glitch when using WWW.LoadImageIntoTexture(...) 2 Answers

Can't assign a texture from WWW to Image.material.maintexture 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