online store
top of page

Is scripting for everyone?

Yes! Thank you for joining my TED talk!


In human psychology one of the most important steps before doing or learning a new skill is the believe to be able to pull it off to some degree. Starting to learn guitar to play Seven Nation Army doesn't exactly make you Jimi Hendrix but that's not the goal here.



"I didn't know I couldn't do that. So I did it!"

The same rule applies in learning scripting. I often see the segregation between being artistic and scientific separating one from the other even though the modern artist is working with complex software programs as part of their day-to-day work.


Leonardo Da Vinci was famously an artist, scientist and engineer at the same time painting beautiful portraits, detailed anatomic sketches and future machinery. Genius or not him and others show us the possibility of combining different areas independent of your own strengths especially living in our current information age.

The biggest fear of approaching something like scripting is the unknown and the preposition that scripting is basically math; and we all are bad in math.


Scripting is not math 🧮

The most common fear when learning scripting is that it requires math to pull off which most of us didn't exactly excel in in our school years.


Scripting is actually closer to a spoken language than math; a language to communicate with the computer. Modern scripting languages like Python have vocabulary in form of commands that express what you want the computer to do:


  • print - Print out an information

  • if "asset" in name - Do something specific if the word "asset" is in the current name

  • remove_underscores("your_name") - Call the function "remove_underscores" to remove all the underscores from "your_name"


They also have grammar that shows how to build a statement/sentence to communicate what we want. Learning the vocabulary and the grammar of a scripting language is not so different from learning the vocabulary and grammar of English or French.


Example

Print out how many assets are in the scene:

print(len(assets))

Remove the last asset from the selections:

selections.pop()

The complexity comes with the complexity of the statement. Maths importants for scripting lies in the abstraction part like variables (x, y and z) and to build statements logically. It only becomes necessary as a topic when working with more advanced situations to calculate more complex solutions like A.I., path finding etc. which are not the most typical day-to-day scripting problems.


TD Examples


Rigging TD

  • No math: Creating a basic rig with weights and controls.

  • Math needed: Calculating angles (Euclid) and positions for automatic updates


Lighting TD

  • No math: Creating lighting templates, moving, updating and linking lights.

  • Math needed: Calculating the right angle for the light to make it perpendicular to the camera for an eye highlight.

Shading TD

  • No math: Assigning shaders, changing attributes and updating texture paths.

  • Math needed: Creating a custom shader.

Pipeline TD

  • No math: Creating and maintaining a pipeline.

  • Math needed: Rarely

...



Scripting isn't alien 👽

Another common fear when learning scripting is that it is unknown and alien, it's something for people with a technical mind and an engineering degree.


Scripting in it's core makes a software do something using expressions and commands. It's quite common to use simple scripting skills in our modern world.


  • Did you ever set a hashtag at the end of your post? You basically helped the algorithm to find and categories your work via tagging.

  • Did you ever used an expression for example in EXCEL or any other software? Congratulations! You already know how to script. 🥳


Example

In EXCEL you can get the sum of columns via a simple expression:

=sum(F27:F)

EXCEL expressions save us an enormous amount of time and keeps the result current and correct. We don't need to recalculate anything if we change any of the included values. A big time saver and mistake remover.

The key part of scripting is to express a formula that handles multiple similar situations; to automate or simplify a process through abstraction. We're often already using coding or formulas in our day-to-day lives without even knowing.


The most common language in Visual Effects, Animation and Games is the scripting language Python which allows us to access and manipulate most DCCs in the industry. (Maya, Houdini, 3ds Max, Nuke, Katana, Blender, ...) It is one of the easiest to learn and powerful scripting language; with just a few lines of code we are able manipulate the scene and build helpful code snippets that speed up our workflow.


You like to move the character "sulley" in your Maya scene back to the center?

Just call the "move" function:


import maya.cmds as cmds
cmds.move(0, 0, 0, "sulley")

Try it yourself:
  1. Open the Maya Script Editor

  2. Paste the code above in it

  3. Have an uncentered object called "sulley" in the scene

  4. Execute the two lines (by selecting the code and pressing CTRL+RETURN or pressing the arrow icon at the top).

  5. Watch the object magically moving to the center


Conclusion

Can everyone learn scripting? Yes! Scripting is a language and learnable like every other language.

Should every (3D) artist learn scripting? Yes! Scripting can help you with your productivity, understanding the world (if someone throws some code at you) and to secure a higher and more stable form of employment in a more technical field.


Value your own time and create faster and better workflows for yourself and your team. How much time would a tool save you that exports files to the right environment, with the right names and setup with one click? Scripting makes this time save possible!


Thanks for reading,

Alex

Wanna get your hands on some kickass scripting skills? 🐍

Check out the Python masterclasses starting soon:



 

About the Author



I'm Alexander, an Award-Winning Technical Director & Coach in Visual Effects, Animation and Games. My skills are solving technical problems, simplifying workflows and mentoring career goals.


For more check out our exciting TD Bootcamp, 21 Artist Show Podcast and YouTube channel.

bottom of page