Normals Demo with 2 points of Light

I saw the normals demo when first presented in a post and video. Today I saw it again but it seems that the new one uses 2 points of light instead of 1. I have been looking for this on tychon docs but the old composite remains: composite.normalMapWith1PointLight.

Is that possible on the new daily build? if so, how can we do it?

Hi @schmidtsonian6,

Can you point me to the demo which (may) be indicating 2 points of light? I’d like to see which one you’re referring to in specific.

Thanks,

Brent

Hi @Brent,

This is the old blog post that shows a sneak peek of the effect:

http://www.coronalabs.com/blog/2013/08/28/3-d-effects-with-normal-mapping/

The composite.normalMapWith1PointLight effect works as the name implies with only one light. But in the video here (under the “Painting with Light” title ) you guys show the same effect using 2 lights: 

http://coronalabs.com/2d/

I was wondering how to achieve this? Did I miss something?

Thanks!

I believe they were working with some custom shaders that allow more than one effect at the same time.

Take a look at this: http://coronalabs.com/blog/2013/10/17/tutorial-multi-pass-shaders-in-graphics-2-0/

Atleast this is something I played around while trying to achieve a similar effect with multiple lights :wink:

@CineTek I’ll check that out. I read about custom shaders when first introduced a couple weeks ago but I didn’t see too much things to do with it besides combining all the effects into one (composite). I’m hoping there is more flexibility to customize or even make our own filters but certainly you make me reconsider, so I’ll be playing with this and see what come’s up.

Thanks!

I can’t locate the code right now, but I believe I just created two sets of objects both using the same normal map effect.

The only difference is that the top most object uses the “add” blend mode and also has a slightly different phase on the position of the light. It’s not perfect as it causes the bottom object’s light to not appear as bright. There are some new porter-duff blend modes that might make this work better.

Hi @schmidtsonian6,

Can you point me to the demo which (may) be indicating 2 points of light? I’d like to see which one you’re referring to in specific.

Thanks,

Brent

Hi @Brent,

This is the old blog post that shows a sneak peek of the effect:

http://www.coronalabs.com/blog/2013/08/28/3-d-effects-with-normal-mapping/

The composite.normalMapWith1PointLight effect works as the name implies with only one light. But in the video here (under the “Painting with Light” title ) you guys show the same effect using 2 lights: 

http://coronalabs.com/2d/

I was wondering how to achieve this? Did I miss something?

Thanks!

I believe they were working with some custom shaders that allow more than one effect at the same time.

Take a look at this: http://coronalabs.com/blog/2013/10/17/tutorial-multi-pass-shaders-in-graphics-2-0/

Atleast this is something I played around while trying to achieve a similar effect with multiple lights :wink:

@CineTek I’ll check that out. I read about custom shaders when first introduced a couple weeks ago but I didn’t see too much things to do with it besides combining all the effects into one (composite). I’m hoping there is more flexibility to customize or even make our own filters but certainly you make me reconsider, so I’ll be playing with this and see what come’s up.

Thanks!

I can’t locate the code right now, but I believe I just created two sets of objects both using the same normal map effect.

The only difference is that the top most object uses the “add” blend mode and also has a slightly different phase on the position of the light. It’s not perfect as it causes the bottom object’s light to not appear as bright. There are some new porter-duff blend modes that might make this work better.