CDPR reveals the science behind The Witcher 3's dialogue animations

CD Projekt RED reveals a unique algorithm generator it used to create The Witcher 3's 35 hours of dialogue.

Published Sun, Mar 20 2016 11:08 AM CDT   |   Updated Tue, Nov 3 2020 12:00 PM CST

I've always thought that one of the best things about The Witcher 3 is the way the characters feel so believable, and the dialogue interactions went far to add that extra spark of immersion and magic to the game. Contrary to popular belief, CD Projekt RED aren't actual wizards--their sorcery is built around code and algorithms rather than grimoires--and the studio reveals how it spun those magical dialogue sequences.

CDPR reveals the science behind The Witcher 3's dialogue animations 6 |

At a recent talk at GDC, CD Projekt RED animation technical director Piotr Tomsinski discussed the science behind The Witcher 3's natural character dialogue. Rather than animate each individual scene by hand and piece together the dialogue, the devs utilized a rather powerful algorithm that compiles different ingredients like location, character type, and dialogue into a fully animated scene. Since the game has some 35 hours of dialogue alone, handcrafting each individual scene with custom mo-capture sequences would take an eternity.

"The generator requires three different types of inputs: information about the actors, [some cinematic instructions], and finally the extracted data from voiceovers," Tomsinski said at the talk. "We use an algorithm to generate markers, or accents, from the voiceovers, so later we can match the events in animation with the sound. It generates camera movement and placement, facial animation, body animations, and the lookats."

CDPR reveals the science behind The Witcher 3's dialogue animations 7 |

Using this generator, the devs could easily click a button and recreate scenes over and over until they find something they like. One of Tomsinski's slides compared CDPR's dialogue generator to Lego bricks: "one set of bricks, many dialogues". The generator doesn't always spit out a finished product, however. The devs still have to go in and touch-up the scene, but some of the lesser one-liner dialogues don't need touch-ups.

"It sounds crazy, especially for the artist, but we do generate dialogues by code. The generator's purpose is to fill the timeline with basic units. It creates the first pass of the dialogue loop. We found out it's much faster to fix or modify existing events than to preset every event every time for every character. The generator works so well that some less important dialogues will be untouched by the human hand."

I absolutely love seeing the science of game development magic laid out like this, especially when we get to see CD Projekt RED's spellbook. The devs are absolute masters of their craft, and I bet we'll see this kind of algorithm used in Cyberpunk 2077 and the studio's new unannounced game coming later this year.


Derek joined the TweakTown team in 2015 and has since reviewed and played 1000s of hours of new games. Derek is absorbed with the intersection of technology and gaming, and is always looking forward to new advancements. With over six years in games journalism under his belt, Derek aims to further engage the gaming sector while taking a peek under the tech that powers it. He hopes to one day explore the stars in No Man's Sky with the magic of VR.

Newsletter Subscription

Related Tags

Newsletter Subscription
Latest News
View More News
Latest Reviews
View More Reviews
Latest Articles
View More Articles