Monday, 18 December 2017

Level generation

Time to start putting all these bits together, the prefab editor is coming along nicely and we need to start thinking about how those prefabs join together to procedurally generate levels.

The levels have a 'widget' that is placed at the join points for each prefab, this gives hints to the generator where to join the next prefab on, then its a simple bounds check and rotation to connect bits of the level together.

Oh yeah, probably need to stop/limit the amount of prefabs to join at some point, otherwise we just keep going in one direction until we hit the max prefabs limit. Ooops

After adding a branch limit, might as well 'cap' off the end of a branch if there is room.

Finally, the editor now supports setting the bounding box for the prefab by hand, so that we can tighten the bounds to the join points, otherwise bits of the model like the rocks under a platform could make it hard to join a section onto anything else.

Still some possible bugs lurking around but its now building some fairly interesting levels, next we need to build a lot more prefabs =D

Sunday, 12 November 2017

Player movement / animation

Now that things look fairly nice, how about we actually try to make some progress on the actual game? Using the physics collision and picking system from the editor we can throw one of the creatures in there and have him run around a bit =D

He has a little trouble climbing steep stairs but not a bad start at all.

And some animation states for good measure... ROOOAARRR!!

Tuesday, 31 October 2017

Editor Part 10

Now that we've got a fancy Image Based lighting setup, lets update the editor and try out some skyboxes..

Sunday, 29 October 2017

Image Based Lighting / Materials

Time to dive back into some rendering tech.

Image Based Lighting, a great technique for cheating. We all know GPUs are incredibly powerful right? Well they still just aren't powerful enough so we'll have to do some more approximation cheats again.

Take a nice skybox, blur the crap out of it (technical term) and project it back into your scene and based on your nice BRDF material system you can apply some of the sweet skybox colour and get some pretty decent looking lighting quite cheap.

Then when you realise you aren't using smooth normals on your models, it'll look a little better :P

Finally add a smattering of SSAO and voila, not bad.

Thursday, 21 September 2017

Editor Part 8/9 - UI Sliders!

The UI element train keeps on barrelling down the track, hello UI sliders, so simple, so obviously needed. The power!

And a new bit of level to play around with, a town area maybe?

Sunday, 20 August 2017

Editor Part 4/5/6/7

Yeah yeah, fell behind a bit on the dev log bit but lets move past that eh?

Lots more work done on the editor. Placing lights, being able to "pick" them and move them around, aww yiss.

Drag selection for all the entities..

Rotating around each axis and cloning! All things that QuakeEd had 20 years ago :P

Oh my, looks like some proper(-ish) ui elements and an example of a level layout.

Sunday, 2 July 2017

Editor Part 3

Lights are now movable, wasn't too bad. There is now the concept of 'helper' objects you can attach to a light so you can represent a light with some basic geometry and have a picking target.

The next issue will be to work out more finer grained picking, the current picking uses AABBs for the models, so if a model has a tall point, the top of the AABB is pretty high. This causes issues with trying to pick objects inside its bounds.

The question is whether to build some kind of picking stack to allow you to move further down the targets hit by the ray, or wait until the physics engine is plugged in and I have better collision detection on the models.

Thursday, 29 June 2017

Editor Part 2

The slow plod towards a usable editor continues, look at all the movement and stuff! You can even throw random lights in at the cameras position, not that you can move or even delete them yet, oh yeah because I didn't think about having some kind of picking for lights, because who needs that eh?

Wednesday, 14 June 2017

Dithering About

The great graphics lie continues! You put all this effort into rendering stuff in high dynamic range, funky tone-mapping, fancy bloom effects and all that jazz and when it comes down to it, you have to smash all that quality into a 8-bit per component image for your monitor to display. The real victim of this bit-depth massacre is our poor flat shaded gradients, just look at that horrible banding -

Turns out, just like everything else in graphics rendering, you can cheat! Also turns out that dithering is still a thing :P

By applying just a smidge of noise to each pixel after your gamma correction can work wonders.

Monday, 22 May 2017

Keeping warm

There comes a time in every little renderers life when they just want to savagely waste CPU and GPU time by throwing hundreds of completely throw away sprites on the screen. Today is that day, break out the marshmellows.

Thursday, 4 May 2017

Editor Part 1

Stage one of building an editor. Oh I know this is going to be a long painful process :P

Wednesday, 3 May 2017

"And they call it a mine!"

If they do, then they are wrong. Its what happens when you render the wrong model as walls :P

Wednesday, 12 April 2017

Building blocks

Armed with some basic model instancing and some actually usable assets, there is almost something resembling a "level".

Obviously we can't just have a grate in the floor without some lava underneath it now can we?

And of course, a nice little goof, when all your models have the same properties and you forget to change the controller pointer to the right one.

Tuesday, 11 April 2017

An army worthy of Mordor

Is it too cliche to have a flat plane with a scrolling texture on it for fluids? Maybe.. maybe, but you have to start somewhere.

And isn't it fun building a nice bit of code and forgetting that you want to instance it? It caused good mental anguish when I put all the drawable information about a model in the model class, what if you wanted to use the model twice? doh. Hello instancing.

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.