Useful Blender Things

I’m between 3DS Max licenses at the moment, so it seemed a good opportunity to try and learn blender! This has been so frustrating, but hopefully worth it to learn what is becoming more and more of an industry standard.

This is just a dump of some of the shortcuts and tools I’ve used so far so I can come back to it! Will probably just add to this post as I go.

Shortcuts

Ctrl-B – Bevel

Ctrl-R – Edge Loop

S-X/Y/Z – Scale in x, y, or z axis

R-X/Y/Z – Rotate in x, y, or z axis

Tab – Go between edit and object modes

A – Select All

Shift-A – Creation Menu

Object Mode – Ctrl A – Rotation and Scale – Freezes all transform data

Tools

Modifier Menu – Mirror

Edit Mode – Mesh – Normals – Flip

Edit Mode – Mesh – Normals – Recalculate Outside

Edit Mode – Mesh – Normals – Average – Custom Normal (Good quick smoothing results)

Gotchas

Negative scale will flip normals randomly, freeze scale then recalculate outside.

 

 

Clickable Interactive Objects in UE4

I’ve been working on a small game to get to grips with the basics of UE4, as its been a long time! The main mechanic is point and click style investigating.

334babaf56e7007d851cc59060337a01

Player

For my player I added a function that raycasts outwards from the player’s height and rotation, then returns whatever object it hits.

1

In the event graph of the player, when the lmb is clicked, it checks if any UI exists. If it does, it removes it. If not, it runs the raycast and if the object that is hit is of the interactive object class, it runs its on use function.

2

Interactive Objects

The on use function in the interactive object creates a text display UI and sets the text of that UI to equal a text variable that lives in the interactive object.

3

All interactive objects are child blueprints of this, where the clicked text variable is overridden.

5

For more specific mechanics, I’ve still used the same parent class, but overridden the on use function. For example here, when the computer is clicked on it checks if its been successfully used, and if not shows a text input UI. If the password has been successfully entered, it shows the normal UI text display.

6

87bf37013b0194ac934aa8a2576f4c6c

The text input UI has its own event graph, which when the password is entered correctly, will find the door asset in the level and run its unlock function.

7

The unlock function rotates the door when its run, allowing the player to leave the room!

4

This is all very simple stuff so far, but its been interesting to take a look at.

 

 

 

 

Applying For Technical Art Jobs

Introduction

This is a post about how to apply for technical art jobs. I’m going to cover the actual definition of technical art as a job role, how to know if you should apply and how to structure your CV, portfolio and cover letter.

The reason I’m doing this is that I continually see applicants where they might be a good technical artist and good fit for our team, but its difficult to tell where their skills actually lie. Its rare I see an application for a bad technical artist…most of the time they’re just not one at all.

I’m hoping by writing this I can help people show off their skills and get more technical artists into the industry – we really need them!

Why Should You Listen To Me?

You should definitely take everything in this post with a pinch of salt, as I’m only talking from my own personal experience. However, I’m a Technical Artist who’s coming up on six years of experience in AAA, AA and indie. I’ve been involved in recruitment for about four years and have screened applications for and interviewed Technical, Lighting and VFX artists of all levels. So I’ve seen a fair amount of applications and made a few myself! While I’m basing this off of professional experience, this is purely my opinion and doesn’t represent that of my employers, past or present.

I’m by no means perfect and I’m sure people could find a lot of issues in my folio and CV, but I’m hoping this advice can help folks who are struggling to get interviews or jobs.

If you’re applying for senior or above positions, you probably already know all of this. This is aimed at graduate to intermediate TAs.

So what is a Technical Artist Anyway?

The real answer to this question is what the job advert says a technical artist is. Every studio defines the role differently. However, there are some key skills that crossover for most jobs, and certain skills that compliment each other nicely.

Generally, I’d expect a TA to have a minimum of:

  • A specialism in an area of art (e.g environment, lighting, vfx)
  • A solid understanding of the potential performance issues of that specialism
  • The ability to diagnose those issues through performance profiling tools
  • Knowledge of common optimisation techniques for the specialism and the ability to come up with new ones
  • One scripting language, that they use to make tools for their specialism
  • Some form of shader creation, be it node or code

I’d expect a more experienced TA to have worked with multiple art disciplines and know more than one scripting language. They should also have worked with industry standard profiling tools like PIX and Razor if applying for console roles.

If your skillset looks more like:

  • Animation
  • Rigging
  • MEL/Maya Python
  • Animation implementation in engine

