iPhone lighting

Previous topic - Next topic

Crivens

Ok so I'm using 3D (Entity system found on forum) in my latest game and so far so good.

I then tried a bit of lightning which worked fine on the PC and on WebOS. I've included images that show no light used, standard light (255,255,255), and blue light (0,0,255). No worries really. Code was pretty much EntityCreateLight(RGB(255,255,255)) (with changes for blue light and not used at all for no light) with a move afterwards although that makes no difference to the problem it seems.

Then I tried on iOS (3GS and 4G Touch). Everything is too bright. And on the blue light is much too blue. If I reduce the brightness (say by lowering the colour from (255,255,255) then it just changes the colour but still looks too bright).

I guess I could muck around with the light settings and get it just so for iPhone (everything looks a little higher contrast even with no light on WebOS for example but it's acceptable compared to the serious brightness of the iPhone) but does anyone know if iDevices need different light settings or another command used to keep it in line?

Attached is white light (255,255,255) of PC and iOS. You can see the PC is fine, but the iPhone is much too bright. Both have used lighting as can be seen by shading on the spheres in the background.

Cheers

[attachment deleted by admin]
Current fave quote: Cause you like musicians and I like people with boobs.

Crivens

And here is when blue light is used (0,0,255). Again the iPhone has gone a bit nutty on the lighting compared to the PC.

[attachment deleted by admin]
Current fave quote: Cause you like musicians and I like people with boobs.

Crivens

And here is with no lighting at all.

[attachment deleted by admin]
Current fave quote: Cause you like musicians and I like people with boobs.

Dark Schneider

I remember I used 3D lighting much time ago with bad results too, you only get normal render results when lighting is OFF. It could be because the OpenGL ES that uses Q16 (fixed-point) format and it not receive the values it expects.

Crivens

That's a bit of a bummer. For iOS then I may have to muck around with textures to get the same effect on the spheres. Annoying though as you can see the lighting is working on the spheres for iOS it's just too bright and mucking around with lighting colour doesn't seem to help. It changes the colour and that get's a darker shade but still is off with that misty brightness. Annoying.

Also can shaders be used on iOS? I was thinking of altering colours of 3D objects.

Any thoughts Gernot?

Cheers

Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

no shaders. I use OpenGL|ES 1.1

Crivens

Fair enough. Any thoughts on the lighting issue? Is about the only thing that I've come across that makes one device different to another. Obviously it does do it though as you can see the shade on the spheres plus the lighting does change colour. Just too bright...

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

mentalthink

HI Crivens, the light I think are a little poor yet in Glbasic, if you permet a counsil, make a litghmap or complete map in your prefered 3d suite, for me it´s the better, quick and easy solutions for themes about ligths.


Slydog

#8
Quote from: Kitty Hello on 2011-Aug-29
no shaders. I use OpenGL|ES 1.1

Ha, that explains why my shaders aren't working on my iPhone!
(I've since changed my code to not use shaders, so no problem)

Any plans on upgrading OpenGL ES to 2.x any time soon?
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Kitty Hello

I think it's a lot of work and would break compatibility with the older devices.

Crivens

What about the original lighting issue? Is it a bug or something that just doesn't work the same on the iPhone?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

ampos

Quote from: Kitty Hello on 2011-Aug-29
I think it's a lot of work and would break compatibility with the older devices.

Perhaps let be GLBasic 10 for old devices, and GLB 11 for new devices (OpenGL 2.x)?

Sometime you have to leave backward compatibility with older devices, or we would be on Win 98 and DirectX 4, just to set an example...

Do the "big" platforms (win, mac, linux, iOs, Android, (webos?)) all of the OpenGL 2.x?

BTW, it is not a thing I care a lot, I am not using any 3D at the moment  :nana:

Crivens

So no ideas why the iPhone is so bright when compared to WebOS and Windows? Any ideas then on how to darken it? Using different coloured lighting changes the colour but you still have that too bright look even on a dark colour it seems. But the shadowing is working on the spheres so it's just that annoying brightness...

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

try creating a spot light instead of the ambient one. Maybe.
Try angles 360 and 180, alternatively.

bigsofty

Try this version, on iPhone only, see if improves anything?



[attachment deleted by admin]
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)