Thursday, 30 March 2017

Rendering is hard

Another great quote is "learn to laugh at yourself", which is why I decided actually do something with my github pages repo. In the laziest possible way, I am going to post stupid videos of my crazy attempts at doing something cool with OpenGL.

I've already managed to build a fairly usable deferred rendering engine and even cobbled together something resembling Physically Based Rendering, or at least the lighting works on some of the common aspects of PBR but one thing that has alluded me for far too long is how the Assimp library imports models with bones and animations.

The first step is only a tiny step of taking the ENTIRE data structure apart and hoping that when you put it into GL that it all lines up the way you hope *spoiler* it doesn't *spoiler*.

But there is definitely some real bits of model in there right? I mean you can see a head and things are kind of animating? After jiggling around the matrices a little and making sure that the multiple meshes in the data line up with the bone weights it looks like we're getting somewhere!

What the hell? If you look carefully you can see his finger tips are traveling across dimensions and ripping apart time and space! Also his hood is clearly not of this world either. Oh yeah, ASSIMP forgot to metion that some nodes have _$AssimpFbx$_ in the name if it can't match them or they are actually just identity or something, not entirely sure. But for a laugh I thought I could just detect those and strip that bit out leaving the original bone name in there. Oh look at that, it works. Don't really want to question if that is right :P

Sprinkle some interpolation between animation frames and BLAM! We have some animation!

Oh, did you want to blend between multiple animations, yeah that works too :)

Let's see what is next on the things I want to implement but don't understand list.

No comments:

Post a Comment