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 idunlop_oefun · Jul 03, 2012 at 08:12 AM · ioslightingdirectiondark

How do I fix directional light problem with multiple instances of prefab?

This works perfectly in the editor (mac). On the iOS device (iPad 3) it does not work correctly. I'm instantiating a simple low poly object multiple times. I'm using the mobile / diffuse shader with an opaque texture.

If I instantiate one prefab the directional lighting works correctly.

If I instantiate several the lighting dims on all objects. They are still lit but appear at 50% brightness.

I've tried switching the shader to an unlit variation and this works as expected. It appears related to directional lighting but, as yet, I haven't figured out the cause.

Thanks!

Comment
Add comment · Show 8
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 adrenak · Jul 03, 2012 at 12:44 PM 0
Share

Try to the inspecter window the the model that you are using and set normals to calculate ins$$anonymous$$d of import

avatar image idunlop_oefun · Jul 03, 2012 at 05:35 PM 0
Share

Yeah, already tried that. It made no difference. A single instance works, it breaks when there is two or more instances.

avatar image idunlop_oefun · Jul 03, 2012 at 06:50 PM 0
Share

If I replace my models with a unity cube it works as expected. So it's definitely related to the model. I tried exporting as collada and wavefront - both have the same issue / doesn't work.

avatar image idunlop_oefun · Jul 03, 2012 at 07:26 PM 0
Share

In case anyone is interested, I've submitted this issue with example as a bug. This is the unity project showing the issue: https://www.dropbox.com/s/d9nfd0zgtpdvkrd/directionalLightBug.zip

avatar image zmeinaz · Jul 04, 2012 at 06:29 PM 1
Share

I too am seeing this issue. See my question here (http://answers.unity3d.com/questions/278948/why-does-the-lighting-on-an-object-change-when-mul.html)

It appears to have something to do with the object's scale. In the directionalLightBug project, if you change the object's scale to 1, the lighting behaves as expected. If the scale is 0.5, the lighting is twice as intense. If the scale is 2 the lighting is half as intense. Basically the light intensity seems to be inversely proportional to the objects scale.

Show more comments

1 Reply

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

Answer by idunlop_oefun · Jul 03, 2012 at 10:21 PM

I believe this is a bug. However, until Unity either a) fixes it or b) explains why this breaks I have figured out a workaround.

I created a simple script that instantiates a unique material for each instance of my prefab and sets the 'Renderer.Material' property with this new Material instance.

The downside is that this breaks batching. I'll update this answer if I hear back from Unity.

See comment from zmeinaz for alternate workaround.

Update: It's now fixed according to Unity. I assume that means it will be in the next build (> 3.5.3f3).

Update: This is still broken in 3.5.4f1 when testing on iOS device (iPad 3).

Update: This is now working in 3.5.5f2 (tested on iPad 3 / iOS 6b4).

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 zmeinaz · Aug 01, 2012 at 04:38 AM 0
Share

I am still seeing this issue with Unity 3.5.4f1. Anyone else?

avatar image idunlop_oefun · Aug 02, 2012 at 03:31 AM 0
Share

Yes - still broken on iPad 3 for me in 3.5.4f1.

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

[Unity or iOS simulator bug]Why is lighting different in iOS simulator and Unity ? [Works fine on a real device] 0 Answers

NGUI objects black color after build into phone 1 Answer

Lights and Textures disappear upon iOS export 0 Answers

difference between editor lighting and IOS build 0 Answers

Spotlights on iPhone game suddenly are all dead. Any thoughts? 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