The fantastical creatures in “How to Train Your Dragon 2” were designed to share characteristics with real-world animals. (Dreamworks Animation)

Dean DeBlois isn’t crazy — he knows dragons aren’t real. But the writer-director of “How to Train Your Dragon 2” (and co-director of the 2010 original hit) has spent years with the flying beasts, and he clearly has them on the brain.

“They’re real to us,” DeBlois says of the creative team behind the animated films. “The longer you live with the dragons, the more specific their personality becomes. Someone might pitch out an idea of ‘What if Toothless [the central dragon] were to do this?’ and we would collectively say, ‘No, that’s not Toothless.’ We know enough about Toothless as a character now to know what would be right and something that wouldn’t work.”

The sequel, out Friday, picks up five years after the first film. Hiccup (voiced by Jay Baruchel) and his Viking clan are living in harmony with the dragons (who spent most of their time in the first movie torching the village). Hiccup and Toothless in particular spend their time traveling to now-accessible distant lands; they eventually find an island populated by injured and rescued dragons cared for by the mysterious Dragon Rider. The storyline caused a problem for DeBlois and his team — well, a lot of problems, since each dragon is unique.

“We created a system where our designers were able to take different bodies and different heads and different necks and different tails and make them sort of a mix-and-match system,” DeBlois says. “It was like a Lego set.”

Then each one had to go to the animators, whose job it was to make the dragons fly — but believably.

“We want the dragons to feel like they’re a part of the animal kingdom, so we reference a lot of animals in the dragons,” DeBlois says. “One might act like a walrus while another one might act like a parrot. Stormfly, Astrid’s dragon, is very parrot-based in her movements, but we also combined it with the fetching qualities of a dog, so that makes it an interesting combination.”

But “How to Train Your Dragon 2” isn’t just about watching dragons fly around; it’s a more adult story than the first one (with scenes that may be too emotionally intense for the under-5 set). That goes not only for Hiccup, who’s feeling pressure to step up and succeed his father as chief, but also for Toothless.

“They’re both coming into their own, both reaching a point of maturity,” DeBlois says. “Physically as well as personality-wise, they are defining themselves. It’s as much a journey for Toothless as it is for Hiccup.”