I’m doing some tests for a project on iphone/ipad and I run across an issue with the lighting in one scene. Basically in the scene there are some areas where I have very bright lights(3-4 in value) because I need those areas to overbright. Everything works fine as long as the building setting is for PC/MAC standalone but when I test the same scene changing the building setting to ios for iphone the lighting changes. At first I thought that it was something wrong with the lightmaps but after further tests I notice that also the vertex lit or diffuse shaders react differently. Here is an example screenshot with the lightbaked scene.
I’m using the mobile vertex lit shader as my default one for the scene, but I don’t know at this point if there is any difference with the standard one that could give this kind of problems.
It looks like the lights can go past 1 in value and in my case since I’m using yellow/orange light on a dark grey texture everything becomes green.
Any suggestion or tip to put me on the right track would be great, thanks.
hippocoder: yes it happens also with 3.4
after your post I went back an did a few tests with a very simple block from my scene and different lighting setup
The first image is with the building settings set to ios and the second one with PC/MAC standalone.
You can see how different the results are (light intensity for the point light is 8, for the directional is 2)
I also noticed the behavior in general is a bit different from point light and direction light(no matter what building settings), not a huge difference but I’m not sure why, perhaps there is some explanation on how unity handles those light with specific shaders that I’m missing.
One other question that came up is: once I bake the lightmap it seems I can’t get back to the lighting I had before even if I clear the lightmap. My pieces become black and don’t react to the lights in the scene how they should. Perhaps unity still expect to have a lightmap there and renders them black, is there a way to go back to dynamic lighthing after I baked a lightmap?
Vertex lit is only an option if you target OpenGL ES 1.1
On OpenGL ES 2.0 there are no vertex lights (no FFP at all) which has fair set of consequences.
Prior unity 3.2 or 3.3 (not sure which one) the vertex lit fallback in unity on oes 2.0 worked quite a bit better but back then OES 2.0 was generally that slow that you would normally not want to use it (ok you don’t want to use it at the time either at least not with heavier environments as the iphone4 is the dominant device and its high resolution + underpowered gpu make pixel lights a thing that on its own can easily kill the performance flat out due to the fillrate hit)
thanks for your answer dreamora. Since probably the target is going to be from iphone 3gs on (OpenGL ES 2.0 is supported at that point) then if I understand correctly it makes no sense to use vertex lit shaders. correct me if I’m wrong.
To improve performance I can bake all my lighting and don’t use lights at all for my purposes but my problem still remains because even if I use an unlit lightmapped shader I still get everything green instead of the overbright yellow.
Any idea why the lighting changes switching the building settings?
Dreamora isn’t clear, vertex lit directional is faster on opengl es 2.0. There is still reason to use shaders like this.
When you are using Beast to calculate lighting, you might as well just use whichever shader looks nicest with beast and whatever shader looks best on your realtime objects after baking.
I’m running into a similar, if not the same, issue. For some reason the lighting information is drastically different on the Webplayer than on IOS. Does anyone know why this is happening and/or how to fix it? I’m using single lightmaps for every asset in the image.
hippocoder: thanks, that’s what I’m usually doing, but in this case as you can see from my screenshots all shaders are giving me the same color problem.
kraemology :have you found a solution to your issue? It seems indeed very similar to the one I’m having.
I’ve had a similar problem also, and it seemed to ave something to do with the intensity of my lights.
After some tweaking, I believe lowering the intensity of my lights while increasing the distance, I got better, but still odd, results.
The impression I’m getting from the screenshots, and my experience, is that /something/ is clipping the light intensities to prevent light blowout perhaps?
I’m not sure, but it’s something else to consider.
I notice this too. iOS isn’t really 1:1 with desktop in the slightest - if you use mobile shaders. If I try compatible desktop shaders, I generally get the same result.
Had anyone ever found a resolution to the OP’s problem? I have nearly the exact same issue where orange/yellow appears as green on Android. I have tried both the built in unity shaders as well as my own custom vertex lit one with the same results.
I have searched far and wide and this is the only reference of the issue I can find so any help or suggestions would be greatly appreciated.