Search Unity

Speed up your artist workflows

September 1, 2021 in Engine & platform | 12 min. read
Puzzle project
Puzzle project
Topics covered

Is this article helpful for you?

Thank you for your feedback!

Our new e-book, 70+ tips to increase productivity with Unity 2020 LTS, is now available. In connection with its launch, we’re writing a series of blog posts that highlight some of the time-saving tips and tricks you’ll get from this free guide.

While the first blog post focused on ways to speed up your workflows in the Editor, this second post pulls out some great tips meant specifically for artists. Don't miss out on productivity-boosting improvements available in Unity 2020 LTS to help you save time and focus on your core creative work.

In this post, we cover Prefab and animation workflows, working with Gizmos and icons, the Progressive Lightmapper, and more. 

Build scenes flexibly with Prefab workflows

Make sure to fully leverage the workflow with Nested Prefabs and variants that let you build your scenes flexibly and efficiently.  

Nested Prefabs allow you to parent Prefabs to one another. You can now create a larger Prefab, such as a building, composed of smaller Prefabs for the rooms and furniture. This makes it efficient to split your assets’ development across a team of multiple artists and developers, who can all work on different parts of the content simultaneously.

A Prefab Variant allows you to derive a Prefab from other Prefabs, much like inheritance in object-oriented programming. To change the Variant, just override certain parts without worry of impacting the original. You can also remove all modifications and revert to the base Prefab at any time.

Alternatively, if you want to change all of your Variants at once, apply changes directly onto the base Prefab itself.

Prefab variants
Taken from the new Unity 2D demo, Dragon Crashers, these Prefab Variants have different weapons and abilities.

Use Apply All to Base to propagate changes to the Base object or Revert All to undo the overrides.

See Nested Prefabs and Improved Prefab Workflows for more information about working with Prefabs in Unity.

Use TextMeshPro for more styling and texturing options

TextMeshPro replaces Unity's UI Text and the legacy Text Mesh. It uses custom shaders and advanced text rendering techniques to deliver flexible text styling and texturing.

Use TextMeshPro to get access to features like character, word, line, and paragraph spacing, kerning, justified text, links, over 30 rich-text tags, support for Multi Font and sprites, custom styles, and more.

TextMeshPro example from Dragon Crashers

Set your Transforms quickly with Snapping

Working on a grid helps you fit your Prefabs together with less guesswork and greater consistency. Design your level so the pieces connect at scale, making it easier to rearrange and reassemble them. 

If you are constructing your Scenes from modular assets, remember to use grid planes to align your GameObjects with each other. Rather than manually typing in round numbers into the Inspector, consider letting the grid snapping tools set your Transforms more quickly and precisely. 

Grid and Snap settings
The Grid and Snap settings

Unity provides three types of snapping to help you assemble your scenes quickly:

  • World grid snapping: Make sure the Move tool has the handle orientation set to Global. Hold Ctrl (Windows) or Cmd (macOS) to snap an object to the world grid increments set in Edit > Grid and Snap Settings
  • Surface snapping: Hold Shift and Ctrl (Windows) / Cmd (macOS) to snap an object to the intersection of any Collider.
  • Vertex snapping: Hold down the V key while the Move tool is active. This moves the current GameObject to the vertex position of another mesh. Before moving, hover the mouse over one vertex of the active GameObject to make that vertex act as a pivot. Shift-V toggles Vertex snapping mode on/off.

Combine Vertex and Surface snapping for quick placement:

  • Move the GameObject using Vertex snapping with the V key or Shift-V. Hover the cursor over a vertex as a pivot. Snap to another vertex as usual.
  • Hold down the Shift and Ctrl (Windows) / Cmd (macOS) key combo to drag along the surface of the target Mesh.
  • Release the mouse button and V key once the object is at the desired location.

Open the Grid and Snap window from either Edit > Grid and Snap Settings or from the grid visibility dropdown menu.

Need even more control? Consider using the ProGrids package for even finer control of your snapping and grid planes.


More tips for the Animation workflow

You can animate just about any property in Unity without writing a single line of code using the Animation window (Window > Animation > Animation). In addition to modifying movement, you can even drive parameters defined in your custom scripts.

You can create Animation Clips in this window or work in a third-party DCC package of your choice (Autodesk® Maya®, Blender, etc). Think of each clip as an individual unit of motion.

Animation window
Animation window
The Animation window can represent the same animation data as curves or a dopesheet.

Edit the AnimationClip Asset within the window in either Dopesheet or Curve mode. Use K or C shortcuts, respectively, to toggle between the two. Use standard shortcuts to frame all keyframes (A) or frame selected keyframes (F).

Once you have several Animation Clips for your GameObject, the AnimatorController acts as a state machine to create a flowchart-like graph between them.

This allows you as an artist to produce sophisticated animation with greater independence from programmers. If you’re using a 2D or 3D rig, you can animate its body parts with different logic. Take advantage of the layering and masking features for greater control. Prototype your motions in a visual programming tool to fine-tune any transitions or interactions between your clips. 

