No lighting visible on the iPhone

Hey Everyone,

I recently did my first build from unity to xcode and installed my game onto the iPhone 4. But I’ve notice there is no lighting effecting the main character in which i set in Unity. In Unity I have a directional light facing top down at the character. But its not showing up on the iPhone 4. Is there anything I need to set in unity or xcode for lighting to work?

Any help is appreciated.
thanks in advanced.

Kue

Are you sure you even want that? Lighting is expensive and normally you’d bake it into the textures, especially for something simple like a top-down directional light.

–Eric

I Know lighting is expensive, But if could be done is there any way to make it show. I’m doing a test right now where I want a slight specular effect on the character only. Is there another alternative for specular highlights? rather then using a light.

thanks

It probably depends on the shader; the standard vertex-lit shader has specular and works fine on the device when used with a light.

–Eric

Thanks for the Tip Eric, I’ll give it a try.

Kue

are you sure that you build with ARMV7 and OpenGL ES 2.0 support and that you don’t disable the ES 2.0 support?
Also ensure that normals are present on the models (either by default or generated) so the differences on lighting can show up on the models

Hi dreamora,

I’ve built it with ARMV7. How to I find out if OpenGL ES 2.0 is disable or not?
As for the models, all the normals are there.

If you don’t modify the AppController define it will indeed use shaders.
After that, all thats required is that you are using shaders supporting it, not iphone optimized ones which are commonly completely non-programmable pipeline and wouldn’t support it at all.

Also, just to make sure: only light will appear, you will not get any kind of shadows, so it will only get brighter on the surfaces, not darker.

Thanks dreamora,

I did another test using supporting shaders and now the lighting shows up on the iPhone.
Again thanks everyone for helping out.

Kue