Big Hollywood Fun with LEDs
JonnyMac
Posts: 9,194
Every summer I make one of these posts -- and here we are again. This year my friends at Biomorphs (Steve Wang's FX shop) were hired by Riot Games to create two characters from the huge online game, "League of Legends." The characters are Tryndamere and Ryze. Both on on display at the PAX gaming convention in Seattle this weekend.
Here's Tryndamere:
Yes, he's as big as he looks. If he were standing flatfooted on the floor without his helmet he would be 7'4" tall.
Admittedly, this one was pretty easy. I used an EFX-TEK HC-8+ controller (why not, I designed it) to control seven channels of LEDs. You'll notice that most of the lighting is in crystals are on the sword and in his armor. What Steve tends to ask for is a cyclical modulation of the lighting (ramp up, ramp down) with a "shimmer" on top of that. Assuming you have multi-channel LED dimmer that is compatible with byte values, here's how simple the code is:
Of course, we spent a little time experimenting with the low side value of the overall brightness and the dither setting. I really like Michael Rychlik's PRNG object (which implements George Marasglia's algorithm [see post, below]) and tend to seed it with Chips RealRandom object. The dither() method uses SAR to maintain sign so that it returns a signed value; by adding the dither and use a small delay the crystals "shimmer."
The eyes created a bit of a challenge. The aqua LEDs we used were incredibly bright and I couldn't get control of them -- to Steve's satisfaction -- with my standard dimmer code that is used for the other channels. After an hour of futzing I just pulled that channel from my standard dimmer and wrote a custom driver for the eyes. Steve wanted them to throb like everything else, but at a nearly imperceptible level. I ended up doing this in PASM; 20 minutes later Steve was happy.
The second character is called Ryze.
This one used two HC-8+s: one in the base (for the base and his eyes), and one in the energy ball. The eyes animation is very close two what I posted above. There are three channels in the base and I sequence them quickly to create a bit of a rotating look. That said, they also get the "shimmer" treatment (Steve really likes that).
The real fun was in the energy sphere. After banging our heads for a couple weeks we found an RGB LED strip that uses individual WS2801 drivers for each LED. We cut this into smaller strips and attached it to a core that holds the HC-8+ and mounting points for holding rods that support the outer sphere. When this project first came up we were going to use a plasma ball but Steve told his client that he though we could do better, and get closer to the game artwork (we had no idea how tough that would be). At any rate, I wrote a PASM driver for the WS2801 (was pretty easy) and we gained control over 94 RGB LEDs. In the end there are two animations running on top of each other: one creates a swirling pattern and transitions from green to blue and back. The second creates a ring that traverses from the south pole of the sphere to the north pole and then bounces back. The ring animation takes the value from the swirl animation and swaps the green and blue channels. In the end it became fairly simple but looks really cool.
As the original idea was to somewhat mimic a plasma ball there are super-bright white LEDs in the core at the base of the support rods (which are interestingly textured with hot glue). I wrote a lightning simulation that runs on the available six channels of the HC-8+, again using Michael's PRNG object. It looked great. Then Steve asked, "Jon, can I have more lightning?" I was very tired (we had some long days in a shop that was over 100 degrees most days) so it took a moment, but then it dawned on me that I could launch my lightning method into a second cog (it's all Spin). Bingo, it looks fantastic!
I know that some old-timers are yawning and thinking, "Jon, it's just LEDs for Pete's sake..." Yeah, you're right. But if you could see the joy on the faces of Steve's crew when those things light up, you'd smile like I do. My simple LED lighting tricks add a bit of life to otherwise inanimate objects. And in the end when a Hollywood FX legend like Steve Wang gives me a high-five and says, "McPhalen, you made magic" well, I'll be happy to come back next summer and write even more LED code.
Most importantly, the client was thrilled -- so much so that they asked if they could have a second shop visit day for their art department (60 people!). On that day one of them approached me and asked what I did on the project. "I designed the electronics and programmed the animations." "Oh, cool. Did you use an Arduino?" "No... because 'Arduino' is Italian for 'junk.'" I didn't let the look of shock hang long on his face; I cracked a smile, told him I was kidding, but that the Arduino just didn't have the muscle to do what we need to do (especially as quickly as Steve always wants it). I had a spare HC-8+ with me and showed it to him, telling him about the Propeller. He said he had heard of Parallax, but didn't know anything about the Propeller. That last part I do not know how to solve....
Here's Tryndamere:
Yes, he's as big as he looks. If he were standing flatfooted on the floor without his helmet he would be 7'4" tall.
Admittedly, this one was pretty easy. I used an EFX-TEK HC-8+ controller (why not, I designed it) to control seven channels of LEDs. You'll notice that most of the lighting is in crystals are on the sword and in his armor. What Steve tends to ask for is a cyclical modulation of the lighting (ramp up, ramp down) with a "shimmer" on top of that. Assuming you have multi-channel LED dimmer that is compatible with byte values, here's how simple the code is:
repeat ' throb and shimmer repeat level from 255 to 100 outs.set(HELM, level + dither) outs.set(ARMS, level + dither) outs.set(JEWEL, level + dither) outs.set(BELT, level + dither) outs.set(KNEES, level + dither) outs.set(SWORD, level + dither) pause(8) repeat level from 100 to 255 outs.set(HELM, level + dither) outs.set(ARMS, level + dither) outs.set(JEWEL, level + dither) outs.set(BELT, level + dither) outs.set(KNEES, level + dither) outs.set(SWORD, level + dither) pause(8) pub dither return prng.random ~> (32 - 3)
Of course, we spent a little time experimenting with the low side value of the overall brightness and the dither setting. I really like Michael Rychlik's PRNG object (which implements George Marasglia's algorithm [see post, below]) and tend to seed it with Chips RealRandom object. The dither() method uses SAR to maintain sign so that it returns a signed value; by adding the dither and use a small delay the crystals "shimmer."
The eyes created a bit of a challenge. The aqua LEDs we used were incredibly bright and I couldn't get control of them -- to Steve's satisfaction -- with my standard dimmer code that is used for the other channels. After an hour of futzing I just pulled that channel from my standard dimmer and wrote a custom driver for the eyes. Steve wanted them to throb like everything else, but at a nearly imperceptible level. I ended up doing this in PASM; 20 minutes later Steve was happy.
The second character is called Ryze.
This one used two HC-8+s: one in the base (for the base and his eyes), and one in the energy ball. The eyes animation is very close two what I posted above. There are three channels in the base and I sequence them quickly to create a bit of a rotating look. That said, they also get the "shimmer" treatment (Steve really likes that).
The real fun was in the energy sphere. After banging our heads for a couple weeks we found an RGB LED strip that uses individual WS2801 drivers for each LED. We cut this into smaller strips and attached it to a core that holds the HC-8+ and mounting points for holding rods that support the outer sphere. When this project first came up we were going to use a plasma ball but Steve told his client that he though we could do better, and get closer to the game artwork (we had no idea how tough that would be). At any rate, I wrote a PASM driver for the WS2801 (was pretty easy) and we gained control over 94 RGB LEDs. In the end there are two animations running on top of each other: one creates a swirling pattern and transitions from green to blue and back. The second creates a ring that traverses from the south pole of the sphere to the north pole and then bounces back. The ring animation takes the value from the swirl animation and swaps the green and blue channels. In the end it became fairly simple but looks really cool.
As the original idea was to somewhat mimic a plasma ball there are super-bright white LEDs in the core at the base of the support rods (which are interestingly textured with hot glue). I wrote a lightning simulation that runs on the available six channels of the HC-8+, again using Michael's PRNG object. It looked great. Then Steve asked, "Jon, can I have more lightning?" I was very tired (we had some long days in a shop that was over 100 degrees most days) so it took a moment, but then it dawned on me that I could launch my lightning method into a second cog (it's all Spin). Bingo, it looks fantastic!
I know that some old-timers are yawning and thinking, "Jon, it's just LEDs for Pete's sake..." Yeah, you're right. But if you could see the joy on the faces of Steve's crew when those things light up, you'd smile like I do. My simple LED lighting tricks add a bit of life to otherwise inanimate objects. And in the end when a Hollywood FX legend like Steve Wang gives me a high-five and says, "McPhalen, you made magic" well, I'll be happy to come back next summer and write even more LED code.
Most importantly, the client was thrilled -- so much so that they asked if they could have a second shop visit day for their art department (60 people!). On that day one of them approached me and asked what I did on the project. "I designed the electronics and programmed the animations." "Oh, cool. Did you use an Arduino?" "No... because 'Arduino' is Italian for 'junk.'" I didn't let the look of shock hang long on his face; I cracked a smile, told him I was kidding, but that the Arduino just didn't have the muscle to do what we need to do (especially as quickly as Steve always wants it). I had a spare HC-8+ with me and showed it to him, telling him about the Propeller. He said he had heard of Parallax, but didn't know anything about the Propeller. That last part I do not know how to solve....
Comments
Paul
Just found this on YouTube:
-- http://www.youtube.com/watch?v=z3CsSj5c5wA
It's a slide show (no motion video -- yet), but does give more angles on both characters.
For those that missed them, these are the previous projects:
-- http://forums.parallax.com/showthread.php?134092-Hollywood-Fun-With-Propeller-powered-LEDs
-- http://forums.parallax.com/showthread.php?126553-Propeller-Powered-Starcraft-II-Marine
Every year we work to up the ante on lighting control; the energy ball really set the mark high -- next year should be a real challenge.
Crystal is a hardcore cosplayer; there's a neat little video with Steve and her at this link:
-- http://www.gamerlive.tv/article/firefall%E2%80%99s-mourningstar-gets-sexy-cosplay-crystal-graziano
Jonathan
P.S. I can't wait to see the video.
P.P.S. Well, I can wait, as obviously I have to...
Very impresive.
Whilst It makes me very hapy to see a few lines of my code make it to Hollywood (I guess many script writers would sell their souls for that) the credit should really go to the late George Marasglia who invented that stuff, I only reimplemented it. http://en.wikipedia.org/wiki/Multiply-with-carry
http://www.geek.com/articles/games/pax-2012-in-pictures-2012094/?page=4
are you allowed to upload a video showing the LEDs in action?
best regards
Stefan
If I had one I would have by now. Steve shot some video of the animations running in his shop the night we fine-tuned the programming. I'm waiting for him to post that so I can link to it.
-- http://youtu.be/YuSMKciw0J8
The guy with the beard, Cleve, is about 6' 2" so you can get an idea of how big this character is.