Lighting/Shadows?

This is probably a really elementary question, but I’ve been doing some digging to see how lighting and shadow effects are usually handled in Corona SDK but I can’t seem to find anything. I don’t need anything specific, but if somebody could point me in a general direction I would be most appreciative.

Thanks! [import]uid: 172008 topic_id: 30909 reply_id: 330909[/import]

Hi @TozyJay,

Currently, Corona doesn’t support dynamic shadow and lighting effects (as in, shadows and lighting which shift and change depending on other objects in the path of the light source). Hopefully that’s in the roadmap sooner than later, because it would provide for some amazing graphical effects.

You could attempt to build a dynamic lighting system yourself, but I imagine it would be VERY difficult, if not practically impossible.

It’s also possible that you could extend your app to use Corona Enterprise, and code a dynamic lighting engine in C++ or Objective C… but that approach is more than the typical indie developer can justify.

Some simple shadow and lighting effects can be achieved using overlay/underlay images, opacity, and tinting. For example, you could put a “glow” effect around a character using another display object that pulsates, flickers, or changes tint and opacity. But this won’t handle dynamic lighting aspects, i.e. if that light source hits the corner of a wall in a top-down 2D simulation, the light source won’t wrap around the corner like it would in a full-fledged dynamic lighting system.

Brent
[import]uid: 9747 topic_id: 30909 reply_id: 123633[/import]

Woops - just now seeing your response. Thanks for taking the time. I don’t need anything fancy like completely organic, natural lighting. I’m sure I can come up with a creative solution by messing around with the first options you mentioned. That’s what I was doing before but I just thought I would check to see if there was anything available.

Here’s to hoping for it to be in a future release! :slight_smile: [import]uid: 172008 topic_id: 30909 reply_id: 123895[/import]

Hi @TozyJay,

Currently, Corona doesn’t support dynamic shadow and lighting effects (as in, shadows and lighting which shift and change depending on other objects in the path of the light source). Hopefully that’s in the roadmap sooner than later, because it would provide for some amazing graphical effects.

You could attempt to build a dynamic lighting system yourself, but I imagine it would be VERY difficult, if not practically impossible.

It’s also possible that you could extend your app to use Corona Enterprise, and code a dynamic lighting engine in C++ or Objective C… but that approach is more than the typical indie developer can justify.

Some simple shadow and lighting effects can be achieved using overlay/underlay images, opacity, and tinting. For example, you could put a “glow” effect around a character using another display object that pulsates, flickers, or changes tint and opacity. But this won’t handle dynamic lighting aspects, i.e. if that light source hits the corner of a wall in a top-down 2D simulation, the light source won’t wrap around the corner like it would in a full-fledged dynamic lighting system.

Brent
[import]uid: 9747 topic_id: 30909 reply_id: 123633[/import]

Woops - just now seeing your response. Thanks for taking the time. I don’t need anything fancy like completely organic, natural lighting. I’m sure I can come up with a creative solution by messing around with the first options you mentioned. That’s what I was doing before but I just thought I would check to see if there was anything available.

Here’s to hoping for it to be in a future release! :slight_smile: [import]uid: 172008 topic_id: 30909 reply_id: 123895[/import]

Lighting sprites doesn’t make much sense, lighting 3-D polygons does.
You could light sprites, theoretically but how would you know how the light is falling on them when they have no angles or surfaces, just pixels? [import]uid: 63787 topic_id: 30909 reply_id: 128584[/import]

Corona uses sprites [import]uid: 63787 topic_id: 30909 reply_id: 128585[/import]

Lighting sprites doesn’t make much sense, lighting 3-D polygons does.
You could light sprites, theoretically but how would you know how the light is falling on them when they have no angles or surfaces, just pixels? [import]uid: 63787 topic_id: 30909 reply_id: 128584[/import]

Corona uses sprites [import]uid: 63787 topic_id: 30909 reply_id: 128585[/import]