As shown in above screen shots. on some android devices textures are rendering as black. But when I try to capture screen from the device it saved it perfectly alright.
Can anyone please suggest me whats wrong ?
App URL https://play.google.com/store/apps/d...gerz.laststand
Working right on Unity Player, iOS, and some android devices
image
h**p://forum.unity3d.com/attachment.php?attachmentid=54374&d=1369302221
some android devices not rendering right
h**p://forum.unity3d.com/attachment.php?attachmentid=54373&d=1369302217
findings so far:
Terrain and skybox are rendering without texture (black) rest of the objects are fine properly on Nexus 4 and S3 minis
Fixed!!
Unity update 4.1.3
Fixes
*Android: Fixed rendering issues on Nexus4 + Android os 4.2.2 when "Use 32bits Display Buffer" is checked, due to Compositor using Default FBO alpha.
Disable the 32 bit buffer in edit/project settings/player build and check if the problem still exists
Disable the 24 bit buffer in edit/project settings/player build and check if the problem still exists
If you use directional light, go to the direction light inspector and select shadow type no shadow
I had this issue and it was happening because of sprite that i used from an atlas with the max size set to 4096, i reduced it to 2048 and now every thing works fine, i think its failure in GPU of some weak devices to handling that size.
Related
I'm developing a game in Unity 5.2.2f1 and I'm using the canvas and image masking elements then building an .apk for Android. On most Android devices this works fine, but on the Galaxy Note 5 and the Kindle Fire HD, the masking doesn't take.
What's also interesting is that it DOES work on Galaxy Note and Kindle Fire HD when I use the default provided asset that is part of the unity_builtin_extra resource, but not when I use a .gif or a .png for the image asset.
Mask Works on all Android devices:
Mask only works on some Android devices:
I've also tried updating various setting like setting the cameras to forward rendering and enabling 32-bit Display Buffer (as other posts have suggested), but nothing so far has worked.
Any leads or thoughts on this would be greatly appriciated!
In the past, I encounter similar problem with the UI Mask on Linux, there is a bug reported on it.
Since they haven't fixed it, I would not be surprise if some other devices have the same problem.
If the Mask purpose is for UI, then you could use the 2D Rect Mask instead which is way more efficient, but only made for UI and has some limitation.
As you can read in the doc :
The limitations of RectMask2D control are:
It only works in 2D space
It will not properly mask elements that are not coplanar
The advantages of RectMask2D are:
It does not use the stencil buffer
No extra draw calls
No material changes
Fast performance
Either way, I'd report your issue with a small test-bed project so they can test it out and eventually write a fix for it.
In the meantime, hopefully the 2DRectMask can be a workaround!
I've been playing around with Xcode and Unity for a while, and have made an app in Xcode which has a scrolling background. I want to basically re-create the app in Unity 2d, using the same set of images (if possible). I've imported all of the iPad sized images that I used in Xcode, but have noticed that the quality is a lot poorer when I build using Unity remote.
The image I'm most bothered about is the background, which is a repeating texture that scrolls across the screen. Do I have to mess around with the settings in Unity to get a better image quality? I'm using PNG. Surely the image can't be too small and therefore stretching because I'm using iPad sized images and running the app on Samsung Galaxy S6. Thanks in advance.
Unity Remote stream screenshots to your device, so the quality is not the final.
Maybe you can try to change the settings of UnityRemote.
See
http://docs.unity3d.com/es/current/Manual/UnityRemote4.html
More info/same question:
http://answers.unity3d.com/questions/408896/android-image-quality-is-poor-compared-to-the-qual.html
Find you image in Project tab and select it, then you should see something like this in inspector, experiment with values until you get results you are happy with.
I'm developing simple VR app for android using google cardboard SDK for unity. I'm using unity 5(free), and latest version cardboard package for unity(0.4.9), i am testing on sony xperia z3 compact(lolipop) and on samsung galaxy note 3(kitkat)
The issue i'm having is, that i can't turn on anti-aliasing, or rather google sdk package, seems to disable it. I dont mind a little jagged corners, but the thing is that those corners are flickering when they are far away enough. I tried moving textures apart(since the flickering could be result of overlapping), but issue still persists.
It can't be the issue with the unity exporting for android, since if i build same project(test example provided inside google cardboard unity package) using stock camera provided by unity, insted of Cardboard main gameobject), AA is working. It cant get simpler than that, once cube and one camera... I have tried turning on and off the 32-bit display buffer option in player settings, tried forcing open GL ES 2.0 and various other tick/untick checkbox inside unity tips found across web, with no success.
So my question is, is anyone else having this same issue. And how to fix it?
I hope my question and description of the problem are detailed enough.
Cheers
The Cardboard.cs class holds a RenderTexture which is what the cameras render to, and then it is rerendered to the phone screen with distortion correction for the lenses. This bypasses Unity's normal rendering to the screen, so the AA settings for the project won't have any effect.
To see what effect AA settings in Unity will have, you can do a couple of different things:
Turn off Cardboard.SDK.nativeDistortionCorrection, so that Unity is drawing directly to the screen, or
Edit Cardboard.CreateStereoScreen() and change the settings on the RenderTexture that is allocated there.
However, the native code rerender for distortion does not use anti-aliasing in the framebuffer, so I'm not sure how much effect you'll see in #2. And there will certainly be a performance penalty either way.
Turning off distortion correction fixed this issue. Then you can set the Unity project anti alias settings up to 4x or 8x. Looks great now - no more jaggies while viewing on an iPhone 6+.
Unity 5 running Google Cardboard SDK v0.5 --
To turn off Distortion Correction:
Go to Hierarchy | CardboardMain | in Inspector uncheck Distortion Correction
To enable 4x or 8x Anti Aliasing in Unity:
Go to Edit | Project Settings | Quality | in Inspector set Anti Aliasing to 4x or 8x Multi Sampling.
If you don't want to turn off distortion correction you need to change the depth of the texture from 16 to 32 bits and the format of the texture to ARGB32. To do that go to file BaseVRDevice.cs, then find CreateStereoScreen function and change it to
public virtual RenderTexture CreateStereoScreen() {
Debug.Log("Creating new default cardboard screen texture.");
return new RenderTexture(Screen.width, Screen.height,32, RenderTextureFormat.ARGB32);
}
I followed serg hov's suggestion, however AA is not working with distortion on even after applying that fix.
It doesn't make sense to turn off distortion, so I am wondering what would be the solution to have both distortion and AA working. It works for Gear VR, so there gotta be a way to get it working for Cardboard VR.
I have an OpenGL ES 2 code base that runs on iOS, Android, and on PC via the PowerVR emulation libraries.
When I run this code on an LG Optimus G LGE971, I see black artifacts on my model:
http://imageshack.us/photo/my-images/594/renderartifacts.png/
My first reaction was that the near clipping plane might be the issue, but because these artifacts appear on only select devices, I do not believe that is the issue. Any other ideas on what might be causing this?
Also, this isn't captured well in the above image, but the artifacts are not static -- they move around as the model rotates, etc.
I think maybe Lighting Calculation in shader code was wrong by mistake.
That looks like only using Ambient light without diffuse & specular.
also I want you to check whether you converted the texture from BGRA to RGBA.
The issue has been fixed. I fixed the issue by using
glTexImage2D()
with NULL for the buffer when I set up my mipmap levels, and then using
glTexSubImage2D()
when uploading the texture data into each level.
My Android app has been out for several months and works fine on any number of WVGA phones like the Droid, Droid 2, Galaxy, etc.
On the Motorola Xoom, however, a small portion of the textures load with white boxes where the images should be.
Researching online the most usual cause for this appears to be not using power of two textures. This seems an unlikely explanation since they work fine on so many other devices. Also, I am using power of two textures. The one caveat there is that I'm loading a bunch of bitmaps into a 1024 by 1024 texture dynamically. The code I'm using is from a now defunct library called Rokon, the relevant texture atlas code is here: http://code.google.com/p/rokon/source/browse/trunk/src/com/stickycoding/rokon/TextureAtlas.java?r=260 -- Like I said, I'm skeptical this could be the cause since it works on so many other devices AND many of the textures I am loading this way do work fine.
But I'm not sure what else could be causing it. A memory issue seems unlikely given that amount of memory available on the Xoom compared to the other devices the app works on.
Right now I don't own a zoom, but I can replicate the issue via DeviceAnywhere (where I see white backgrounds).
Nothing of interest shows up in LogCat either.
I know this isn't much to go on, but I'm at a loss here, what kinds of potential causes should I be looking at here? Thanks in advance for any ideas.
Try using glGetError() to see if OpenGL throws any errors
Is your application 2D or 3D? When you're drawing your sprites on the screen; which method are you using?
If your texture is white during onDrawFrame that probably depends on:
An untextured quad (using VBO:s or standard Vertex Arrays) - probably not, because it works on other devices
Xoom lacks support of the draw_texture extension - if you're using 2D
Xoom lacks support of VBO:s (Vertex Buffer Objects) - probably not, almost every Android device out there supports VBO:s
Do you have any sort of texture compression implemented that Xoom doesn't support?
At runtime, use this code to get the extensions and check if they're available:
String extensions = gl.glGetString(GL10.GL_EXTENSIONS);
boolean supportsDrawTexture = extensions.contains("GL_OES_draw_texture");
// Continue here and sooner or later you should see where Xoom lacks support
// where other devices doesn't.
Is it possible that you're falling foul of Android's automatically-resize-bitmaps behaviour? Print out the bitmap sizes as they are loaded to check, or move them to res/drawable-nodpi to avoid the behaviour entirely.
Is it possible that your texture exceeds 2048 pixels width or height? That's the maximum allowed texture size on XOOM.