I need more that one more point of light for Dynamics Shader!

Hello everybody,

it’s my first post, I hope my english is comprehensible.

I recently subscribed to Dynamics Shader (porkfin software). It is really simple as it was described. There is only one problem.

I can only use just one light, if I try to activate more than one no error message appears, I see the newImageRects of all the lights but only the first one work.

Is it my mistake or is it a limitation of the plug-in?

I am writing an excerpt from the code.

 .... .... physics.start( ) physics.setGravity( 0, 0) DynamicShaderIsON = true -- just restarting background -------- LayoutScacchiera = "marmo" TipoScacchieraOld = 0 InizializzaScacchiera () local movement, lighting = shader.getMovement() debugLevel = shader.setDebugLevel(0) local N , angolo local objectPhysics = off -- set to false to turn off physics local objectMotion = off -- turns on slight motion for physics objects ----- Define the light source ----- angolo = 0 for N = 1, 3, 1 do angoloLuce[N] = angolo angolo = angolo + 120 light[N] = display.newImageRect( "immagini/light.png", 50, 50 ) light[N].x = centroLuce.x + math.sin(math.rad(angoloLuce[N])) \* raggioLuce light[N].y = centroLuce.y + math.cos(math.rad(angoloLuce[N])) \* raggioLuce local lightColor = {1, 1, 1} light[N]:setFillColor(lightColor) -- this is the default color ----- Add the light source to the Dynamic Shader ----- shader.addLight(light[N]) shader.setLightColor(lightColor) end -- for N = 1 , 3 ----------------------------------------------------------------------------------- local croce = display.newImageRect( "immagini/croceRock.png", 50, 50 ) croce.x = cx + 90 ; croce.y = cy - 90 croce.shaderInfo = {name = "croce", map1 = "immagini/croceRock.png", map2 = "immagini/croceRock\_n.png"} shader.addObject(croce) ----------------------------------------------------------------------------------- local cerchio = display.newImageRect( "immagini/cerchioRock.png", 50, 50 ) cerchio.x = cx - 105 ; cerchio.y = cy + 50 -- shaderInfo table required for the Dynamic Shader cerchio.shaderInfo = {name = "cerchio", map1 = "immagini/cerchioRock.png", map2 = "immagini/cerchioRock\_n.png"} -- add object to the Dynamic Shader shader.addObject(cerchio) ----------------------------------------------------------------------------------- ----- START THE DYNAMIC SHADER ----- ----------------------------------------------------------------------------------- shader.start() -- start shading luceDynamicShader = timer.performWithDelay(20, luceDynamicShader, -1 ) .... .... local function luceDynamicShader() local N =0 raggioLuce = 100 local cx, cy = display.contentCenterX, display.contentCenterY for N = 1 , 3 , 1 do angoloLuce[N] = angoloLuce[N] + 4 if angoloLuce[N] \> 360 then angoloLuce[N] = angoloLuce[N] - 360 end light[N].x = centroLuce.x + math.sin(math.rad(angoloLuce[N])) \* raggioLuce light[N].y = centroLuce.y + math.cos(math.rad(angoloLuce[N])) \* raggioLuce end -- for N = 1 , 3 end --local function timerLuceFaro()

As you can see there are three lights that rotate around a “centroLuce” center each at 120 ° from each other at a distance equal to “raggioLuce”.

In function luceDynamicShader ()  I simply spin the three lights.

Anyone have an idea?

Thannks in advance,

Alessio

Fixed: I has been contacted by email and they told me that, for the now, there is only one light source.

Yes, someday after we finish transitioning graphics languages I’ll probably add another light source.

Im a newb about this stuff but isnt the only way to do this by using the graphics effects which dont support more than one light source?

Yes, especially if you are relying on composite paint like I do in the Dynamic Shader.  However, you can build a custom multi-light source shader at the graphics language level but I’m not an expert at that and I the effects I really wanted were available in composite paint. 

I’ve made some custom shaders now and will continue to explore that and I’ve also played around with faux multi-light effects using alpha overlays (circular with a highlighted area that can be rotated) and subtle flashes and light and glows in various colors to make is look like something is casting light.

Yes, someday after we finish transitioning graphics languages I’ll probably add another light source.

Sporkfin make 3 light source and you’ll make me happy.

I’ve made some custom shaders now and will continue to explore that and I’ve also played around with faux multi-light effects using alpha overlays (circular with a highlighted area that can be rotated) and subtle flashes and light and glows in various colors to make is look like something is casting light.

all that things will be avaible in the plug-in?

Probably not, for now just assume there will be one light source.  I’m continuing to support the Dynamic Shader but I’m uncertain when or in what ways I will upgrade it in the future.

Fixed: I has been contacted by email and they told me that, for the now, there is only one light source.

Yes, someday after we finish transitioning graphics languages I’ll probably add another light source.

Im a newb about this stuff but isnt the only way to do this by using the graphics effects which dont support more than one light source?

Yes, especially if you are relying on composite paint like I do in the Dynamic Shader.  However, you can build a custom multi-light source shader at the graphics language level but I’m not an expert at that and I the effects I really wanted were available in composite paint. 

I’ve made some custom shaders now and will continue to explore that and I’ve also played around with faux multi-light effects using alpha overlays (circular with a highlighted area that can be rotated) and subtle flashes and light and glows in various colors to make is look like something is casting light.

Yes, someday after we finish transitioning graphics languages I’ll probably add another light source.

Sporkfin make 3 light source and you’ll make me happy.

I’ve made some custom shaders now and will continue to explore that and I’ve also played around with faux multi-light effects using alpha overlays (circular with a highlighted area that can be rotated) and subtle flashes and light and glows in various colors to make is look like something is casting light.

all that things will be avaible in the plug-in?

Probably not, for now just assume there will be one light source.  I’m continuing to support the Dynamic Shader but I’m uncertain when or in what ways I will upgrade it in the future.