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 liszto · Nov 02, 2012 at 08:12 AM · androidshadertexturemesh

texture/mesh/shader problem on Android

Hi everybody, I got a really strange drawing problem on my android devices. You can see the problem on this video link : http://youtu.be/sb20BbitsOI

As you can see there is some clipping on my screen on Android device, here it's in the editor for Android build but I've got the same problem on my devices. My project is already done for ios & PC/MAC and I never encountered this problem on others OS :/. Someone got an explanation ?

I try to compressed my texture in those mod : DXT1 RBG / DXT5 RGBA / Automatic compressed / RGBA32 and the problem is still here. Maybe it's my shader but it's a mobile/Diffuse so I don't think this can be the problem é_è.

And I don't know why the mesh can create this problem ?

If someone got an idea or want more informations to answer me I'm still here ;)

Thanks in advance for your help

Comment
Add comment · Show 3
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 liszto · Nov 02, 2012 at 09:15 AM 0
Share

No the clipping part I circled them with the mouse. What do you mean by creamy-white part ? This clipping is really annoying cause we can see it everywhere on mesh junction :/

avatar image liszto · Nov 02, 2012 at 09:39 AM 0
Share

On mesh junction you can see some blink. I think it's a Z-Depth problem when 2 meshs got their points really close one from another. But I really don't know why é_è. Here an other example of what I say : http://uppix.net/e/6/2/1ba9f1ed0089172dac3500bdb65f8.png

avatar image liszto · Nov 02, 2012 at 09:45 AM 0
Share

I just can't :).

  • First of all I'm not graphist ;D.

  • Second : Some parts of races are procedurally generated so I can say match exactly at this point or this point.

  • Third : I've no problem on others OS / Device. This only happen on Android and I've really no idea of why :x

$$anonymous$$aybe I can try to create a new shader like $$anonymous$$obile/Diffuse but with forcing Z-Depth testing to anoter.

3 Replies

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

Answer by SarperS · Nov 02, 2012 at 09:52 AM

Try increasing the near clipping plane value of your main camera. Below is from the Unity manual;

If you are experiencing depth artifacts (surfaces close to each other flickering), try setting Near Plane to as large as possible.

Comment
Add comment · Show 7 · 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 liszto · Nov 02, 2012 at 10:42 AM 0
Share

I try too enlarge the near plane but seems change nothing. I currently revert all my texture too initial settings -_-.

Then I gonna retry with primary settings and check. If it's correct nothing, I gonna try with this tutorial : http://www.burgzergarcade.com/tutorials/game-engines/unity3d/unity-ios-shaderlab-tutorial-10-2-offset $$anonymous$$aybe this can help me to find where is this naty problem :)

avatar image liszto · Nov 02, 2012 at 11:17 AM 0
Share

I gonna try now. The revert is over and the problem seems still here. I check with the far plan closer but the editor want it like this so I don't this can be a viable solution but I gonna try.

Edit : I define my near plane to 0.1 and far plane to 500 and this doesn't work either :/

avatar image liszto · Nov 02, 2012 at 01:19 PM 0
Share

I try with the shader and the offset but it's a viable solution as I expected :/ cause when you have 2 meshs with Shader offset parameter the conflict is still here :/.

I can't redo the meshs, trilinear texture change nothing, Texture parameters change nothing, Camera no either, ... really weird case but actually no solution from my side

avatar image liszto · Nov 02, 2012 at 01:58 PM 0
Share

I take a new screenshot, if someone can explain me how to correct this. I can give you more screenshot and explanation on what I've done or how my elements are configured if needed.

http://uppix.net/e/e/5/dff0982336fbe831982bf09604552.png

avatar image liszto · Nov 05, 2012 at 10:49 AM 0
Share

So, to close this topic I can say thanks to Sarper Soher cause scale the Znear of the camera to 1 cause it was to 0.01 solve my problem !

Thanks again :)

Show more comments
avatar image
1

Answer by Michael CMS · Nov 02, 2012 at 09:57 AM

Hello,

If you are refering to the flickering it looks like z Fighting. Since you said you tried using DXT I take it you are using a Tegra android device ?

The tegra devices have a limit of a 16 bit depth buffer so you cannot solve this by increasing the depth buffer size.

What you can do :

  • alter the geometry a bit so vertices are a bit farther away from each other

  • bring closer the far plane

Another test I encourage you to do is to see if the flicker appears on a Galaxy S (it has PVR GPU , similar to iPhone). If the flicker doesn't show on Galaxy S , then it's the Z Fighting problem I've described above.

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 Fattie · Nov 02, 2012 at 09:58 AM 0
Share

That is very knowledgeable.

avatar image liszto · Nov 02, 2012 at 10:08 AM 0
Share

I gonna revert all my textures to begin I probably too much alterate them.

Yes I test this on Android Tegra device. And using DXT texture was to optimize them for this sort of device. The game probably doesn't work on a Galaxy S device cause too much memory using :/. I know it's not really nice but when I picked up the project this was already like that é_è.

So I just test on Galaxy S2 and sup, at the office I just got this : Galaxy Tab 10.1, HTC One S, Nexus S & Galaxy S.

avatar image
0

Answer by SarperS · Nov 02, 2012 at 03:40 PM

In the Build Settings Inspector, under the resolution and presentation tab, make sure the "Use 24 bit depth" is checked. Most Android devices use 16 bit depth buffer by default. This way Unity will try to force a 24 bit depth buffer.

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 liszto · Nov 02, 2012 at 04:02 PM 0
Share

I already try this and this is not resolve my problem :/ $$anonymous$$aybe I must do an answer or a comment with all the possibilities I already try ?

This maybe can help you to find my issue ^^

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

13 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

Related Questions

Mesh get transparent in android device 0 Answers

How to texture an irregular (hexagon) shape (mesh) ? 1 Answer

Terrain Texture Problem 0 Answers

How do you dynamically tile sub-portions of a plane? 1 Answer

MODEL TURNS BLACK AFTER APPLYING TEXTURE PLS HELP 3 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