I’d call you a Technical Animator. Some studios differentiate between the two roles, some don’t. Don’t be surprised if this skillset is not landing you Technical Art roles – they may be looking for the optimization/shader based skillset above. If you’re having this issue, start looking for specific Tech Anim roles.

Smaller studios combine Technical Art roles with Lighting or VFX, so it can be helpful to have skills in this area. Make sure your core TA skills are up to scratch first though.

A TA coming from a code background might look a bit different, with more emphasis on the technical and programming aspects of the role.

Ultimately you need to be someone who can demonstrate that they understand code and art and can combine those things in a way that supports a team.

Advice for Beginner TAs

Though you’ll need to be flexible and will likely need to expand your skillset to move up, here’s some groups of skills that compliment each other well. If you focus on one of the specialisations below and have one thing on your portfolio representing each of the requirements, you’d be off to a strong start. We’ll cover how to actually show off these skills in the portfolio section later on.

This is just advice for those who are struggling to define a skillset. One of the best things about tech art is getting to build your own specialism out of random things that you like, so I’d encourage you to go beyond and just work on projects you think are cool – you’ll get better results that way too!

Technical Artist – Lighting/VFX Focus

Required: Lighting, Technical Lighting and Rendering Knowledge, VFX, Shaders, Profiling
Additional: Vector Maths, Houdini (with Python or VEX)

Technical Artist – Asset/Environment Focus 

