MEL: D&D Dice Roller
This was a project I undertook during my time at The Art Institute of California – San Diego. It is featured in my main demo reel. The assignment I was given was to write a MEL process that would accept variables and give different output based on the data provided to the process. I decided I wanted to go beyond the basic requirements and asked the instructor if that would be OK; he agreed. The dice roller was born out of my desire to challenge myself and to stretch the definition of what MEL can do. I didn’t want to write another procedure to duplicate a piece of geometry and apply arbitrary transformations to it, I wanted to do something that would force me to think outside of the box; the dice roller idea was born.
I created a dice roller application that builds on the Maya physics engine to roll the dice. Rather that just make a random number generator that tells the die which face will point vertical after the roll, I decided to use three random values per die and assign them to the three spin variables for X, Y, and Z as well as a fourth random value that would be assigned to the initial velocity of the die, thus achieving a more natural die roll. I also wanted the user to be able to select which type of die to roll and how many, allowing the alternative dice used in Dungeons and Dragons rather than just a standard six sided die.