Friday 27 October 2023

Python debug tip

 Want to know a secret?

"*"*100 takes me about 1 second to type.

Why not wrap it in a print?

 

print("*"*100)

print("var_a:", var_a) 

print("var_b:", var_b) 

print("var_c:", var_c)  

Result:

//****************************************************************************************************

// var_a: pineapple

// var_b: 64

// var_c: <__main__.Dog object at 0x00000248A53D7748> # 

//************************************************************************************************

 

Isn't that easier to read?

How to change all paths in Houdini scene file

The Problem:

I need to change all paths in a Houdini scene file due to a drive change - oh no! All my nodes are invalid, my scene is broken and everything is on fire. Or is it? No its not, i'll tell you why:

The Fix:

 1.) Windows > Hscript Textport

 

2.) Type opchange YOUROLDLOCATION YOURNEWLOCATION

(press enter)













And there you go, all nodes referencing YOUROLDLOCATION will have search'n'replaced it with YOURNEWLOCATION. Magic. Everything fixed. :)


Monday 23 October 2023

How to install numpy for Maya

I needed to install numpy for Maya the other day because its a dependancy of a package that I use.
But how? How do you install numpy for Maya?

Like this:
1.) Press windows, type in cmd and press enter
2.) type in: cd C:\Program Files\Autodesk\Maya20??\bin
3.) type in: mayapy -m pip install numpy

Obviously, replace the ?? in your Maya install directory with your version number.
And there you go - numpy installed! :)

Monday 3 April 2023

Maya Rigging: Joint-based collision detection using Maya muscle nodes

 I recently found a great tutorial on created live-collision joints using Mayas in-built muscle system nodes. I thought this was a really clever solution as it is importantly real-time, meaning animators can see the output immediately, and it utilises nodes already existing within Maya.


To read up on how to create this awesome looking system, take a look here:

http://www.rihamtoulan.com/blog/2018/3/24/faking-collisions-with-joints-based-setup-8snd2

Thursday 23 March 2023

Python Generators - using yields and generators

Python generators were something that alluded me for quite a while. A spooky concept that didn't seem necessary. However after using Coroutines in C#, it sort of became a little more clear. 

Then, recently I stumbled across an excellent blog post explaining what generators do, how and when to use them:

https://github.com/qingkaikong/blog-1/blob/f453d320c06ac5b1a8d43380f9e6f9d9cf8c3022/content/2013-04-07-improve-your-python-yield-and-generators-explained.md

Check it out!

Monday 9 January 2023

FrancoJam Gamejam Winners 2022!

Towards the end of last year I took part in Creative Assembly's GameJam, and it just got announced that our team won! Hooray!

This year's theme was 'Animal Rescue' inspired by Creative Assembly's charity of the year, so we decided to put a spin on the theme and make a game about an animal (Noah the pigeon) rescuing humans onto his ark. We had a total of 48 hours to make the game.

The idea for the gameplay is to launch Noah the pigeon via a catapult click & drag mechanic to connect a tightrope to pins scattered throughout the level, thus creating a path for the humans to walk across and board the Ark.


We created the game in Unity, and used other DCC's such as Maya and Photoshop to help create the assets. I'm really pleased with the way this game turned out, and even more proud of our team that took home the trophy! Good job Team Kinematic!

Credits:

Alex Tavener(me) - Art (pigeon, ark, background)

Ross Harrop - Art (humans, environment)

Chris Kemp - Programming

Chris Kozlowski - Audio

William Fynn - Moral support & ideas consultant


GG!