Required: Asset/Envrionments, Profiling, Maxscript/Python for Max, Shaders, Engine Tools (Blueprints/C#)
Additional: Substance Designer, Substance Painter, ZBrush, Houdini

Technical Artist – Tools Focus

Required: Any combination of Maxscript, MEL, Python, C#, C++, SQL, Javascript etc. used specifically for art tools.
Additional: Some form of art work – environment, assets, vfx etc.

Technical Animator

Also listed as Technical Artist (Animation) or other derivatives.

Required: Rigging, Maya, MEL/python, Animation Systems in Unreal/Unity, Character Modelling
Additional: Motionbuilder, MoCap Experience, Marvellous Designer

UI Technical Artist

This is a highly specialised role that normally only exists in large AAA companies.

Required: UI Design, UI Implementation (blueprint/C#), Shaders, Good Understanding of Game Mechanics  

Soft skills

These are important for any TA regardless of specific technical skills. Some of these come with experience, but you can develop them when thinking about personal projects.

Problem Solving
  • Ability to learn and adapt to new technologies quickly
  • Strong problem solving alongside the ability to bring ideas together to form new solutions.
  • Google-Fu! I often tell people that my entire job is googling stuff and I’m only lying a little bit. Being great at finding and implementing new knowledge is key to the role.
Teaching and Communication 
  • Ability to teach and communicate complex technical concepts in a way that makes sense to the art team.
  • Good standard of documentation/informative writing in the language the company uses.
  • Willingness to be the ‘bad guy’ in a kind but firm manner. Having to cut features or heavily optimise areas can result in tense relationships with the art team. Being good at navigating this is always a plus, but is generally a skill you’ll learn on the job.

Apply For The Right  Job

Read the advert!

Now that you know whether you have the appropriate skillset to be a technical artist, lets think about the specific job you’re applying for. Use the above information to identify whether the job focuses on tech art or animation, and look at your general skillset. Does it match what the main responsibilities of the job are? Here are some things to consider and some things to ignore.

What to Consider

  • Responsibilities
    • What are they actually asking you to do? Can you already do these things or could you learn to do those things in a reasonable time frame? Be honest with yourself.
    • You don’t need all of it, but you need enough to know that you could carry out tasks asked of you.
  • Skills
    • This is where they ask for specific technologies, languages or skills. As discussed below languages and tech are transferable, but you do need to have the appropriate base skills and knowledge.
    • Compare each of your skills with the list of skills requested. If you have more than half of the skills listed and some overlap with the rest, it’s worth applying.
    • If you have a quarter or less this might not be the right position for you – refer to the above about different tech art paths.

Parts of the Advert to Ignore

  • Education
    • Unless you’re looking for a visa, if you can do the job, it doesn’t matter where you learned it.
  • Years Experience/Seniority
    • Companies will consider you with less experience or take you on at a lower level of seniority. Absolutely apply for the position above where you’re working at.
    • Do be realistic about this however. With senior and above roles experience is needed to make solid decisions that affect the whole project. If a studio is asking for 7 years experience and you’re a graduate yoir application won’t be considered and could hurt your chances of getting an appropriate job with them in the future. You could always put in a speculative application asking if they are looking for artists at your level if you really want to work there.
  • Particular Technologies or Languages
    • If you know one scripting language you can learn another. If you know 5 you can learn another really fast.
    • We’ll discuss in the CV and Cover Letter sections how to show the crossover between different languages and technologies and explain your capacity for learning.
  • Anything in the additional requirements section
    • This is all stuff you’ll be able to learn on the job. If there’s a lot of competition it will give you an edge but that’s fairly unlikely.

Your CV

Ok! So you have a TA skillset, you’ve found a job advert that matches your skills and experience and you’re ready to apply. What now?

Lets start with your CV. Your CV should be as short as possible while still conveying your experience and skills. It shouldn’t be more than one page if you can avoid it. I’ve just gone over one page this year and I’m not happy about it! Hiring managers look at applications on top of their day jobs – they don’t have time to work out if you can do the job, you need to show them immediately.

Layout and What to Include

I’ve generally had success with my CV layout, so feel free to steal it if you like. There are a lot of different options here, and lots of advice and templates available online. Generally, I want to be able to see your shipped titles, skills, languages/tools knowledge, experience and education, in that order. Some may also include a personal statement about career goals, but I like to put that in the cover letter.

Shipped Titles

If you have at least one professional shipped title, this is the first thing I want to see. If you have a fairly high profile shipped title, even better.

You can put student or self-initiated projects on here, but be sensible and limit the number you list. I don’t want to see lists of game jam games (you can add a section for this under experience) but a title that you spent a fair amount of time on and released would be fair game. You need to walk a line between showing that your non-professional experience is relevant and looking like you’re lying about the status of things you’ve made. Its tricky. Err on the side of caution, and if you’re unsure get a second opinion.

Skills, Languages and Tools

This should be a concise list of the skills, languages and technologies you know and have worked with. I separate these into different lists as I’ve had exposure to a fair amount of different areas of work, but if you have less to list it could be rolled together.

One thing we see a lot that no one likes is ‘skill bars’. Something like the image below. (This is the first image on google images – not intended to single anybody out!)

Image result for skill bars on resume

Please never do this. The scale is completely arbitrary and it means nothing to an employer. Is your 10 the same as our 10? If you’re only a 2 does that mean you’re useless at the skill? It never comes off well.

If you’re concerned about misrepresenting your skill when you’ve only used something for one project or don’t have a strong foundation in it, you could always list the skill as ‘working knowledge’. I do this on my CV as I have made a couple of MEL and C# tools in a production environment but in general my exposure has been limited. I’d need to spend some time training my skills up if I was to use those languages on a daily basis.

Capture.PNG

This is only my way of doing things, and I’m not convinced its a great solution, but it is far better than skill bars.

Experience

List your most recent professional experience first. If possible, list project names and then the responsibility for those projects underneath. I find it helpful as depending on which stage of production you were involved in and what platform the project was on, the skills used can be quite different.

Be as clear as possible about what you did and what tools you used to do it. Use technical language where appropriate and try to convey how in depth you went.

If you’re under NDA, you can still write something, just talk in broad strokes. An example I have from an unannounced project:

Developed export pipeline tools for 3DS Max and Photoshop.
Investigated shader needs, art budgets and technical requirements for various prototypes. 

While those two sentences are incredibly generic, they immediately say what tools I’ve used, what languages I’ve used (because I’ve listed the languages I use for those programs elsewhere), and the type of work I’ve been doing for the company.

Non-Games Experience

Absolutely include any experience that is games adjacent like working in tech or animation.

If you have professional games or games adjacent experience I wouldn’t bother adding other jobs. Personally, I don’t include my experience working in office administration or hotel kitchens as there are no transferable skills there that aren’t already covered by my professional technical art work.

If you have no directly relevant experience do include these jobs, but keep it brief and emphasise only the relevant skills such as teamwork and taking direction.

Projects

This is an optional section, most helpful to those without or with little professional experience. Write it in the same manner as your experience section, but feel free to include student projects, game jams or other self-initiated work.

Emphasise the technical and soft skills utilised as part of the project, and mention any accolades and releases.

Education

If you have experience, make this section as small as possible. Real experience beats education every time.

It is however worth listing your degree title, classification and university. It is helpful to know the background your coming from as it can show that you understand the teams you’ll be working with. Not listing the classification can sometimes appear like something’s being hidden, so worth popping it down.

If you’ve completed any training courses that are well known and regarded it may be worth putting them here, especially if it fills in a gap that you didn’t get from your degree. Don’t list every Udemy course you’ve done though!

Don’t bother listing courses or grades from high school, they’re irrelevant. I don’t list anything pre-college.

If you don’t have a degree, that’s fine. You don’t need to justify not having the piece of paper if your work is good.

Awards

This is another optional section, depending on if you have awards and how much you want to emphasise them. Personally I no longer include this, as all the awards I have are from when I was a student. I think they were very helpful when they were fresh though, so if you’re a grad with some awards under your belt show them off!

If you’re wondering how to get an award – apply for EVERYTHING. Our student project Seek ended up with a TIGA award, a BAFTA award and got me in 30 Under 30. We never thought it was good enough for any of this, but we applied anyway. It doesn’t take long to write up an application for these things so just go for it.

What Not To Include

The only thing I can say without a doubt not to include (beyond skill bars) is anything that comes under protected status, such as your martial status, age or gender. Some of these can be implied by other parts of the CV, but you want to avoid giving anyone any reason to not employ you that isn’t directly to do with your ability and experience. Unfortunately we all have implicit biases that can get in the way of our ability to accurately judge an application. This includes putting a photo on your CV, at least in the UK anyway. I’m under the impression this is more common in other countries –  best to check with someone who works in the country you’re applying to work in.

Personally, I don’t like to read about people’s hobbies or clubs (unless its something like a Game Development Club, in which case list the projects you did there in the projects section) as this is something I can talk to them about in an interview. To me this comes across as padding, but I do know some hiring managers who like it. Exercise your own judgement.

Your Portfolio

You know you’re a TA. You’ve written about your experience. Now its time to back it up. Your portfolio is your chance to shine, to prove that you know the skills and tools you’ve listed in your CV and that you can create work that will benefit the studio you’re applying to.

What Should You Include?

You should include pieces of work that fit the skills and technologies you’ve talked about in your CV and that reflect the skills most commonly asked for in job adverts. I shouldn’t be able to mistake your portfolio for that of an environment artist, or any other job role in the industry. It should scream technical artist. I want to see shaders, tools, optimisations, technical solutions and a small amount of art.

Environment artists are often given the advice that one good environment is better than many mediocre ones. This is true for us to some extent. You will be judged on your weakest piece, so make sure to cut anything that isn’t up to scratch. However, one piece is rarely enough to show the range of skills a tech artist has, unless you’ve embarked on a monster project with art, tools, shaders and it runs really well. A couple of different things that show your range is fine.

Keep the amount of work from your art specialism low, unless you are very confident that it is comparable to that of at least a junior in your area. If the first person who sees your application is a non-technical Lead Artist and they’re not impressed with your art skills, it doesn’t matter that your tools and shaders are fantastic. Include one piece like this to show you know the pipeline, but more isn’t really necessary unless you’re applying for hybrid roles.

What Shouldn’t You Include?

Don’t include any skills that are not directly relevant to technical art or directly relevant to the art discipline you intend to support. This means that I don’t want to see your life drawing, photography or ZBrush sculpts, even though there’s no doubt that those things will have helped you become a better TA.  I might want to see the sculpts if you were making ZBrush tools – it all comes down to relevancy to technical art, and to the jobs you’re applying to. 

Another thing I don’t want to see is anything straight from a tutorial. There’s no shame in using tutorials, in fact we are all still learning, so its likely that whoever is looking over your application has followed the same tutorial and recognises it! Make sure that your work has your own personal spin on it – show that you gained an in-depth understanding of the technique or concept, not just copied what someone else did line by line.

Presenting work

Good presentation is very important! Good presentation should show exactly what you did and show it off in the best light.

If you didn’t do everything for the piece, explicitly state what you did do, with details about the tools and languages used. For example, if you have screenshots of an environment, did you do the models? The shaders? Tools for placement? Let us know! If at all possible, isolate the elements you did so that its super clear and present quick breakdowns.

Choose the best method of presentation for the piece. Make sure anything with movement or lighting is shown in video and make videos talking through tools.

If you can include a downloadable version or source code, please do! Not everyone will actually look at these, but if we’re unsure about how technical you are this will tell us very quickly.

What about Works in Progress?

That’s why I have this blog. I post things I’m working on, tutorials and personal notes on here. It shows potential employers that I’m keeping up my skills, even if I’m not producing full portfolio pieces. 

A blog is also a cool way to show your writing skills – documentation is a big part of the job, so showing that you can write is helpful. 

If you’ve followed tutorials without making it unique, throw it on your blog with a link to the tutorial.

What about work under NDA?

With any professional work, always check with your manager what you can and can’t show. Show as much as you can without breaking any rules. Optimisation and tools work is the most likely to be affected badly by NDAs. In this case, just describe the work the best you can and put up a video from an official channel of the area of the game you provided this work for.

Many workplaces will not let you put work on a folio but will let you send work straight to a company you’re applying to, so if you are in a position where you can talk about applying to other places this is worth asking about.

Unfortunately we cannot judge what we cannot see, so if you have skills that you can’t show due to NDA, take what you learned and apply it to a personal project that you can show. I know it feels unfair that personal time has to be put in here, but there’s not really any other option.

Your Cover Letter

Many people don’t write cover letters these days, but I think its an essential tool to bridge the gap between the job advert and your folio/CV. The main goal of this letter is to explain how the experience and skills you’ve shown off in your folio/CV can be applied to the company. The first person who sees your application is rarely a technical artist (often an internal recruiter or a lead artist), so this lets that person tick your qualities off against the advert. Its also an excellent space to explain how transferable your skills are, especially if you don’t quite fit what the posting has asked for.

In terms of formatting, I like one page with a polite opening and closing in addition to four short paragraphs of actual content.

First Paragraph

This should be a short and sweet paragraph with some general information about you. You want to include number of years and shipped titles alongside a general overview of your experience. Including what stages of production you’ve seen here is very helpful – many studios want to see a full cycle, but having closed one project and done pre-prod for another is just as useful. This should hook them in and show what you can do for them.

Second Paragraph

Again, keeping it short, this should show what you like about the company and why you want to work there.  You can talk about team size, environment, technology, projects, whatever it is that appeals to you about the company.  This needs to be tailored to each job. This is what they can do for you.

Third Paragraph(s)

This will likely be the largest part of your letter. Here we want to provide that ticklist I spoke about earlier. Compare the responsibilities listed on the advert with your experience. Show that you’ve done this job for someone else, so you can do it for them. Grab key words from the description and use them when describing your experience.

This is your chance to show how skills not listed in the advert are relevant to those that are. Here’s an example of comparing the need for node based shader creation in UE4 to experience with in-house node tools and HLSL.

Though I have spent the last year programming shaders in HLSL, I am also familiar
with node based shader and script authoring, having worked with a similar node based system while at [COMPANY], creating visual effects and object behaviours through node graphs. These activities gave me a strong grasp of vector maths, operands and logic, which I can bring to material creation in Unreal 4.

This also works well for comparing different engines and art creation tools.

Fourth Paragraph(s)

This is a chance to expand on your skills a bit, to talk about what you like and to highlight parts of your folio. If you have a specialism, tell them what it is and how that can help their team.

After this, end the letter by thanking them for reading.

Conclusion

That’s it! With a good cv, folio and cover letter sent to the right job posting you should be on your way to getting an interview. I’m afraid you’re on your ow  from there!

I hope that this information has been helpful to you and good luck with your applications

One Last Thing

Writing this took quite a bit of my time! I don’t have a ko-fi or anything like that but if this was valuable to you and you have some cash to spare please consider donating to Gateshead Foodbank. It gives out emergency food parcels to those in need in my local area and is a cause close to my heart.

MZP for Maxscript Distribution

The Issue

Figuring out how to get your scripts out to a team can often be a tough one! Just throwing your scripts out there is simple, but that leaves artists having to copy lots of files or explicitly run things. This isn’t their job and takes up their time. It also leaves so much room for user error!

MZP files, while not perfect, are designed for distributing maxscripts, can be easily version controlled and are easier to create than an exe. (For info on creating exe files with NSIS see Jeff Hanna’s tutorial.)

With an MZP, the user only needs to worry about getting the latest version of a single file* and can then install it by dragging and dropping it from a windows folder into their 3ds max viewport. It handles any file copying or scripts that need to be ran on installation.

6a67aecd550a29a212ea56783be7ab0f.gif

*Please version your scripts separately, especially if you work with other TA’s! You’re not going to be able to diff on this as it’s a zip file by another name. You just don’t need to point artists towards these scripts. 

An mzp is a 3ds max variant of a zip file, which contains the scripts to be installed alongside a script that will run when the zip file is dropped. To make one, bundle your scripts, along side a .run file (covered below) into a zip file, then change the extension to “mzp”.

934a4ad556d5618c74d6e41939b75536.gif

.run File

The .run file is a batch file that is run when the mzp is dropped. This can run command line commands in addition to the ‘drop script’ – a single maxscript file that will be run when the mzp file is dropped.

Here’s an example of a .run file. It contains the name and version of the script, copies some files, runs a script then clears temporary files.

name “myMZPDistro”

version 0.1

treeCopy “myMZPDistro\Scripts\*.*” to “$maxData\scripts\Tools”

treeCopy “myMZPDistro\Config\*.*” to “$maxData\scripts” noReplace

move “*.max” to “$scenes”

drop “myMZPDistro\Scripts\DropScript.ms”

clear temp on MAX exit

Copying

The treeCopy command copies everything from one directory to another.
The first command copies everything from scripts to the user’s 3dsMax folder, found at \AppData\Local\Autodesk\3dsMax\2019 – 64bit\ENU.

The reason I do this is because my tool is split into many scripts (using my fake class method) and I need to explicitly reference them in order for the main macro script to run. I’d recommend using this folder even if you have a single script – every user will have it and nothing will be stored in temporary files!

The second treeCopy command copies a second folder only if the folder doesn’t exist at the destination. This noReplace option is really handy for things like user settings, especially if you’re in a production environment where you update the tools often.

mzp

Drop

The drop command is used to run a single maxscript when the mzp file is dropped into the viewport. This script should handle any 3ds Max functions you need to happen on installation.

My dropscript here is used to fileIn the main script so that any buttons or shortcuts associated with the macro script are updated. The user is then informed that this has worked. If the script couldn’t be ran because of an error, the user is notified.

There’s not a lot that can go wrong at this stage unless you’ve set your directories or treeCopies up wrong, but it is best practice to add try catches in there to avoid any possibly of silent error. Something as simple as “its broken, contact your tech artist” is infinitely better than things not working without the user’s knowledge.

try
(
fileIn “myMZPDistro.mcr”
MessageBox(“Succesfully Installed Some Tools!”)
)
catch
(
MessageBox(“Something went wrong. Please contact Amy.”)
)

Clearing Temporary Files

Clearing temp is important as by default scripts are stored in temp when the mzp is run. We never want to run scripts from a temporary directory, as these may be cleared. Instead copy scripts into a suitable directory, like $maxData, then use the command:

clear temp on MAX exit

Packaging it Up

Once you’ve created  your .run file and dropscript, its as simple as organising the files into a structure that works for you, then selecting the scripts folder and the .run file, right clicking and selecting Send To > Compressed Zip File (or making the zip file in your program of choice).

Once that’s done, make sure you don’t have file extensions hidden by going to File > Change Folder and Search Options in a windows explorer window, then unticking Hide Extensions For Known File Types on the View Tab.

Capture2

After that, press rename on your zip file, then change zip to mzp. Drag it into a 3ds max viewport, and you’re done!

 

 

 

 

Eldrich Blast VFX

This is a small magic effect I’ve been working on, based on my Fey warlock D&D character. D&D spells are a nice way to find inspiration for vfx.

162125fbd0a938fb9c6f4929ec1d9480.gif

Magic attacks like this are new to me so I learned quite a bit doing it!

Turns out Unity’s default particle trail rendering isn’t great as it tried to construct the trail on the fly – you can see the “kinks” at the start and end of the trail.

I used the minimum and maximum filters in photoshop to make the textures. This is great! Really nice way to make wispy ethereal shapes without much painting.

Capture.PNG

It was also interesting to experiment with how shapes change when applied to different particle types/stretched along a trail – I used Rafles breakdown to learn how to shape a trail texture and I’m happy with how it turned out.

A last minute addition to the effect was the diamonds on the ground. I was ready to call it even though I wasn’t 100% happy, and grabbed a gif. Seeing the effect as a thumbnail helped me see that it didn’t look connected to its environment, so added the floor particles to ground the effect a little.

I picked up on a few things I need to work on during this, particularly to do with my process.

Firstly, I need to use more reference! With environmental or realistic effects I always use reference, but with this qnd with the less realistic effects I’ve made, I was sort of winging it. Effects still need to be grounded in reality even when they’re completely fantastical. The effect improved when I looked at bullet impact references and realized the impact aura should shoot towards the caster, not away from them.

In addition to reference, with multi-part effects like this one, storyboarding could be very helpful – I’m not sure i ever had a clear idea of what the effect actually was!

In terms of the effect itself, the anticipation and impact could be stronger and the pink colour is a little too saturated. Better use of reference and defining a colour scheme as part of planning should help these along.

Looking forward to taking these lessons into the next effect!

Using Structs as Classes In Maxscript

So on Friday I learned, after promising my team a whole new set of maxtools, that maxscript doesn’t have classes, and therefore no way of properly handling modules or scripts split into multiple files. Madness! (I mean, my fault for presuming I’d be able to jump into maxscript that easily, but I figured it couldn’t be that different from Maya Python…)

Anyway, this meant that my toolkit only worked once, in the session that the macro had first been ran. When max was opened for a second time, everything global that was brought in using fileIn was not being treated as such.

To fix this, I used Neil Marshall’s tutorial on how to have a struct act like a class in maxscript, eliminating the need for everything to be global! The variables I needed were declared when I called the constructor of the class, as part of the macroscript, then lived in that scope after that.

So the struct looks like this:

struct variablesClass
(
public

function Constructor =
(
print “Constructing Class”
global me = “Amy”
global you = “Max”
global feelings = “Confusion”
return true
),

function testPrint =
(
print “—————-”
print me
print you
print feelings
print “—————-”
),

initalized = Constructor()

)

and then my script looks like this:

macroScript Test1
category: “Tests”
tooltip: “Test 1”
(
global variablesClass
fileIn “C:/Users/Amy/Desktop/variables.ms”
myVars = variablesClass()

print (“The class: ” + myVars as string)

myVars.testPrint()
)

You can see below that when the macro is run, the constructor is run.  We are able to see the instance of the “class” by printing it and then we can run functions from the struct that use the variables declared in the constructor.

Capture.PNG

To be able to access individual variables, rather than make them global, I declared them in the struct and then called them from there.

Capture2

So it looks like I’ve got a solution for splitting files into modules in maxscript! Going to be a fun day of refactoring tomorrow…

gridUp! Another Photoshop Tool

I’ve just finished work on a new js photoshop tool! This creates grid lines from a number of frames that the user specifies, using photoshop guides. I haven’t posted about this one because it was pretty small and quick.

gridUplogo

Grid

This mostly built on the knowledge I gained when making packUp, but there was one very interesting part – non-modal windows. This seems to be a total no-go on Windows OS post CS6. The info that’s out there about it suggests its a bug, but considering I’m working with CC 2019 and still running into issues, it seems like its not being fixed any time soon.

This makes the tool a little annoying to use – ideally I’d have a floating panel the user can have open all the time. It also raises questions for the future of these tools – I was planning a toolset with a parent window that contains them all, but this needs to function like a photoshop panel in order to be of any use.

To make a panel, it seems I either need to use actionscript or write an actual plugin. In terms of ease, the AS is definitely the winner, but I have zero desire to lean AS and the way it then calls your jsx files doesn’t look great to deal with.

A plugin would be better for the user and more elegant to write. The only issue is…it would need to be done in C++. Time to move over to the dark side? We’ll see.

Anyway, here’s a gif.

35b916cc75212673ddeed8c8de540ea7

…Or not.

The title is referring to the fact that I didn’t actually finish my channel swizzler. I asked about this on twitter and realised that this tool is useful for others, so would be pretty cool to release properly. Unfortunately that means it needs to be flexible, robust and not just work for my one use case.

Had a big battle with directory syntax and json, but setup a number of different scripts for different use cases and a json config where the user can specify their own paths. Bit better than adding 4 environment vars!

To hide my supporting scripts I had to put them in a folder with Only at the end of the name – this meaning it was hidden. Not sure this is the most sensible way of hiding scripts, but sure.

Will wrap this up and distribute it soon – link incoming! Until then, some images of the tool in use below.

create channel textureswizzle

41

Finished Channel Swizzle

I decided to finish off my channel swizzler by creating a working files and Unity asset folder connection, so that the file in the asset folder is never actually edited, and there’s no confusion with which is which. It also means Unity will never import workfiles which will happen if they are stored in the project directory.

Because my hypthothetical users might store their project folder on different drives, locations etc, I decided to control the path through an environment variable. Editing things on the user’s pc like this isn’t always the best course of action, but works well for situations when you can’t bank on getting the user’s documents or another folder that windows knows.

8

To get photoshop to use this, I used $.getenv (which I thought was broken for a while, until realizing I’d made the variable with photoshop open – oops!), and then replaced all the backslashes with forward ones. This is because backslash is an escape character, used for declaring newlines.  Before I did this, the string was broken, and photoshop kept defaulting to its own path instead.

I then wanted to match the folder within workfiles to the folder within assets/textures. This meant I could manage the Unity folder structure via my saved workfile and didn’t need to resave/move/copy anything to get a nice organised folder. To get the last element in the path.split, I had to use string.pop(), which returns the last element of the list while removing it from said list. (or should I say array? We’re not in Python anymore Toto!) This worked nicley for this purpose, but I would like to find the equivalent of Python’s list[-1] as its really handy for this sort of thing.

var myfolderPath = $.getenv('PROJECT_PATH').replace("\\", "/") + '/' + 
     'Assets/Textures' + '/' + String(currentDoc.path).split("/").pop();
var filePath = new File(myfolderPath + '/' + 
     currentDoc.name.replace(/\.[^\.]+$/, '.psd'));

9

Channel Swizzle Script

Following on from my last blog post, I’ve finished most of my channel swizzle scripts. These generate a file with layers for each channel, then export as a new file with the layers combined into one layer as channels. I channel pack all my VFX textures so it will make my workflow a lot faster!

12

If you want to use this, feel free to save it as a .jsx file in C:\Program Files\Adobe\Adobe Photoshop CC 2019\Presets\Scripts, but I’d appreciate if you drop me a comment to let me know. Code below if you want to skip my rambling!

I had a couple of issues related to understanding the class hierarchy – for example, I thought that I could save select all as an object, and then perform copy on that object, but actually I needed to have a selection object, of which selectAll and copy are both methods – but I got there in the end!

I had a very odd “has no constructor” error when trying to make a new SolidColor instance, but the only way I solved it was by copying what looked like the same code from the scripting reference documents. I have no idea why mine didn’t work – an extra space or bad character perhaps? I haven’t found as many resources though google/stack overflow as I normally find for python and maya related topics.

EDIT: The no constructor error comes from forgetting to set Photoshop as your connected target application – just a silly mistake!

This one does currently save as a psd in the same location, with the same name, so will write over the source file. I’m not sure exactly what I want to do in terms of work file and export file right now, so I’ll change that once I’ve decided on a nice workflow.

Also, found a nice way to preserve the whitespace when copy pasting code onto this blog – the <pre></pre> HTML tag allows the text to be pasted exactly as is, which is super helpful and makes it much more readable.

function main()
{
	var currentDoc = app.activeDocument 

	//make duplicate
	fname = currentDoc.name.split(".")[0]
	newDoc = currentDoc.duplicate(fname)

	swizzle(newDoc)
	savePSD(currentDoc, newDoc)
}

function swizzle(doc)
{
	//make new layer to recive contents
	newLayer = doc.artLayers.add()
	newLayer.kind = LayerKind.NORMAL
	newLayer.name = "Channel Swizzle"
	
	//Fill layer with white
	doc.selection.selectAll()
	var myWhite = new SolidColor()
	myWhite.rgb.red = 255
	myWhite.rgb.green = 255
	myWhite.rgb.blue = 255
	doc.selection. fill(myWhite)
	
	var channels = ["Red", "Green", "Blue"]
	var allLayers = doc.artLayers
	var i 
	
	for (i = 0; i < channels.length; i++)
	{
		var myChannel = doc.channels.getByName(channels[i])
		var myLayer = allLayers.getByName(channels[i])
		doc.activeLayer = myLayer
		//select all
		doc.selection.selectAll()
		//copy without merging
		doc.selection.copy()
		//set active layer
		doc.activeLayer = newLayer
		//select channel
		doc.activeChannels = [myChannel]
		//paste
		doc.paste() //needs a try catch for if there's nothing on the layer
	}

	//put active channel back to all channels
	doc.activeChannels = doc.componentChannels
}

function savePSD(currentDoc, newDoc)
{
	//set png settings and file path
	var psdSettings = new PhotoshopSaveOptions()
	psdSettings.alphaChannels = false
	psdSettings.annotations = false
	psdSettings.embedColorProfile = true
	psdSettings.layers = false
	psdSettings.spotColors = false

	//set file path - careful not to echo anything in built here!
	filePath = new File(currentDoc.path + '/' + currentDoc.name.replace(/\.[^\.]+$/, '.psd'))

	//save new doc
	newDoc.saveAs(filePath, psdSettings, true, Extension.LOWERCASE)

	//close new doc and return focus to original
	newDoc.close(SaveOptions.DONOTSAVECHANGES)
	app.activeDocument = currentDoc

}

main()