Getting Started with ProBuilder – Tools and Tips

A personal wish of mine is to have mesh modification tools in Unity. Seeing ProBuilder become part of the engine is a delight, one that I cannot stop smiling at.

The goal of this blog post is to help you to overcome any barriers and start you on the right path to having fun playing with this toolset, using it efficiently and effectively to mitigate any risk of becoming frustrated. So, I wanted to share some tools and tips around using ProBuilder for the first time because it is an excellent tool! If you are a noobie to 3D or an experienced modeller, this post will provide you with some great insights into getting started with ProBuilder. I should mention this is not a step by step tutorial, but I will be sharing helpful tips to getting started in using the tools available to you.

ProBuilder

ProBuilder:

Here are some great keyboard shortcuts that’ll get you building and modifying meshes in no time:

Ctrl + K – Spawns a Cube.
Ctrl + Shift + K – New Shape Tool.

Hold Shift while moving – Extrusion:

Extrusion.gif

Hold Shift while scaling – Inset:

Inset.gif

Alt + U – Insert Edge Loop:

Inset Edge Loop.gif
Alt + E – connects verts/edges:

Connect edges.gif
Alt + C – collapse verts (this will merge all selected verts into one vertex, centred at the average of all selected points):

Collapse verts.gif

Ctrl + Z – Undo – same as anything in Unity.

Escape key – reverts to object selection mode.

Use H, J, and K keys to chose between Verts, Edges and Faces selection modes.

Multi-select faces/edge/verts – Hold Shift and LMB.

Use backspace to delete verts/faces/edges – Delete will delete the object.

In general, tooltips can take 500ms or so to show, in ProBuilder this can be instant by holding the Shift key when hovering the mouse cursor over the feature buttons in the toolbar.

Now, I’ll share some tips and gotchas which I found are useful things to know, but first, if you are new, remember to start simple, common mistake is to start pushing too much geometry, this can become very complicated fast. Start by boxing out familiar shapes, it’s a lot easier to add geometry than to clean up complex geometry. Here we go:

When collapsing vertices, you might want to collapse them to the first vertex that you selected. To do this you need to click on the + button next to the Collapse Vertices option on the toolbar and select Collapse To First in the Options menu pop-up (be aware that all future Collapse Vertices will now Collapse To First if this checkbox remains enabled):

Collapse to first

To select vertices that are hidden out of view on the opposite side of the geometry, you will need to ensure Select Hidden: On is enabled. By default, this is On so be aware when you go to select multiple vertices to modify them.

There are many circumstances where you will need to flip normals to invert the faces of your geometry, ProBuilder has a feature called Flip Face Normals located in the toolbar (you will need to first select some faces on your mesh):

Flip Faced Normals

Use Detach Faces to detach parts of a mesh to a new game object, useful for cleaning up meshes, especially if you have created some ngons. Things to be aware of when using this feature:

  • The pivot will usually be in an incorrect position
    • Use Centre Pivot selection from the toolbar
    • For custom pivot positioning – select a vert – use Set Pivot

When using the New Shape tool to build Stairs. There is an option to uncheck Build Sides. If you know those sides of the object won’t be visible this is especially useful for:

  • Not having to go back and clean this up manually yourself
  • Optimal for baked lighting to ensure you not wasting texture space
    • Also, helps reduce bake times

Uncheck Build Sides.gif

Preferences for ProBuilder – customise shortcut settings

If like me, you like to see how many faces, triangles and verts a mesh has (especially when building on the fly), you will need to enable this in Edit -> Preferences -> ProBuilder -> Show Scene Info (not a great name).

Show Scene Info

ProGrids:

Used to make snapping easier, and excellent for controlling the unit size of your entire geometry, level design at it’s finest. Here are some quick tips:

  • Use +/- keys to scale the grid size – you can change this on the fly depending on your requirements for mesh modifying
  • Select all the verts – select the push to grid button to align current mesh with new grid size
    Hold V to snap objects around

PolyBrush:

A great addition, and lets you sculpt, smooth, texture blend, paint on textures, scatter objects etc.

To sculpt you may need to add additional geometry to your mesh, you can do this via using the subdivide tool, the way this works is it grabs all edges and connects them to the centre, a straightforward implementation, with nothing extravagant happening here.
To sculpt you will need to select the Push tool, which will push (sculpt) vertices on your mesh depending on brush settings, some tips for quickly editing brush settings for sculpting:

  • Hold ctrl to scroll brush up to a larger size
  • Hold shift to change the interior diameter of the brush
  • Hold shift + ctrl to adjust the strength (how much push will be applied to your mesh)

