• 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 ROM · Sep 07, 2011 at 04:04 PM · gameobjectprefabcinema4ddarkflicker

Objects flickering between dark and light

I'm currently building a Unity iOS game, in the editor all of the objects are fine however when I run the game on a device some (and it is only some) of the objects flicker between dark and light (it'll be dark and then a few seconds later it will be light and so on) when the camera moves around. I have only one light in the scene and that is a directional light. Even if I remove the textures from the objects then they still flicker however if I remove the directional light and turn up the ambient light then the objects do not flicker. The objects have been imported from Cinema 4D, I've done this many times and never had any problems it just seems that a few of the objects I have imported into this game just aren't working properly.

It seems that i've tried just about everything to try and fix this including reimporting the objects, retexturing them etc and it still isn't working. I'm really stuck and so any help would be much appreciated!

Thanks in advance,

ROM

EDIT: It appears the problem only exists on the iPhone 4. I've tried it on the iPhone 3G and an iPod Touch 2nd Gen and the problem doesn't exist. Just the iPhone 4 :/

Comment
Add comment · Show 6
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 Meltdown · Sep 07, 2011 at 05:36 PM 0
Share

Which shaders are you using on these flickering objects?

avatar image ROM · Sep 07, 2011 at 06:34 PM 0
Share

Diffuse :)

avatar image Meltdown · Sep 07, 2011 at 07:27 PM 0
Share

Just a long shot, but try the $$anonymous$$obile/Diffuse shaders and see if that makes any difference.

avatar image WillTAtl · Oct 31, 2011 at 03:46 AM 0
Share

ran into this same problem, testing on a 3gs. No luck with a solution, I guess? I've disabled casting and receiving shadows, but no effect, otherwise same scenario as RO$$anonymous$$, single directional light, tried reimporting assets. $$anonymous$$indof out of ideas at the moment, though I'm still groping for more, hoping someone has an idea what's causing this...

avatar image WillTAtl · Oct 31, 2011 at 05:35 AM 0
Share

Ok, some more info here.

first, dunno how I didn't notice before, but the lighting fails when more than one instance of the prefab is in the scene, but not when 2 are in the scene.

The instances are normally created dynamically by a scene manager. I tried adding static instances in the scene directly in unity, and get the same behavior - but separate for the static and dynamic instances. I.e., one of each, lighting is fine. Add a second of either - static or dynamic - and all of that type go dark. Neither affects the other, though.

Lastly, isolated this as being some sort of problem with the mesh itself, or with the way it's imported; used a unity sphere to build a new prefab with all the same components and settings, and they work perfectly, no problems at all. The mesh was created in blender; I just deleted the default cube, replaced with with a sphere, centered it, and exported. I build a new sphere mesh in blender the same way, got the same problem.

To clarify, as with original question, only happens on iphone, but happens on both my 3gs and in the iphone simulators.

Gotten late, need to call it a night rather than keep beating my head against this until the sun comes up. Will bash on it more tomorrow, and post a solution if I find one. I'm not sure if this is the same problem as the OP, though, so didn't want to create a new question.

Show more comments

9 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by vanss2 · Jul 22, 2013 at 10:47 AM

I had the same problem, and tried all the above., nothing worked.

Then i found my camera's far plane was set to 10000 or so! (unnecessary high) Changed this to 50, and the flickering was gone!

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 AlgorithMan · Mar 04, 2014 at 03:09 AM

I had a similar problem. I had two objects X and Y in my blender file. I added Y to X, using a boolean modifier and made Y invisible.

Then I added the mesh to a unity project and had the flickering. My problem was, that unity made Y visible again (which I didn't recognize at first). I deleted Y and the flickering was gone.

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 LukeLitman · Jun 06, 2016 at 05:12 AM

Just ran into this issue, it can be either the camera near plane or the far plane that causes this, thanks!

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 choco420 · Dec 28, 2020 at 02:45 PM

Close Unity, delete Library folder, open project and this will re-import everything. Solved for me

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
  • ‹
  • 1
  • 2

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

17 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

Related Questions

Create with code 2.2 pizza not shooting 1 Answer

difference between prefab and gameobject in listening event 1 Answer

Troubles instatiating a gameobject with rotation 0 Answers

Hide/Unhide Game Object 4 Answers

How would I change the value of one prefab's variable via script without changing all of them? 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