Extend this further using the Animation Rigging package. This package provides a library of rig and inverse kinematic constraints that can create procedural motion. Animated skeletons can thus interact with the environment with “runtime rigging,” or physics-based constraints can add dynamic secondary motion.

Optimization tip

While AnimatorControllers offer convenience, be aware of a few caveats:

  • Avoid overusing Animators, particularly in conjunction with UI elements. Animators cause the UI Canvas to rebuild each frame, even if no animation is playing. Whenever possible, use the legacy Animation components for UI or simple animations. Also, consider creating tweening functions or using a third-party library (e.g., DOTween). 
  • By default, Unity imports animated models with the Generic Rig, but developers often switch to the Humanoid Rig when animating a character. A Humanoid Rig calculates inverse kinematics and animation retargeting each frame, even when not in use. If you don’t need these specific features, save on CPU time and use the Generic Rig.

Refer to the manual pages about AnimationClips and AnimationController for more information about their usage. Read Unity’s evolving best practices for more about optimizing your animation components.

Use custom gizmos and icons to unlock greater Editor functionality

Gizmos are small overlay graphics associated with your GameObjects. Use them to navigate the viewport or locate specific objects.

Modify the icons for a GameObject using the Select Icon menu. Choose Other to define your own icon.

Use the drop-down in the Inspector to switch gizmos.

Select a custom gizmo using the Other… option.

You can also create gizmos with scripts and make them interactive. For example, a gizmo could help you define a volume or area of influence for a custom component.

In this example, a script changes the gizmo based on a selection.

Use the Gizmos dialogue in the Scene control bar to toggle specific gizmos or globally enable/disable all of them.

See Creating Custom Gizmos for Development for usage examples. Also, review the APIs for Gizmos and Handles

Speed up your lightmapping

Lightmapping allows you to precalculate both direct and indirect lighting, then store the result in a Texture called a lightmap for later use. Unity offers a number of Global Illumination (GI) techniques to produce high-quality lighting and shadows. Though lightmapped geometry is performant at runtime, baking a lightmap has historically been expensive.

The final scene with lightmaps applied
The final scene with lightmaps applied
The same scene without lightmapping
The same scene without lightmapping

The Progressive Lightmapper is a fast path tracer that produces a result quickly, then refines the render over time. You can thus interrupt the process to make changes without waiting for the final bake to complete, allowing you to iterate more rapidly. 

Here are some tips to speed up your lightmapping:

  • Enable Prioritize View so the Progressive Lightmapper works on texels currently visible in the Scene view first before changing anything outside of view.
  • Reduce unnecessary Samples (Direct and Indirect Samples) and Bounces (two is usually sufficient; only increase if necessary).
  • Optimize the Lightmap Resolution and texel count for your lighting needs. The number of texels represents how much work your lightmapper needs to do. Because lightmaps are 2D textures, doubling the lightmap resolution quadruples the amount of work.
  • Reduce texels on hidden surfaces, small or thin objects, or anything where lightmapping won’t make much impact. Each MeshRenderer contributing to Global Illumination has a Scale in Lightmap option to reduce its relative UV size in the lightmap. 
  • Choose the proper Lighting Mode: Baked Indirect, Subtractive, ShadowMask. You don’t need to bake shadows if it’s not required for your art direction.     

The current Progressive CPU Lightmapper uses your machine’s CPU and RAM.  The newer Progressive GPU Lightmapper (in Preview) uses your GPU and VRAM, potentially speeding up the bake considerably. If your computer meets the hardware and software requirements, this can dramatically accelerate up your lighting workflow (tenfold in some cases).

Preview of a baked lightmap
Preview of a baked lightmap

Optimize lighting with Light Probes

Global Illumination produces beautiful indirect lighting, but this can be expensive to calculate and store on disk. If you have set dressing or other static meshes that don’t absolutely require lightmapping, consider removing them from your lightmap bakes and use Light Probes instead. 

In this example, Light Probes could approximate both direct and bounced lighting for the smaller objects, reserving the higher-quality lightmapping where it’s more noticeable. Lightmaps applied to the Viking Village project:

Formerly reserved for dynamic objects, Light Probes can apply to static meshes as well. In the MeshRenderer component, locate the Receive Global Illumination dropdown and toggle it from Lightmaps to Light Probes.

Light Probe illumination does not require proper UVs, saving you the extra step of unwrapping your meshes. The Spherical Harmonics basis functions used in probe lighting make it fast to calculate relative to lightmapping. Arrange Light Probes and Light Probe Groups spatially in the scene. Probe lighting typically bakes faster than lightmapping. A Light Probe Group with Light Probes spread across the level:

See Static Lighting with Light Probes for information about selectively lighting scene objects with Light Probes.

For more about lighting workflows in Unity, read Making believable visuals in Unity.

Get the new productivity e-book

Want all the tips now? Download the guide, 70+ tips to increase productivity with Unity 2020 LTS for free. You will need to fill out a short form to have the e-book sent to your inbox. Enjoy these tips and hit the link above to get the rest! Also, use the comments section to let us know if these tips are useful, and what you’d like to cover next.

September 1, 2021 in Engine & platform | 12 min. read

Is this article helpful for you?

Thank you for your feedback!

Topics covered
Related Posts