Jordan Bonser
  • Home
  • CV
  • University Work
    • Second Year Work >
      • Top-Down Shooter
    • Third Year Work >
      • Terrain Analysis Project >
        • Terrain Analysis Tool
        • Game Demonstration
      • Post Processing
      • Android Application - Sports Centre
  • Projects
    • Unity Development >
      • Lerpz Tutorial
      • Dare to be Digital Entry - "Lit"
      • Unity Game
    • Geometry Instancing
    • Road to Eldorado
    • Level Editor
    • OpenGL Work
    • JBEngine
  • Blog
  • Tutorials
    • Flask Session Timeout

Development Blog

JBEngine: Level Editor Export, Artwork and Library updates

18/8/2014

0 Comments

 
Okay so I really haven't managed to get much done in terms of coding but I have learnt quite a bit that will hopefully be very useful.

Okay so I started off by creating the Export part of the Level Editor which means I now have a full pipeline for level production, I can create assets, place them in the scene and then save them to an XML file. This XML file can then be either imported into the Level Editor again for further work or can be used in the game. 

Artwork

I have been getting used to using 3DS Max and I have become much more efficient with it, learning to model and texture objects. I have also learnt to use the biped tools to create simple walk and jump animations. 

This is when I ran into some troubles as when I exported my model to collada I couldn't get the animations to export properly. I initially thoguht this was an issue with my engine but as I tested the animation in two other assimp featured model viewers I decided it was an issue with the file format. 

To combat this I decided to try and export the model as an .FBX which worked with the modelling programs. .FBX is only supported in the newer version of the assimp library that I didn't have at the time so it was time to update the library.

Updating the Assimp Library

Okay so I set off downloading the newest version of the assimp library. The first time I compiled assimp it came with a setup visual studio solution so I simply had to compile the program and it would create all the files for me. 

Since then they have decided to go for a CMake alternative as it is the most cross platform approach and I'm guessing take the least work on their part. 

I had never used CMake before and was a bit worried about using it as it all seemed overly confusing. After reading up a bit on the internet about Make Files and how to use CMake I finally managed to get the assimp library to compile. 

It was actually not as difficult as it first seemed and I will will more than likely use it many times again with other libraries that I need to update. 

As a final note I still haven't got the character to display properly as there is an issue with how the bones are setup in the engine. I know this file format does work as it has worked with the model viewer so I will just need to do a little more debugging to figure out what is going on. 

I really need to get something demoable very shortly as this is making me lose motivation some what. Once I have my character model in and walking round I will feel much better. 

Cheers :)
0 Comments

Animation Blending Design

12/1/2014

0 Comments

 
I have finally implemented the design for the Animation blending, along with bone masking and animation fading. It has taken a while to get it all straight in my head, I also fixed some small bugs with the current animation loading/playing. 

This new design has an "Animation Blend Group" associated with ever Mesh Instance. Animation Instances are added to the Animation Blend Group and each cycle the Blend Group goes through all of its Animation Instances and calculates the Final Pose from this. 

To achieve the bone masking there are now some extra optional data that you can supple to the loading of a model. This allows you to apply bone weight to a specific bone in a specific animation. 

The animation fading can also be specified on load but in the future I would like to be able to change this so that you can change the fade in and out values per animation instance. 

Okay so I've talked about it, now here is the outcome: 

There are still a few alterations that could be made to the bone weights and the fading in/out values to make the blending more realistic. I think this has been a good starting point as this model is not one that I can alter, forcing me to make the code as flexible as I can to alter the animation data. 

The next step really is to create my own models that I can use for the game, although I am still lacking in the 3D modelling department and it may take me a while. 

As an added note I will soon be working on Font Rendering to progress the development of the GUI for my engine. This will then give me a chance to create a small executable for testing out different bone weights and fade in/out values. 

Progressing well, 
Keep coding :)
0 Comments

Simple Blended Animation and GUI Improvements

24/12/2013

0 Comments

 
I have now managed to get a very simple implementation of blending two animations together. I created a snowman in 3DS Max and applied two animations to it, a slide forward (since snowmen can't walk) and a jump. This didn't take long at all to get a simple version working but it is lacking a lot in design which is my next major step. 

Unfortunately my artistic skills are pretty poor and I have been trying with no avail for a while to create a simple character with walk and run animations. This would allow me to properly test the blending, introducing fade in/out values and blend points. 

As the art has been taking me so long and I needed a break I decided to tackle some low hanging fruit( Double Buffering ). This was already partially implemented but could really do with some wrapping up in preparation for the next task after animation( GUI/Fonts ). I have now created a double buffer object that has two framebuffers and that object deals with switching between the two buffers and allows you to get at the Texture associated with them. Once the double buffering has finished rendering it is finally rendered to the default buffer to present to the screen.

Using this I have laid the foundations of some core GUI classes, the first being a GUI Layover, which is basically just a full screen texture like a HUD. User Interface design is such a large part of a game that I will be approaching this with a lot of care to try and create a flexible design that will easily allow me to create, draw and interact with the GUI components. Anyway I have been babbling on for too long here is the video: 

The video has two layovers active, the writing and the boxes on the top and bottom and also a blue gradient from the sides. This gradient effect is similar to how some games visualise damage being taken but is normally a red gradient. 

Next few things are getting my artistic finger out and produce a model I can actually test some of this blending with properly. Could also potentially add sound into the engine as that is low hanging fruit as well.

Much more to come, hoping to get some done over the holidays in between the alcohol and merriment but it is unlikely.

Merry Christmas :)
0 Comments