That’s it, I hope to write more of these posts over the coming weeks/months, please share your ProBuilder creations, I cannot wait to see what you create!

Advertisements

WebGL – The Future Ain’t What It Used To Be!

webgl

This post was valid as of 1st October 2015

Web deployment with Unity has took a hit in recent months due to the deprecation of NPAPI plugins in Chrome, which mean’t the WebPlayer plugin has been disabled. All major browser vendors are moving away from plugins.

Current solution is to look at the WebGL build target which came in a Preview state with Unity’s 5.0 release. We know there’s some challenges with supporting WebGL right now, but let me detail what the future should look like.

Why Preview?

WebGL now, is in Preview, it’s a way of Unity saying that some functionality and development needs to happen before they consider it a fully released product. Missing functionality from Unity’s side includes:

  • Substance realtime generation of procedural textures
  • Precomputed Realtime GI – believe that actually requires a port from Enlighten
  • MovieTextures – but actually you can get a nicer video playback using: Simple MovieTextures for Unity WebGL
  • WebCam – coming in 5.3
  • Microphone

Development needed from the browser vendors include:

  • WebAssembly
  • Data compression
  • Shared array buffers
  • WebGL 2.0

How will these help for the Future?!

WebAssembly which allows for taking ASM.js and turning it into byte code, in turn this makes things faster as byte code is faster to parse than JavaScript as well as being faster to execute. This will solve slow load times and slow downloads, also fixing up some memory usage issues.

Data Compression; Slightly self-explanatory, will allow for data to be kept in a compressed format in memory. Currently you need to handle this yourself, but not for much longer. This will greatly help with build sizes.

Shared Array Buffers is a feature that will allow for memory to be shared across web workers, using this Unity can map their current multi-threaded code to JavaScript, so WebGL can benefit from multi-threaded features such as PhysX. No more colliding on the main thread!

WebGL 2.0 – WebGL to become a graphic powerhouse, no really it can. Currently WebGL is using OpenGLES 2.0, remember those good old smartphones?! With WebGL 2.0 Unity WebGL gets the much needed bump up to OpenGLES 3.0, allowing for Unity to lift it’s restrictions on shaders, so we can have image effects (all the bloom you need), deferred rendering, skinning on the GPU. Unity’s 5.2 release included support for WebGL 2.0 as an experimental option, reason; because no major browser vendor has shipped support for it yet as of the date of this post, but you can try with a Firefox nightly build.

Some WebGL tips ‘n’ tricks:

Need to ship projects now with WebGL? Be sure to have taken note of what features in Unity that isn’t supported right now (see above) and also make use of these:

  • Crunched Texture Compression

You can use this feature as a texture format for JPEG like compression ratio and quality, however unlike JPEG it will directly decompress into DXT, so you have compressed textures on the GPU, no loss in GPU memory, happy days! This feature helps with memory reduction and keeping the data size down.

  • AssetBundles

A must use for any Unity project really, but for WebGL it will greatly help with a reduction in memory and build size. Let’s reduce everything!

  • Unity Profiler

If you’re not making use of Unity’s Profiler then you’re doing it wrong, as with any Unity project profile away, it’s fun and a great way of finding your bottlenecks. You should be optimising for WebGL as you do for any other platform in Unity, there’s a lot of resources online for optimising.

  • WebGL Memory Size

Within Unity -> Player Settings -> Publishing Settings you can specify how much memory (in MB) the content should allocate for it’s heap. If it’s too low you will get out of memory errors, but if it’s too high your content might fail to load in some browsers or on some machines, because the browser might not have enough available memory to allocate the requested heap size. Test and find the correct solution for your app. Optimising your app as much as possible will help with memory reduction therefore the need for a high heap size decreases..

  • Multiplayer Gaming

Use UNET in 5.1+ as this will work out of the box as it’s using the WebSocket API – you can also write JavaScript code to directly use WebSockets yourself.

Helpful resources:

Benchmarking can help you test different areas of Unity Engine to see how it performs on the WebGL platform. Unity developed a app so benchmarking can be easily executed: http://beta.unity3d.com/jonas/WebGLBenchmark/

Watch a Unite Europe 2015 talk from Unity’s lead WebGL developer Jonas Echterhoff: https://www.youtube.com/watch?v=RufJDxm6Lq8

Unity WebGL Forums for reporting issues and learning from other developers: http://forum.unity3d.com/forums/webgl.84/

Update:

I recently did a talk about WebGL & il2cpp – you can download the slides here: WebGL & il2cpp