Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 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
5

Answer by suparlava · Sep 10, 2015 at 05:55 PM

In Edit > Project Settings > quality > Rendering section > Pixel light count, set it to something like 32. That's the maximum allowed lights count set to scene. In my case, directional light flickered after I added 5 point lights to scene while default max count was equal 4.

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
2

Answer by Paulius-Liekis · Jul 16, 2012 at 01:02 PM

Usually this is caused by a bug in Batching. Try disabling batching and see if that works for you. You can build your game without batching (most games do not use GPU that much, so they can run without batching just fine).

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 dexl · Jul 18, 2012 at 05:59 PM 0
Share

I had similar problem, where duplicated textures will not receive lighting if dynamic rendering is turned on. But this increases my draw calls, and defeats the purpose of spriting all on same texture.

avatar image v.naumenko · Jul 20, 2012 at 09:30 PM 1
Share

switched off the Dynamic Batching in Player Settings and it worked for iPhone4, flickering gone.

avatar image
-1

Answer by arun_gopalan · Dec 05, 2011 at 12:49 AM

OK. Not sure where my previous answer went.

We are having the exact same texture on/off issue. We have one directional light and this happens on the iPad only. Did any of you find the reason for this?

Arun

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
-2

Answer by kr15h · Jul 12, 2012 at 01:51 PM

Just by changing Directional to Point or other light...

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 richyz · Jul 03, 2013 at 06:43 PM

In Build/player settings/resolutions and presentatios clik in use 24 bit Display deph buffer, this will fix it

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.

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

Is there a way to tell when a prefab is duplicated? 2 Answers

How to add an asset to a script-enabled public game object? 1 Answer

How can I reference in a prefab's script a gameObject found in the scene 1 Answer

GameObject change Position after game started 1 Answer

Adding a prefab to gameObject at a certain position in runtime 0 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