Log in or register to post comments

Lighting weirdness

October 25, 2016 - 10:40am #1

I have a GameObject as a child of the image target and within this GameObject  there is my model along with 4 direction lights.

The lights are positioned front, left, rear, right to illuminate all sides of the model, but no so.

The app consistently seems to either not show the front light or dims it, I cant work out which.  So what happens is the front appears to being lit by the ambient light from the left and right lights and so looks washed out.

I have confirmed the problem is the front light as if I physically rotate the trigger image so I see the back of the model it is perfectly lit.  If I then rotate the model by touch so now the front faces me that is lit correctly.  I then rotate the trigger image and now what was the back of the model is not lit correctly.

I've tried all manner of positions/hierarchy to no avail, the light at the front just wont illuminate the model?

If I run the app on the simulator all lights work correctly, this only happens when deploying to Android and iOS devices?

???

Lighting weirdness

October 28, 2016 - 12:23pm #4

mrduncan you absolute star!!!!  I have spent so much time on this and would never have clocked that.

 

When I checked all levels for all platforms were checked and all had 4 pixel lights except Beautiful.  I turned them all off apart from Beautiful and changed to 4 pixel lights and it works perfect.

Thanks for sharing that gem of a tip.

:-)

 

 

Lighting weirdness

October 28, 2016 - 6:41am #3

Reading this...the first thing that pops in my head is the red flag of having more than one light on a mobile device. Go to edit, settings, quality and see how many lights are allowed for your device. You can raise it if you want. If the scene is cheap on the cpu then raising the quality level will be 'ok'. 

If your scene is kind of on the expensive side or you just want as much agility as possible...then I'd suggest to use no lights at all. Set all your lights to baked...and litter your scene with light probes...then make sure the model that you want to be lit dynamically is set to use light probes. If that sounds weird read about it here: https://docs.unity3d.com/Manual/LightProbes.html

If you're doing anything interesting with the standard shader...ie something highly reflective...then you'll want to explore reflection probes, too.

 

Lighting weirdness

October 28, 2016 - 5:11am #2

After lots of checking and work I am still stumped by this.

I have upgraded the project to 6.120 and targeting both Android and iOS and get exact same results on both.

First the result is as described in the original post but then I found that when I open my menu which then sets the model as inactive upon closing menu and model set to active the light appears correct all around the model.

So in Start I set the model as inactive knowing that when found target trigger fires I set it to active.

Now hey presto the front appears correct .... but now the back is acting like the original post?

Can any one assist?

Log in or register to post comments