Loading Multiple Animations

18/12/2013

4 Comments

 
Since finishing the first working version of the animation I started testing out different file types and cleaning up a lot of my code. Since then I have been attempting to implement multiple animations and animation blending.

First off I have created an "AnimationTrack" class which hold all the keyframe data for one animation regarding one bone. That is slightly confusing to say, basically the bones no longer hold the keyframes for an animation, instead they have a number of tracks which hold the keyframe data for each specific animation. This way multiple animations can be realted to one bone hierarchy. 

Second of all I needed some way of importing multiple types of animation, which wasn't so easy. Assimp supports multiple animations and with the right files it is fairly straightforward. The problem is that I am using 3DS Max and ideally collada files for all my models and the combination of the two has been a pain. Apparently 3DS Maxx doesn't allow you to easily export multiple animations in one collada file(Why?? I have no idea!!). This meant I would either have to use a different file type such as ".x" or find some way to get around this issue. After some searching I found that there are ways in which people have had to get round this before, specifically for importing into the Unity Engine.

The way in which unity deals with this is to have all animations represented on a single timeline in 3DS Max and then using the Start and End KeyFrames breaks the animations up when loading. Personally I don't like this as it means you can't just load a file and it will all work perfectly. 

The approach I thought of was to have seperate collada files all with the same bind pose model but with different animations inside. This way when the file is loaded it will check to see if the model already exists and if it does just check to see if there is a new animation and just load that. That way all you ever have to do is load as many or as little files as you need, i.e. the animations you will need and you aren't altering one file all the time to change one animation. This approach has caused more trouble than I thought, mostly due to 3DS Max once again. Max was naming all the animations the same when being exported and also often didn't supply a name for the RootNode of the scene, which was what I was using to check the model was the same.

Ideally I would want my approach to work but I decided I had spent too much time on it and instead implemented the "All in one timeline" approach. I have now got this working and although I do have to provide extra input it works fairly well. There is more than likely going to be extra input for things like bone masking and specifying blend points so It doesn't seem too bad, also it seems to be the standard way that artists do it so that is always a benefit.

I have got the animations loaded in this manner now, although there isn't much to show. I should shortly have a demo of multiway blended animations.

Keep Coding :)
4 Comments

Skeletal Animation Completed!

20/11/2013

0 Comments

 
Here it is, I have finally finished Skeletal Animation. It has been a long time coming but I have polished it off at last.There were a couple of things that tripped me up and I managed to spot them by simplifying everything down and using a basic 3D model of a cylinder with just three bones, bending in one direction. This is some advice I would give to anybody that is trying to implement this. I think one of the main reasons I didn't do this to start with is purely because of the amount of time it would have taken me(I attempted it a few times in Blender). I had to bite the bullet eventually but I created it in 3DS Max and had it created within about 10 minutes. Just goes to show you the difference between an intuitive and non intuitive UI design. If anybody wants a copy of this model it is here:

Here is the Collada Version and the 3DSMax Version

The two bugs I found were both to do with assimp in some way. Firstly there was a flag I had set for the importer "aiProcess_FindInvalidData" which was causing any Keys from ym keyframes to only appear once if they were the same through the entire animation. After changing this the animation was almost perfect but a few of the bones were still off quite a bit.

This comes to the second issue I had which was from the assimp documentation telling me that the transformations for the Key Frame should be applied as: Scale * Rotation * Translation, when in actual fact I had to change it to Translation * Rotation * Scale. 

Anyway enough of my ramblings, here is the finished product that shows the model finally animating correctly:

This project has taken me quite a long time and I think that if I had just simplified it all much earlier on then this would have been done much sooner. Whilst doing this I noticed that debugging the matrix data for the animation was actually rather complex. This was due to the fact that keyframes aren't stored as Matrices so the only thing you can really check is the positions. I am hoping to put together a simple application at some point that will allow the user to load a model with animations and then be able to check the data assocciated with any bone at any point in time. This will hopefully make other peoples debugging much simpler as they will have a correct version of the running animation with the key frame data exposed for them to compare against their own version.

Okay so this isn't quite the end yet, there is still plenty more to do. Next few things on my list are:

  • Tidy up all the animation code
  • Do some testing on various file formats to ensure they work
  • Add support for blending multiple animations
  • Do some performance testing and see how I can make the animation more efficient
  • Look into ways to incorporate the animation with player input

Once all these things are done I can look into either creating a squash player or outsourcing to an artist and get them to create the player and all its animations, which is a much better option. 

Cheers :)
0 Comments

Animation: Parent Hierarchy Working

13/11/2013

0 Comments

 
As a quick test on the transformation hierarchy and the vertex weights I decided to leave out the key frame data and apply a simple transformation myself to just one bone. 

