Dev Update: Things Unity Doesn’t Like

While developing Ghostly Apparitions, specifically my push of new features this last month, I have learnt a few things that Unity did not seem to like me doing. These are things that are limitations of the default engine that, while maybe on the higher end there may be solutions, for now I have had to find workarounds for these quirks of the engine.

These are good to examine and stress test now, in the early stages, so I can note these down as thing to consider when working on the final design of Ghostly Apparitions systems.

Rigidbodys and Non-Convex Colliders

Ghostly Apparitions is currently going down a very physics driven route for it’s gameplay. Apparently between Unity 4 to 5, non-convex rigidbodies using mesh colliders have been removed as an option, eliminating easy to make holes and gaps in physic objects.

MeshCols.png
A workaround is using multiple colliders per special object, from separate parts, to remake the whole shape with the gaps, hole and indents needed, however I can’t say how efficient this is. This means I may have to find some alternatives in the future for things like cupboards, draws, bins and even the gaps under chairs. For now I will lean towards less gaps and holes in my games movable props and simply see how far using multiple colliders can take me.

Animation and Simulation

When animation is applied to any bone on a object it nullifies any physics driven movement on any other bone in its hierarchy. From my research with IKs there may be a way around this but without a special fix if you want, as I did in my example, a rigidbody driven door with animatable handles, it is simpler to have the handles be a separate rig childed to the door.

With that in mind I will probably make a base rig for all handle like objects in my game with a interchangeable mesh, since I will have to separate them from the doors anyway this will save time on setup.

Humanoid Rig, Ik Handles and Scaling Animation

The character models in my game are made for cartoon like expression and movement and have multiple parts in their rigs for classic squash and stretch animation. In the future I want the post 2017 AIs in Ghostly Apparitions to use IK handles to interact directly with props in game.

However Unity’s humanoid rig, it’s only built in route to IK handles, cancels out all scale driven animation in the entire rig. Luckily using some of the community built alternatives for Ik handles don’t seem to have this same quirk, so with a bit of research my specific animation needs should be fine, however I will not be able to use unity’s built in system.

While not much hopefully this may be useful for anyone who is doing similar work on the unity engine, as development continues I will be sure to post the specific solutions for any particularly problems I have as work goes on.

Advertisements
Dev Update: Things Unity Doesn’t Like

Toasty Camera Rail System – Spline Groups

The spline and bezier curve scripts I am using are a modded version of the one shown in the “Curves And Splines” Catlike coding tutorial(Link here). As I refine this system I am making a specific variation of the bezier curve scripts to use for my camera rig, with my first major addition, shown here, the ability to split the spline into smaller segments.

toastyalpha_camerarig2groups_doc2

To do this I have added an additional array, a int array, that corresponds with each control point. This array is then used to identify which group that point is a part of when the script is implementing through the spline. Then if the next point’s group does not match up with the current points, the script knows it is at the end of a group.

Additional features on Spline Script

For the groups to be editable I needed to go through the existing bezier spline script and add in these additional functions, firstly to recognize and identify my new spline groups system, and secondary to implement them to the existing features of the current editor script before adding my own. Some of these were simple cases of directly recycling already existing equivalent functions and adapting them for group detection. The two substantial additions where the “GetGroupRange” and “GetPointWithinGroup” functions.

New Spline Walker

toastyalpha_doc

With the above additions to the spline script I could now make a new player tracker. This script recycles the same concepts as the older set up with some refinements. It functions by:

  • Getting the closest raw spline point to the script object’s current position.
  • Getting that points group, and then that group’s overall beginning and ending points.
  • It then loops through and calculates a set number of positions along the entire group’s curves and checks for the one nearest the script objects position.
  • Finally it returns a position and the progress along the groups spline that position is at as a float between 0 and 1.

With these values the camera rig and it’s look target can now place themselves on the appropriate point on their own splines.
As it is this set up seems to work without to much overhead, at some point I would like to try experiment with some alternative methods of find relative points on a spline to global positions, but for now, so long as it’s doesn’t hit performance I will be continuing with the current method.

Result

ToastyAlpha_CameraRig2Groups_Doc3.png

Above is a screenshot of a path made with just this addition to the camera rig. With it I have been able to make distinct directing choices, slow and fast transition(basic ease in and out effects) along the camera rail relative to the player’s position, and jump cuts all using the same splines and without the need of additional set ups.

