Tupac Shakur was the star performer at the first weekend of this year's Coachella music festival in California — despite the fact that the hip-hop legend died more than 15 years ago. The late rapper surprised, delighted, and creeped out the crowd by appearing through a convincing, though slightly unsettling, hologram alongside the real-life Dr. Dre and Snoop Dogg. (Watch the video below.) What did the 100,000-plus festival-goers make of this "astonishing" illusion, and how was it pulled off? Here, a brief guide:

What exactly happened?
A holographic image of the rapper, who died in 1996 after being shot four times in Las Vegas, joined Snoop Dogg to perform the hits "Hail Mary" and "2 of Amerikaz Most Wanted." The "resurrection of 'Pac" even addressed the crowd and bantered with Snoop, capping off his stunning entrance by asking, "What the fuck is up, Coachella?" The surprise was "effective enough to both stun and freak out thousands of festival-goers of varied states of sobriety," says Leah Collins and Rebecca Tucker at Canada's National Post. A video clip of Tupac's performance went viral almost instantly. 

How are fans reacting? 
It was "shocking and unsettling, but also imaginative and, well, awesome," says Tim Molloy at The Wrap. The stunt isn't just the highlight of this year's Coachella festival, but will likely be the concert moment of 2012 — "and perhaps all-time," says Collins and Tucker. Still, "the whole thing seems downright creepy," says David Haglund at Slate. Especially when Snoop Dogg interacted with the hologram as if it were a real person.

Who made the hologram?
The visual effects factory Digital Domain Media Group, which also produced the Oscar-winning virtual versions of Brad Pitt in The Curious Case of Benjamin Button. The Tupac image was created on a computer, piecing together physical characteristics and movements from the performances recorded before the rapper's death. Advances in computer graphics and audio trickery were used to create fresh movements and new dialogue. No detail was glossed over, with the late rapper's signature tattoos, jewelry, and body movements all incorporated into the hologram. "This is not found footage. This is not archival footage. This is an illusion," says Digital Domain's Ed Ulbrich.

How was the image projected?
San Diego-based AV Concepts staged the hologram's performance using a variation of an old effect called Pepper's Ghost. The technique was first used in an 1862 dramatization of Charles Dickens' The Haunted Man and the Ghost's Bargain, employing an angled piece of glass to reflect a "ghostly" image of an offstage actor. In Tupac's case, the computer generated image was projected onto a highly reflective piece of Mylar stretched on a clear frame. AV Concepts has used similar visual magic before, for Madonna, the Gorillaz, Celine Dion, and the Black Eyed Peas. The company has also used the technology to resurrect dead CEOs for corporate events.

Whose idea was this?
It was the brainchild of Dr. Dre, who contacted AV Concepts four months ago with the idea. Originally, recently-deceased rapper Nate Dogg was supposed to appear via hologram as well, but the idea was scrapped at the last minute. The company won't reveal the illusion's exact price tag, but says that it was in the $100,000 to $400,000 range, and perhaps more.  

What's next?
Tupac will make at least one more appearance at the festival next weekend. And according to The Wall Street Journal, a virtual Tupac tour may also be in the cards, with Dr. Dre and Snoop Dogg reportedly in talks to go on the road with the hologram. "Dr. Dre has a massive vision for this," says Ulbrich. Perhaps we should prepare for a trend of reanimating dead celebrities for live performances, says Raju Mudhar at The Toronto Star. That would be a real "windfall for the estates of deceased performers." This technology could even be used for reunion tours for bands in which a member is dead. Could a Michael Jackson resurrection tour be in our future?

Check out virtual Tupac: 

Sources: CBS NewsLA Times, MTV, National Post, Slate, TMZ, Toronto Star, Wall Street Journal, Wrap