Friday 23 September 2016

INTERACTIVE :: 23/09/16 - Mushrooms and Unity

After the incident with toon shaders and Unity the other day, I decided to go back into Maya and work at my mushroom a little more.


Since I was unable to use the textures I wanted for the original mushroom, I used the vertex colors to create a different pattern.  Its a lot simpler than my original and completely contrasts the original's design in terms of where patterns and shadow are placed, but I think it still works for the context of our game.

I ran into more problems when I tried to import my animated mushroom into Unity - mainly when I discovered the animation would not play and was not even recognized as being there.  It took a bunch of exports and watching Lena's videos a few times before I realized that animating the individual verticies in my mushroom cap's mesh was not the correct way I should have been animating, and that I needed to use blendshapes if I wanted it to deform the way I needed.

It took a little while for me to remember how to use blendshapes, but once I was able to key the frames I needed, the animation exported smoothly.  Here's a screenshot of me playing around with the animation graph.


And an asset list featuring all of my animation tests (its cleaned up and doesn't look like this now):


I have decided to go with a very simple bounce/distort animation for my mushroom and just let it loop in the Unity model.  They are meant to be more background assets that ambulate slowly and are scattered around the save/respawn point or perhaps herald the exit of the level.  Alternatively they could also shoot out little particle simulations in-game - I'm not really sure how to incorporate them in at this stage.

My initial idea for the mushroom being the character spawn point has been altered, mainly due to the fact that I have no idea how to make a script for the mushroom to literally spawn a player avatar into the world.
(Gyazo's gif-maker made unity stop running in the background - the actual mushrooms aren't nearly as jumpy)

For the composition of the mushrooms themselves, I have slowed their animation cycles down to between 0.6x to 0.3x the original speed in order to make their movements seem a lot more ambient and less likely to grab the player's attention and detract from other hazards on the screen.  I attempted to offset some of the animation loops for the smaller mushrooms, but did not notice any changes in their movements or anything, so have forgone tweaking it further for now.  There are a group of three of them, as mushrooms tend to grow in little patches and rings, which further emphasizes the fairy-nature of them, in addition to the distinctly unnatural coloring.

No comments:

Post a Comment