Toasty Camera Rail System – Spline Groups

Toasty Camera Rail System – Version 2 Plan

toasty_prototype001_5_splashThe toasty alpha has now gotten to a stage where I am doing a second run of the initial features, the player movements, AI, noise and stealth elements and now I am starting the updates to the 3rd person camera rig(That was show earlier here Link).

Premise

Fundamentally version 2’s camera rig will works the same as version 1, three to two splines paths are inputted to it and then are used to:

  • First compare the player’s position along the first “PlayerRail” Path.
  • Then it applies the relative progress on the “PlayerRail” to the camera’s target point along the “CameraTrack” path.
  • Finally the cameras look target is place along it’s appropriate spot on the “LookPath”(which in most cases is just the “PlayerRail” again).

The main changes are going to be editor side, on the splines editing tools and then on ways to use these addition to allow for more control of the camera rigs overall path.

toastyalpha_doc

New Features:

Version 2’s focus is to add more range for bigger environments, with multiple paths and more subtle directional control. To that end these features are what I hope to add:

  • Track groups, the ability to split the splines into smaller segments.
  • Modifiers, that allow for different transitions, based on the current path the player is on
  • Different kinds of rigs, for different room set ups.
  • Transition from one set of spline paths to another.

And some refinements such as:

  • The ability to add new points on a already existing spline, and the ability to remove existing points.
  • The ability to snap spline points to each other.
  • The ability to copy coordinate details across multiple points
  • The ability to select multiple points at once.
  • A playback feature in editor to see what the camera sees at any point on the rail.

Further down the line I would also like to make more options, such as a specific edit mode for the camera rigs in the scene view, but that will be left to a later stage when the other editing systems are equally refined enough to plan for.

Toasty Camera Rail System – Version 2 Plan

Stoic Sugar Cubes – Art Bible

As the final deadline for this submission is getting closer i’ve spent the weekend getting all the documentation in order to free up this last week for making a final art level for the vertical slice’s hand in. Among that documentation is the art bible below. In it I sum up the aesthetics and some of the technical aspects of constructing the assets for Stoic Sugar Cubes I have been using to this point, along with some screenshots of the more polish game scenes.

This slideshow requires JavaScript.

Stoic Sugar Cubes – Art Bible

Candlelight: Main Character Reference sheet

With the main character concept agreed upon I prioritised finishing the final character reference so the character modeling could start development. While there were a few changes made to the design, e.g. the scarf was made wider, there weren’t many changes from this iteration of the character concept sketch beyond expanding on details such as the bag and shoes design.

ChararterRefranceSketch007FinalSheet
Above is the show reference sheet that demonstrates how the file, which I gave to the character modeler, layers have been divided up to make sure they have all the detail they will need for modeling. I have also included a few test expressions and the colours on the sides.

ChararterRefranceSketch004

A WIP(Work In Progress) of the above concept as I was working out how the character should look from the side.

ChararterRefranceWithSource

The starting sketch for this reference sheet, surrounded by the reference images I used from various sources to help me add more details to the concept.

Candlelight: Main Character Reference sheet

Candlelight: Bookshelf reference and concepts for Art Bible

With the first presentation of our concept to our lecturers done we are now on the second stage of development of candlelight. With that comes the need to start producing assets for our art bible. Below is the reference sheet and early concepts for the bookshelves and ladders, along with some thumbnail sketches of how they may be seen in the game itself, that I have now passed on to the 3D environmental artist for modeling.

ConceptSketches003
Below are the first attempts at designing the bookshelves based on the 3D mockup I did earlier. I decided to move away from this complex look, to something simpler that would work better with our setting and the poly limitations of our project.

BookshelveConcept001

Candlelight: Bookshelf reference and concepts for Art Bible

Candlelight: Interior of library detailed sketch

With the design of candlelight making way we are beginning to clarify more of the final props we know our game will need and how the main play area will work.

ConceptSketches002LibaryWithDark

One of the most significant additions this week has been the decision of having a hot air balloon be the central piece of our level and the end objective of our game. In the above and below concepts I have done a detailed of what the interior area may look like with this new balloon as a central piece.

ConceptSketches002LibaryNoDark

The concept without any shading for detail

Candlelight: Interior of library detailed sketch