Wednesday, February 1, 2017

Slicing Meshes in Unreal



Hey there!  So, for my last Tech Design assignment, I wanted to cut something in half.  For this assignment, we were supposed to create an experience using Blueprints.  We were then supposed to provide 5 enhancements.  Wanting to cut something, I figured I would try to recreate aspects of the plasma cutter from one of my favorite games, Dead Space.  There is a very deep emphasis on dismemberment using weapons in that game.  First, I looked into getting the aim sight look with the laser beam correct first.  What I did, was take a material and attach it to a particle I created.  I then would raycast from the gun and set the particle start point to the gun and the end wherever the ray is colliding.  As you can see, this works in the above gif when only one of the lasers is not colliding with the shelf.  Here are the blueprints of the laser below.  Note, it takes an input, so I am not reusing this code three times.

Now, onto the really interesting challenge.  In the unreal engine, there is a component called a Procedural Mesh.  In order to slice a static mesh, this must be a child component of that actor.  One important thing to remember with this component, is to have it not use complex as Simple Collision in it's options.  This prevents the whole thing from working.  Next, make sure that the parent is not doing any of the collision since we are having the procedural animation take the hit and split the parent into what is two separate meshes.  Next, if you want to continue slicing those meshes, one needs to make the constructor of these newly spawned meshes to have a procedural mesh and to be spawned with collision enabled.  Next, what I do, is make a collision trigger this slice.  I fire a bullet out of the gun, so when the component begins overlap with this bullet, it will call the slice method on the procedural mesh  which will spawn the new mesh after preforming the slice on the old mesh.  This slice can be seen below in the gif.

Another fun thing I did here, is I made these boxes the enemies in the game.  Once a box has been sliced twice, it kills this enemy and makes it inactive on the board.  If the player comes in contact with one of these and the enemy is still active, it will kill the player.  However, making these boxes enemies posed a new challenge.  Once the I attached the procedural mesh as a child component to a static mesh, which was a child component of a character actor, this no longer worked.  I wanted so badly for the enemies to have AI and to chase the player when they got close.  So, in order to work around this, I realized through debugging, that the collisions were not triggering correctly.  I got collision working, but even though slice function was being called, the box remained in one piece.  I eventually came up with a solution to make the character class it's own actor and then I made a sliceable mesh actor a child of the character actor.  This made the parent move the slicable box when the AI chased the player.  It took a very long time to discover this and I would like to continue researching this in the future.  I would like to eventually dismember character AI with more complex models than cubes.  The slice blueprint is below.



This was a very cool project where I got to flex my muscles as a coder to achieve some designs that interested me.  Also, I got to code in C++ and have those classes communicate with blueprints in unreal to keep track of my ammo which is seen on a widget at the bottom of the screen in the gifs above.  I also got to integrate Wwise into this project for some dynamic audio with the enemy chase moments.  Wwise is such a cool program to work with.  This project was a ton of fun to pull off and show to my peers.  That's all for today.  Thanks for reading!  More cool things to come!








Tuesday, January 31, 2017

Motion Capture











This week we finally had our first MoCap session for our Capstone The Draft.  This was really cool and we had some great talent to work with.  I was in charge of the session and took the actors through the motions that we wanted.  We were in the studio for 4 hours and took over 100 shots of about 45 animations.  We made sure we were very thorough and recorded 3 takes of each animation.  This will make the battle animations look really realistic.  Our artists worked hard and we already have 3 of the animations in engine to display with this coming Capstone Presentation tomorrow.  Here are the animations!




That's all for now.  More great things to come!

Saturday, January 21, 2017

Template classes

Today, I finished my first template class in C++.  Our requirement for an assignment was to write a list class to be used in future projects.  This was a big challenge and something new to me.  In the end, what helped out the most, was first creating the class for a primitive type int and then creating a template that accepted any type.  This project was also my first time using unit tests in C++.  I had only ever performed JUnit tests in Java so I was unaware of where to begin.  It turned out to surprisingly be easier than I thought.  However, one must write a ton of code to make sure all of the bases are covered when unit testing.  It was cool to get back into testing since it has been a while.  More great things to come!

Otronicon

This past weekend, I spent several hours at a booth promoting FIEA at Otronicon.  This was a very cool science convention that displayed the latest technologies such as virtual reality.  My game VRChaeology was selected to be displayed at the convention.  I was there to run the VR station which ran for the rest of the weekend.  My team spent time over break to prepare our game for the convention at the request from the faculty.  The game was a great hit!  We had people lined up for hours to play.  What was especially rewarding was seeing tiny children have their first VR experience and having a fun time.  Many were 6 or younger.  That was simply incredible.  Seeing your hard work pay off by having people enjoy your game is simply indescribable.  This was a great playtest session with the public and I recorded a great amount of data on how the game could be made easier and more intuitive.  My team plans to further improve VRChaeology for future conventions and perhaps an Steam release.  More to come!

Wwise education

Wow, been a while since I posted here.  I Came back to school a couple weeks ago and things have been ramping up for capstone and other projects.  My break was very successful.  I got to investigate the amazing program known as Wwise.  It's industry standard for creating dynamic sounds for games.  Even the amazingly popular game Overwatch uses it.  I spent the break learning how to perform many cool sound actions in my future games.  This will be extremely useful in my capstone game and the team was very grateful for it.  Yesterday I even held a training session for students at FIEA on how to create a few events in Wwise and then use them in the Unreal Engine.  The class went over very well and many teams are using Wwise inside of their own capstone projects.  Lots of cool stuff to come!

Thursday, December 15, 2016

One Semester Down

With that, my first semester at the Florida Interactive Entertainment Academy has come to a close.  I learned so much and got to work on more games in one semester than I had in my entire Undergrad career at Ohio State.  I learned so much and got to work with the gaming technologies I had always dreamed of.  For example, in 3 of the 5 rapid prototypes I created I had the pleasure of working with the HTC Vive.  Every prototype brought new challenges and different ways of tackling what it means to make a game for VR.  One of the games was even selected b y a professor to be shown off by FIEA at recruiting events!  I also programmed a small game in 68K assembly which is nothing short of awesome as far as I am concerned.  If someone had told me in my undergrad career I would go onto do that, I would have called them crazy.  I also got to dip my toe into OpenGL to create a simple fighting game which was a genre I had never attempted before.  This whole year has been nothing short of an adventure, and I am happy to find myself here at the best game school in the world!  More great things to come!