2022-01-03

Riders of Ark / Toothless mod updates finally!!! (Warning! Contains awesomeness!)


So… After half a year later, a new post! Sadly, it’s becoming a trend, but I hope there will be a time when I can focus on HTTYD-ish topics much more often than I can currently. Dread not, because I have some updates for you! The reason for the hiatus was (as always) work. From September to mid-December, I was working constantly from dawn to midnight without weekends… so you can imagine. Fortunately, I have a month of free time now, so I can do some progress!

Well ladies and gentlemen, around a year or so, I managed to made some major updates with my Toothless mod for ARK, so buckle up for some awesomeness! :D

Click on read more if you wanna see the updates.


Where should I start… that’s a tricky one. Let’s begin with the textures!

I think the biggest and most spectacular differences are the updated textures he has. I will make comparisons from my last “official” WIP release video Riders of ARK (take 2).

Watch this video first for a recap please!
Also, here's a link to the previous mod post: Link

a LOT has changed since then! (2020. 01. 13.)

Looking back now, I’m shocked how he looked originally. I remember he was looking “okay” with those textures at first, (or it was just the hype, that he's finally in the game) but now… ugh… they were very crude and unrealistic! Yes, I know the model and the textures are from a mobile game, so I can understand why he hasn’t got high-res textures just 512*512 ones, but we'll get there soon...

After I made the video, the textures were the first things that I updated anyway. I think you will also be shocked, if you see what I done to them!

Okay, let’s begin.


1. ENHANCE!

So… 3 months later after I managed to get him in game, a friend of mine (Imperator) showed me a very interesting video.

It's a kind of magic...

As you can see, now it’s possible to enhance a Full HD video into 8K and not just upscale it and call it a day, but like adding details that weren’t there before! Like in NCIS and all those crime investigation shows. You know, where there is a blurred image of a guy, but something's sus on the picture, so the magic word is being said by the detective: Enhance! Then the IT guru zooms into the guy’s blurred eye, then it becomes fully sharp by some weird, messed up alien tech algorithm, and after that again and again, until you can see a parking car’s license plate number in the guy’s eye reflection. When I've got into VFX 15 years ago, even then I knew this was all yak dung, and it’s IMPOSSIBLE(!) to enhance a digital picture like this! (With celluloid film it’s possible, and this is how they can restore old movies in 4K!)

Well… I’m not sure now, if still is. I was so amazed by that 8K Artificial Intelligence (AI) upscale video, I was like: Nooo… That can’t be done, it’s witchcraft! Hard to say, but I never ever expected to see something like this (well in my lifetime). Again. This is not a new render! It’s the original video upscaled and processed by an AI, to fill in the lost and blurred details from the upscaling. Absolutely game changing and revolutionary! This AI stuff is so sci-fi, so ahead of it’s time, it boggles my mind! Kinda feeling like cheating or something. But that vid got me an idea. What if I search for an online AI upscaling site and enhance my original 512*512 textures to something bigger… like 2048*2048?

I knew that AI probably was optimized for that video, and I shouldn’t expect such an awesome enhancement, but I was wrong! Believe it or not, it worked like a charm! A universal online image enhancer site can do wonders with low-res pictures!

See it for yourself! (Click on the images for bigger size! Also, you can use the cursor keys for a before/after experience!)

 
 (original diffuse map 512*512)

(512*512 sized map upscaled to 2048*2048 without AI)

 
(best AI upscaled 2048*2048)

I wish you could saw the awe on my face when I looked at the results! It was something like this:


I mean… Just look at the difference! Absolutely WOW!!! The most mindboggling part, what it done to the saddle's metal and leather parts! How on earth could it recognize and figure it out what pattern should be there, when there were only blurry patches? This opened sooo much possibilities, I can’t even comprehend! It can be such an amazing and powerful tool, for a lot of problems! I tried several other AI’s, but what I showed you was the best from them. Yeah, there were kinda bad and distorted ones too, but those are maybe good for other images. Oh, and do you want to know how much time it took to enhance™ the diffuse map? 10 seconds…

I've done this with the specular and normal maps too, then I corrected them a bit and imported back to the Ark Editor.

Original 512*512 "mobile game" version

Upscaled 2048*2048 "enhance™" version 

Of course, it wasn’t perfect, but a HUGE leap for doing some improvements later!

I used these maps for a few months and played a lot with them, but after a while, I started to miss the really subtle details. Like the bigger scales on his face, ears, limbs. So, I went maniac and slowly and with a lot of work, I added them into the maps. I also did a ton of tweaking on the colors, shaders, etc.

This is how he looks NOW! (2022.01.03.)

Upscaled 2048*2048 "maniac" version

Isn’t that amazing???!!! And it’s accurate on the scale level! He looks almost like in the series! (Not RttE good, but almost RoB/DoB good). If you wonder how I made this, I took some reference screenshots from the 1st movie and GotNF. (In my humble opinion, he looks the best in these two).

Here's a few, that made into the diffuse map. (There are more, but these are the most important ones)

I used this image for the scales on his right big ear, (his perspective) 

And the left one on this (I later merged with another
 reference to fill the missing scales).

This was used for the scales on top of his head,

And this, for the scales on front of his face.

This one, for the smooth scales on his neck and body.

In this, I managed to have his full wing(!) as a texture 
and now you know where it's came from! GotNF!

Here, I managed to have his full tailfin (the natural one).

Can’t get more accurate than that, right? :D Straight from the source! That is why I stated, it’s scale accurate. But it wasn’t easy! You can’t just simply ctlr+c, ctrl+v it and boom it’s done… no no no… This is an UV map, and you have to be very careful and precise on a pixel level, or it will look distorted and crap on the model! After I was quite happy with the scales on his face and ears, I started to work on his other body parts. I updated his legs, then his arms, then all his wings and prostatic tailfin and finally some parts of this torso. Very recently, I even updated his gorgeous(!) green eyes too, but more on that later.

Just to give you an idea, the latest version number of the diffuse map is v.74.0… So, quite a “few” hours went into distorting the new detailed textures to cover up the old ones accurately. It may look weird in the photo editing program, (I used After Effects) but in the game it becomes accurate! That is how UV maps work. I also know that my method was very inefficient, and surely who’s an expert in this, would have made this much quicker and more effective, but oh well… What I care is, I have my passion and love for Toothless and there is nothing that I can’t achieve with them, no matter the time or the cost it has on my sanity!

Another great tip if you want to mess around with maps or materials, there is a very cool and awesome site, where you can generate specular or normal maps from the diffuse map. (Here’s a link)

Note, you still have to fix them, because they are not always work in specific areas, but it is a very, very useful tool for a start! I also had to generate those too, when I made some major changes in the diffuse map and reimport them into the editor.

So, he looks now better than ever, but I always find something to improve on, so it’s not the final version!

Side note: Originally, I wanted 4096*4096, but the AI what made the 512*512 res texture to 2048*2048 pretty nifty, it made a lot of errors, mistakes and distortions at 4096, so I stuck with the 2048 size. Also, the first movie is only in Full HD, and there were times when the cropped image tiles were just fit without scaling up, so yeah… 2048 it is… Well, maybe I’ll try a 4096 version when it’s fully completed, but we’ll see…


2. Toothless lost, but later found!

In the previous post I mentioned, I had some pretty serious problems with him in game, like he completely ceases to exist when you restart the server! This was extremely annoying, and when I played with him with my friends I had to always, ALWAYS(!) double/triple check his inventory before shutting down the server, cause sometimes my friends stored their items in his backpack. Fortunately, because of my awareness on this problem was always on my mind, when we played, it never caused unrecoverable loss, but if someone wouldn’t know about this and expect he will stay after a server restart and if all of his/her important belongings were in his inventory and now is lost due to this, he/she would be very pissed! I’m happy to announce, that this problem has been eliminated!

The solution was very interesting though…

When I started working on him in Ark Editor, I used a tutorial from YouTube (a guy makes a modded Sarcosuchus) at the end, he was adjusting the spawn locations and parameters. I totally skipped this, because I didn’t want to see random wild Night Furies (with a saddle) flying in the game. He is unique! So, I unchecked even the possibility to spawn on the level naturally. Now I know, that caused the whole disappearance kerfuffle! The game got this literary! Even if he got spawned by an admin command, the game deleted him because of this. So, I had this idea, went back, made him spawn, BUT with a 0% chance (haha) and it worked! See, this is a perfect example how ridiculous the editor’s logic is sometimes and with no tutorials or comments, it’s almost impossible to track down the root of the problem! To my surprise if it was just a random thought, but I was amazed that it worked out eventually!

By the way, this was just ONE(!) of the dozens of similar issues so far, that I had to deal with and could only use my experience or intuition to fix them! (And of course passion.. Lot's of it!)

Oh, and I have to give some credit to ARK, because when I make a new mod version and delete the previous one from the server, I didn’t have to spawn him again from a fresh start, it keeps him with everything in him with his stats and it just updates him with the new features like nothing happened! Very, very cool feature ARK, I hope you keep this good habit in ARK 2!


3. In a blink of an eye

This issue was also mentioned in the previous post. He couldn’t blink or done any facial expressions.

I mean… I tried SO HARD(!) to make him blink, but whatever I came up with, all resulted in failure after failure. Nothing worked! Countless hours of trial and error went into waste, only with results what doesn’t work. I started to have this gut-wrenching feeling, that Toothless most likely will never be able to blink in Ark. Somewhere deep, I knew and dreaded the fact, that it’s kinda my “fault”. Let me explain…

What I figured out in the past was, all of the creatures in Ark used bones to manipulate the eyelids vertices. (Remember my teachings on character animation in the updated Toothless model post? It will be quite handy for this topic, so I encourage you to read that before this segment, because it's gonna be a “little” technical. Here’s a link).

The problem was, I made all the animations (81 of them in 3ds Max) with a skeleton that hasn’t got the “eyelid bones”. Every core animation was in a separate .max file.

In Ark Editor the first step is to import your rigged character as an .fbx file. The editor figures out the data of the skeleton, the mesh and later the animations. But at the first step, whatever mesh/skeleton you start with, that will be the reference! 
And if you later (like me) want to add some extra bones for more control and detail well, you’re pretty much fudged! When I reimported the skeleton in the editor with the “boned” eyelid one in order to be the new reference model from now on, it distorted poor Toothless in such ways, that was utterly disturbing and even painful to watch! Believe me, you don’t want to see those pictures!!! (They will keep haunting me for a while, though…). What I thought was happening is, it conflicted all of the other animations which doesn’t had the boned eyelids, so the editor freaked out and messed up the mesh and almost all of the bones. That would mean in order to make the boned eyelid version (might) work, I would have to manually update every single animation one by one, adding those bones to the eyelids, which is a very precise step and also, I mustn’t mess up even one vertex when doing the linking! Speaking of 81 custom animations in separate files… I think you get the point. It’s an absolutely insane amount of work, also very unpractical and nothing guarantees that it will work! This is why I felt guilty, not having those bones right from the start!
But, before I gone berserk and manually add them, I tried a lot of attempts, testing various settings in the FBX export/import side, experimenting with the bones pivot points… argh.. I could sit here for a few hours and just talk and talk what didn’t work, but that would be quite boring right? Instead, I’ll show you what might can work!

It was a very recent discovery. It all begun with my VR Chat avatar. Here’s an image of him.


My friend TCIaS (who I can thank the Toothless necklace, I mentioned him in that video) has got into Unity (a game engine like Unreal Engine) and got pretty experienced with it. I wanted to update that model too, and he helped a LOT with it! (Thank you again TCIaS, you’re awesome!!!) It turned out pretty quickly, that the VRC model was the same as the Wild Skies one what I use in Ark, but it was heavily modified. (I would love to talk with that person who made it, I’m sure he/she could teach me one or two things about character modelling and rigging, that’s for sure!) We made such progress in 2 hours, that would take days or weeks in Ark Editor! And one of the best things was, that the updated Ark textures were 100% compatible with the VRC model!

The next day, I started to update the textures and optimized them for VRC.


I would say… Now he looks a “little bit” more realistic. :)


BUT! I saw something in Unity that changed everything! Look at those controllers… aren’t they familiar? If not, then you didn’t read my previously mentioned post… and you’re making me and Toothless sad. :(

It’s our old friend, control slides or morph operators! So, VRC use vertex-based animations for the lip sync, facial expressions and blinking! Now that’s very interesting! I thought it used bones, but nope. I even exported to 3ds Max to make sure and yep, morph operators! Now we’re getting somewhere… and then I realized… Oh My Thor… These are not bones, just operators and most game engines use this (Source Film Maker also) and this might be the way to go! I quickly looked up is Unreal Engine 4 support this legacy way of animation? Hell, yeah it is! Okay, time to do some testing! I went crazy and tested straight 10-12 hours a day to find a solution to the issue. But there was a problem (as always). In the beginning I imported an earlier version of my awesome 3ds Max skeleton model (NightFury.fbxwhich didn't had morph targets, because it was only a test and I didn't want to complicate things further… A test, that become an almost working perfect mod… I tried to make the blinking morph target model again from ground up from the later existing reference model (which was now the Toothless-Idle animation.fbx). When I imported, it kinda worked, but it moved some vertices that wasn't suppose to move. So that’s a fail… 
The next idea was to merge my awesome all-capable Toothless model (what I should have been using since Day 1(!)). It has like 20-ish expressions (I made them years ago, and it took me a while to make them). Did it work?
Of course not! It turned out there was a mismatch in the vertex numbers.

The Ark original reference model has 10296 vertices, and my awesome 3ds Max model (somehow) has only 10220. Not much of a difference and also, it’s the same model, right? Wrong! In morph animation, the source model and the morph target model have to have the EXACT same vertex count! Even if one missing, you can’t use it or import it to the source model. All of my 20-ish facial expression morphs were useless for this… great (it still usable for 3ds Max animations). But one question still hanged in the air. Why keep my recent reference model moving vertices that shouldn’t be moving? And I know sure, I didn’t touch those vertices! Now my friend, here’s a little funny thing about Unreal Engine 4. It doesn’t forget! Somehow it memorized my failed attempts and in the skeleton tree, I could see the eyelid bones, even after I revert them back to an older state!!! Which means, somehow still used those updated models skeletal info, while they shouldn't exist anymore! (If your brain starts to hurt don’t worry, mine too!) So… I loaded my first “test” reference model (NightFury.fbx not the Toothless-Idle.fbx) I crossed fingers, prayed to every single God or entity that exist, took a deep breath and prepared the worst, another messed up Toothless model… but you know what? It worked!

Yes! That was the solution! I had to revert to the original reference model and in Max had to do the morph targets for that specific model! So, I went a 3rd time to make a blinking one from scratch and voila, now I was able to import back the model with the morph, without any distortions! Hell yeah!!!

But then! Another idea got into my mind! What if I use this morph target technique for his eyeballs? I tried it and it worked! You know what that means? This dear, beautiful, awesome Toothless model knows something that the Ark creatures don’t. Eyeball "tracking"! (Yes, I could praise him all day! :))

So, I can rotate his eyeballs with a morph operator. And whatever direction he looks, he’s not just looking straight forward anymore, but follows you with his pupils! (Well, kind of...

What’s even better, it manages to apply the reference model’s morph target(s) to the other animations too!!! In the editor you can customize what facial expression go to which animation sequence. You can also mix a lot together! It was almost coming true, but I only could see in the preview window, and it doesn’t wanted to apply to the animation sequence. So close, yet so far… After some experimenting, I finally managed to stick the morphs to certain animations! That… Triumph I felt!!! It was like winning the Olympics (no joke!) Absolutely overwhelmingly awesome feeling! A problem that haunted me for about 2 and a half years, finally got fixed!!!

Here, take a look! (No pun intended… or is it?)

Without morph targets

With morph targets

Also, the blinking was resolved a few hours later, after I finished celebrating my victory. It took literally 5 minutes, to manage the randomized in game blinking to work from there on. 
See guys? Sometimes better to think before you act. I could have gone berserk, going in every single animation sequence and fix the eyelids, or becoming crazy who can’t stop thinking on alternatives. But I’ll still take crazy over berserk any day of the week.
(It matches with Hiccup's ending line in S01E15 Twinsanity! Ok… that was waaay too nerdy…). I wonder now, how much time would had to pass to get this morph operator thing struck me as an idea randomly? Probably a few weeks/months later… who knows.

But the point is, finally HE CAN BLINK! (I even captured the moment of truth on video, when I was pretty confident that it'll work this time!)

Caution! Nerdgasm sounds!


Also, I won a plus feature, eyeball rotation!

It's... sooo... HIM! 
(Pretty shame, you see almost nothing of it in game... but the details are there!)


Fun fact: Remember, when I mentioned this might happen in the previous Ark update post?

I quote: “He also can't blink. […] Still no tutorials, no info, so I have to figure it out myself. (As most of the time).” Damn right, I figured it out!!!

Now that his eyes aren’t taboo anymore, I should definitely make his (already) beautiful, gorgeous green eyes even more accurate and lifelike! So, after a few hours of tweaking, I managed to improve them! I even “coated” with a reflective shader, to look watery!

See the pictures below! (Make sure you click on them!)

Ye olde eyes

The new eyes

Well, this segment was a "bit" longer than a blink of an eye, but I'm so happy, that I could include it in this post!

Thanks again TCIaS for helping me with VRC Toothless and realizing the morph operators!!!
I owe you one! ;)


4. Nice profile picture!

I just made this cool little update yesterday. As you saw in the video, he has a custom avatar on his info panel when you approach him. After I improved his eyes, I wanted to clean up that image too. It was based on of a desktop wallpaper. (One of my favorites!)


Here’s an Allosaurus's avatar for example:


As you can see, the styles don’t really match. It's pretty obvious that my version wasn’t drawn, it was a rendered image of him and modified to look similar to the other creature’s avatar. Because of the details and the shaded colors on the original picture, it got pretty messy when I applied the cartoon effect. It was good for a start, but now it really got outdated.

When it happened to have a few hours of free time while I was working constantly at my office around 3 months ago, I started to draw Toothless again. It also happened to pick a similar image! What’s even better, is that I made scans and photos of it, before I've done the deep shadings and details, so I already had a fairly good quality REAL hand drawn version of that picture, I wanted to be the new one! What a coincidence!

(Click on the image for bigger size)
 
Btw, this is how my office space looked like, with the finished drawing. (At least the environment was pleasant).
 
 I'm not obsessed, at all... :)

Anyway, after a few hours of messing around with advanced alpha channel magic, it turned out like this:


The original one isn't just a static image though! It has a pretty well optimized alpha channel in it's core and in game the cyan color pulsates, mixed with a noise map in the background. 

I also bumped the resolution up from 256*256 to 1024*1024!

Much more professional and immersive! Oh, and it’s an exclusive drawing of Toothless personally from the modder himself! :)


5. IKon of Sin

Umm… yeah. Unfortunately, I can’t bring any good news on this issue. 

He’s Inverse Kinematics (IK) still don't work. I investigated quite a bit and find a few clues that why it doesn’t want to work, but now after all these triumphs, I’m quite optimistic and confident with this one. It’s just a matter of time really. 

Alas, future Mr. Night Fury… Can you write down the solution below? I’m so freakin’ curious, but also it sucks that I can’t read it just now! Dx That would help me a lot! Damn you time!!! Why so linear???! Okay, I shut up….


Future Mr. Night Fury’s solution:


(Hmm… seems like, I still have to wait. Darn! Or should I go and figure it out myself? And maybe that will be the solution above?! Ok… I really stop now! :D)


I just realized, I’m at the eighth page in Microsoft Word (again)! Well… quite a post, isn’t it?

There you go, these are the recent(?) updates on my Ark… Toothless… mod. There are some issues still that got to be fixed, before I can even start thinking of a public release, but while he doesn’t get a proper IK system, and I fix some other miscellaneous stuff, he’s a no go! Sorry, I don’t want unfinished versions spread on the net which could cause all kinds of problems later, auto-update or not. I’m a perfectionist here!

I will release it... well… When It’s Done! Get it? It's just like Duke Nukem Forever!
(Technically, it didn’t took forever to finish it, only 12 years! :D)

Last but not least, I want to thank Toothless for all the things I learnt so far, because of him!
I can’t thank you enough Bud! You are truly amazing and I would do anything(!) for you!

Oh… and we didn’t finished Toothless… We just only began!

No comments:

Post a Comment