This can be seen below: 
As you can see the arm rotates smoothly in a circle which proves that the Bone Hierarchy transformations are correct(at least for the bind pose). This points out that the issue is solely with how the key frame data is being loaded or that an extra transformation step needs to be done in order for the key frame data to be used. 

I'm definitely nearly there with this now, can't wait till its cracked.

Keep Coding :)
0 Comments

Animation: Almost there now..

12/11/2013

0 Comments

 
I've had another breakthrough with the animation and it now animates in a similar way to how it is supposed to look. There was some issues with the timing that caused the animation to jitter between only a few keyframes. Since getting this sorted and playing with a few of the transformations I have now got it pretty close, take a look: 

As you can see it is still quite a bit off, I definitely believe that this is now just an issue with the transformations and will hopefully get this figured out pretty soon. 

Just do what makes you happy :)
0 Comments

Animation Aggrevation

8/11/2013

0 Comments

 
Still struggling with this animation problem, which is starting to set me back quite a lot. After trying every which order of transformation and looking online at a few different implementations I still can't figure out what is going wrong. 

My next step is to take it back to loading of the animation and see if I can see any problems with the matrices as they are being loaded. Luckily the model I'm using is stored in a human readable format so I can compare the data for the key frames easily.

The only other problem that I could see it being is an issue with the quaternions for the keyframes not being correct. This again can be tested by doing some debugging at the animation load time. 

Hopefully I will get there soon.

Keep Coding :)
0 Comments

Assimp Animation

23/10/2013

1 Comment

 
It is about time I put an update about what I have been getting upto. In the squash game I have currently been working on implementing full skeletal animation so that I will be able to use full character models for the players rather than just a racket. I think once this part is implemented and I have got some decent models moving around the court it will start to look quite impressive and will really allow me to progress much further with the game play aspects of the game. 

I have had to take a pretty in depth look into the way in which animation works and specifically how Assimp imports all the animation data. This has taken a lot longer than I first thought. firstly getting my head around how Assimp imports and then deciding a good way to represent that in my code to allow for flexibility. 

I am finally at a point where all the animation data has been imported successfully and I have new classes to represent this data such as: Animations, Bones, KeyFrames. I have also added all the per vertex weights for the bone data. The part that I am currently working on is performing all the bone transformations per update and then using that in the shader to move the mesh. This is taking me longer than I originally thought but I am hoping to get it nailed pretty soon. I will upload a video of the animation as soon as it is done. I may optionally provide a tutorial to show other Assimp users how to gather all this animation data from a loaded model.

Keep it Easy :) 

1 Comment

    Archives

    May 2020
    April 2020
    January 2020
    November 2019
    October 2019
    September 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    August 2018
    July 2018
    June 2018
    March 2018
    January 2018
    June 2017
    February 2017
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    February 2016
    January 2016
    December 2015
    November 2015
    September 2015
    August 2015
    July 2015
    June 2015
    March 2015
    January 2015
    November 2014
    October 2014
    September 2014
    August 2014
    July 2014
    June 2014
    May 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    May 2012

    Categories

    All
    2D
    3rd Year Project
    Agile
    Android
    Angular
    Animation
    API
    Apple
    Apps
    Arden
    Async
    Awesomium
    C#
    CI/CD
    Clean Code
    CMake
    Cocos2d-x
    Colour Match
    Compilers
    Cross Compiling
    Cross-Compiling
    Databases
    Design
    Development Tools
    Docker
    Electronics
    Examples
    Flask
    Flask-Login
    Fmod
    Game Development
    Godot
    GUI
    Hackathon
    Hacktoberfest
    Hardware
    Home Life
    IBM
    Inspired Gaming
    Instancing
    Ios
    Javascript
    Jbengine
    Kata
    Level Editor
    Linux
    Microsoft
    Mobile Development
    Monogame
    Moodster
    Motivation
    Networking
    Objective C
    Opengl
    Open Source
    Organisation
    Physics
    Physx
    Pi
    Planning
    Post Mortem
    PyGame
    Python
    Quart
    Quasar
    RakNet
    React
    Road To Eldoarado
    Scripting
    Scrum Master
    Sessions
    Session Timeout
    Social
    Sound
    Space Invaders
    Squash Game
    Squash Game
    Streaming
    TDD
    Team Leading
    Test
    Test Driven Development
    Travis
    Unity
    Unity Development
    VSCode
    Vulkan
    Web Applications
    Worklife
    WSL
    XML
    XNA / C#

    RSS Feed

Powered by Create your own unique website with customizable templates.
  • Home
  • CV
  • University Work
    • Second Year Work >
      • Top-Down Shooter
    • Third Year Work >
      • Terrain Analysis Project >
        • Terrain Analysis Tool
        • Game Demonstration
      • Post Processing
      • Android Application - Sports Centre
  • Projects
    • Unity Development >
      • Lerpz Tutorial
      • Dare to be Digital Entry - "Lit"
      • Unity Game
    • Geometry Instancing
    • Road to Eldorado
    • Level Editor
    • OpenGL Work
    • JBEngine
  • Blog
  • Tutorials
    • Flask Session Timeout