playMaker

Author Topic: Emission intensity change?  (Read 7677 times)

Twood

  • Junior Playmaker
  • **
  • Posts: 76
Emission intensity change?
« on: November 29, 2015, 12:16:22 PM »
to pulse GI lights in real-time in Unity 5 seems to require a bit of coding (Otherwise if you just change the color you'll not be able to go above a 1 lighting setting, when the range is up to 10)

But anyway you'd do something like this in code

1) Get _EmissionColorUI and _EmissionScaleUI
2) Perform the calculation above: finalColor = _EmissionColorUI * Mathf.LinearToGammaSpace(_EmissionScaleUI)
3) Set emission color to the resulting color

from this thread: http://forum.unity3d.com/threads/dynamic-emission-in-real-time-gi.293569/

Is there a way to do that in playmaker?


Twood

  • Junior Playmaker
  • **
  • Posts: 76
Re: Emission intensity change?
« Reply #1 on: December 03, 2015, 11:57:39 AM »
Got it working when I gave it a try converting the basic process today.

The "get material color" and "update emission GI" actions are required from the ecosystem.

Then what you do is you get the color "_EmissionColor" (in the name slot) using get material color. Store the color var. Use get RGBA and break up those values into variables. Use a float with a multiplier number you want (your light intensity control) and then multiply the R G B variables individually by it. Then you can use set color RGB on your color var. Next you need an update emission GI action or GI state won't actually change, and now a set material color as well to adjust the actual object's color.

If anyone wants a pic of that basic working example's action list let me know.

And to sum up what it actually is: basically having the ability to have normal lighting controls like pulse, animate, color change that works with the GI "real-time" lights.
« Last Edit: December 03, 2015, 12:01:46 PM by Twood »

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Emission intensity change?
« Reply #2 on: January 05, 2016, 12:54:21 PM »
Hi!
I can't find "update emission GI" on the Ecosystem! Is it a new version of Ecosystem?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Emission intensity change?
« Reply #3 on: January 05, 2016, 04:44:22 PM »
Hi!

I found it. Not on the Ecosystem, but the Action script. :-)

But one thing I don't understand! Why do you need all this?
I followed your tutorial, but it works with only Set Material Color and _EmissionColor in the Named Color Slot. I don't need Get Color RGBA, Set Color RGBA and Update Emission Gl.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no