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 maynull · Nov 30, 2011 at 12:45 PM · androidiostexturescompression

iOs weird textures (good on android) the reason? How to fix ?

So, I'm having trouble with textures on iOs platform builds. There is no problem on Android platform or PC platform. Here's the problematic scene and normal one on android platform settings. I'm using Unlit/Transparent shader for textures and I'll show you the textures I'm using for body parts. Basically I have body parts as planes with different z-offsets.

According to my search problem might be appearing because of Texture Compression on build settings. Android texture compression settings is -> Generic and I know iOs one is native PVRT but not sure how to fix it or if it's the problem is

This is the Problematic One:

alt text

This is normal one ( one that appears on android and PC)

alt text

And these are the example textures of one type

alt textalt textalt text

Thank you..

Comment
Add comment · Show 1
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 maynull · Nov 30, 2011 at 12:52 PM 0
Share

One quick update . If I change texture type to Advanced it looks like normal.. Is it good approach to solve that problem ?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DoktorAce · Nov 30, 2011 at 03:22 PM

By switching to advanced you'll have the possibility to turn of mip maps, which could be a good idea for a 2D game. But I would say that the iOS Compression (PVRTC) generally does a poor job on the alpha channel.

On most of the iOS projects I've worked on we've solved this by putting images alpha in another texture. This will allow hard and good compression on the color channel while leaving the alpha channel uncompressed (8bit). Its very simple to do in unity. Just duplicate a texture and call give it a suffix like alpha, and then just compress it as 8bit.

Here is a shader example that takes color and alpha as separate textures.

  Shader "Custom/MobileAlphaBlendedSeperateAlpha" {
 Properties {
     _MainTex ("Color Texture", 2D) = "white" {}
     _AlphaTex ("Alpha Texture", 2D) = "white" {}
 }
 
 Category {
     Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
     Blend SrcAlpha OneMinusSrcAlpha
     Cull Off Lighting Off ZWrite Off ZTest Always
     
     BindChannels {
         Bind "Color", color
         Bind "Vertex", vertex
         Bind "TexCoord", texcoord
     }
     
     SubShader {
         Pass {
             SetTexture [_MainTex] {
                 combine texture * primary
             }
 
             SetTexture [_AlphaTex] {
                 combine previous, texture
             }
         }
     }
 }
 }

In some cases we've even reduce the color textures size from say 512 to 256, but keeping the alpha at 512, to save even more space. It usually looks good enough.

Here is another useful example where you can set a blending value which allows you to fade your graphics in and out.

 Shader "Custom/MobileAlphaBlendedSeperateAlpha BLEND" {
 Properties {
     _MainTex ("Color Texture", 2D) = "white" {}
     _AlphaTex ("Alpha Texture", 2D) = "white" {}
     _Blend ("Blend Ammount", Range (.01, 0.99)) = .99
 }
 
 Category {
     Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" }
     Blend SrcAlpha OneMinusSrcAlpha
     Cull Off Lighting Off ZWrite Off ZTest Always
     
     BindChannels {
         Bind "Color", color
         Bind "Vertex", vertex
         Bind "TexCoord", texcoord
     }
     
     SubShader {
         Pass {
                     
             SetTexture [_AlphaTex] {
                 ConstantColor(1,1,1,[_Blend])
                 combine texture * constant
             }
 
             SetTexture [_MainTex] {
                 combine texture, previous
             }
             
 
         }
     }
 }
 }

Ps. Those are some cute looking characters! :D

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 DoktorAce · Nov 30, 2011 at 03:26 PM 0
Share

Oh, and those lines on the top end right of the characters could be caused by the texture Wrap $$anonymous$$ode being set to "Repeat", try setting it to "Clamp". It should fix that problem. But I think its a result of lower mip map levels being used, so disabling mip maps would probably fix it to.

avatar image maynull · Dec 01, 2011 at 08:42 AM 0
Share

Ah thank you both answers are very helpful indeed

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Android tablet crashes depending on texture compression 0 Answers

Transferred game from Android to IOS. Why is the file size so much larger? 1 Answer

iOS vs Android build 6 Answers

Transfered from Android to IOS. Why is the game play jerky now? 2 Answers

Android: Preparing textures for 16-bit compression 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