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!

Substance Painter – Meet Mat 2017 Contest

I rarely get any spare time to allocate to other software packages outside of Unity, but every now and again my artistic nature gets the better of me and I’ll dabble into Photoshop or Modo etc.

Last week, I noticed my good friends at Allegorithmic launched a contest called Meet Mat, the contest is a 3D painting contest utilising Substance Painter. It seemed targeted to beginners as well as experts, so I decided to have ago. This is my first time using Substance Painter. I know I could do better but either way I wanted to share the iRay renders I submitted for the contest.

Meet Mat 2017

Meet Unity Mat – Final Render using iRay

 

Meet Mat 2017_1

Meet Unity Mat – Final Render using iRay

Meet Mat 2017_2

Meet Unity Mat – Final Render using iRay

Meet Mat 2017_3

Meet Unity Mat – Final Render using iRay

Meet Mat 2017_4

Meet Unity Mat – Final Render using iRay

I hope you like them! ūüôā

Experimenting with HDR Skyboxes in Unity 5.

Unity 5 has implemented a HUGE update on the rendering / graphics side of the engine, introducing new lighting workflows with realtime GI, a Physically Correct Shader (Metallic & Specular workflows supported) among many other things..

I wanted to do an experiment today, where I test out HDR Skybox’s in Unity 5 to see how drastically the lighting and mood of a scene can change.

HDR:

High-Dynamic-Range is an imaging photography technique to produce a higher dynamic range of brightness. This is achieved by capturing different exposures of your chosen subject matter and combining them into one image.

In Unity we can use these HDR images to help blend 3D models into the environment, this can drastically add to the belief that the 3D model is actually in the environment.

Quick mention – I’m using HDR images from NoMotion HDR’s¬†– 150 free HDR images, check EULA before using for commercial usages.

I’ll be showing how these 3 HDR images help create a completely different feel and look to the scene:

I have daytime, evening and night-time HDR’s, they should all create drastically different lighting conditions in Unity.

Time’s up chumps..let’s do this:

Unity 5’s new standard shader has built-in support for image based lighting (IBL), this really helps with the belief that the 3D model is in the environment I am setting with the HDR skybox.

Here’s the model with just Unity 5’s current default procedural skybox:

Default Skybox

With a bit of trickery (not really, just pushing a few buttons in Unity), let’s now see what happens when I add the daytime HDR Skybox:

Daytime Skybox

I haven’t messed with any lights at all, all I have is the default Directional Light in the scene with default settings. looks rather impressive after just adding a new HDR Skybox to the scene.

Let’s try the evening HDR Skybox now:

Evening Skybox

Awesome, I am really enjoying playing around with this, I love how quickly I can completely change the lighting conditions which in turn drastically changes the mood and atmosphere in the scene. I can’t wait to see how games are going to utilize these new features.

Okay, last one, the night-time HDR Skybox, I’m a little skeptical about this one, I’ve no idea how this will look and I imagine it’s not really desirable to use a night-time HDR image. Anyway, let’s see what it looks like:

Nighttime Skybox

Actually turned out rather well, the image doesn’t show the white spots on the model as much as in the editor, these white spots are produced by the specular smoothness on the Standard Shader, i.e the more smooth I make it the more white spot artifacts are produced, not sure why this is more present in the night-time scene, I’m sure there’s a setting I’ve missed or something..

Overall, I’m really impressed with this, especially how quickly I can change the mood and lighting of the scene and the visual output from Unity 5’s new rendering / graphics update.

Look forward to seeing what you all produce with Unity 5. ūüôā

R&D with new Unity 5 Graphics..

My job is based on supporting Unity’s customer base in the EMEA region, to do a good job that means I need to learn all of the Unity things, features and new services, at least on a high level.

I tend to experiment a lot with Unity’s new features, today I wanted to share with you some of my R&D with Unity 5’s new Graphics overhall, this includes the new Physical Based Shader, Realtime Global Illumination and the new Scene Render Settings.

My experiments are usually aimed at producing a small scaled demo that can squeeze in as many features as possible, this enables me to demonstrate these features easily to customers while in the field.

Field

PBS (Physically Based Shader):

Unity’s new Physically Based Shader a.k.a one shader to rule them all a.k.a standard shader (actual name) allows us to create materials for a wide range of natural surfaces such as Metals, Dielectrics (non-metals): monolithic materials = rock, water, plastic ceramic, wood, glass etc..cloth and organic.

The new PBS also plays nice with IBL (Image Based Lighting), we can setup a skybox cubemap in the new Scene Render Settings to help with really blending our objects into the surrounding environments:

Scene Render Settings

One demo (not developed by me) shows a nice range of different surfaces used by the new standard shader in Unity 5:

We can see there’s at least six¬†different surfaces represented here with the usage of just one shader – Ceramic, Cloth, Metal, Glass, Rock and Wood. The Scene Render Settings really help blending the Doll model into the surrounding area, helping us believe that the Doll is in the Forest environment.

The new shader includes many different texture slots, allowing you to add really nice detail to models. The shader includes a multi-variation of smaller shaders with versions for mobile and high-end.

Standard Shader PBS

Our built-in shader code is always available for download and currently with Unity 5 this will include the new standard shader as well – Could change but I doubt it.

Realtime Global Illumination:

The lighting for realtime is half pre-computed realtime lighting, allowing you to dynamically light your scene, dynamically changing: light sources, environment lighting and material properties such as diffuse reflective and surface emission.

Geometry needs to be marked lightmap static but you can relight geometry using Light Probes¬†that are updated in realtime with the GI generated from¬†the static geometry. In my little demo I’ve combined the usage of Realtime GI, PBS, Reflection Probes and Light Probes, the majority of the objects marked as static apart from a few props¬†which demonstrate the usage of Light Probes for non-static objects:

Couple of shout outs, I’ve used the Medieval Assets Pack by Naresh and the Medieval Boat from Mr Necturus which are available on the Asset Store for most of the props. The wooden cottage model center piece is a free model from some site I can’t remember.

Here’s a Vine I recently sent out, little outdated comparing to the above screenshots, but demonstrates the realtime GI in editor with play mode on:

There’s more of this to learn as Unity 5 develops through the beta stage. Note: Screenshots from beta version of Unity 5 – May look different when released.

Also worth sharing is what Alex Lovett is doing with the Unity 5 beta and Realtime GI:¬†http://forum.unity3d.com/threads/unity-realtime-reflections-and-gi-and-realism-exploration.266258/ – Now if only my Realtime GI R&D looked like that ūüėÄ

Unity5 Announced!

Unity5http://unity3d.com/5

I’m getting straight to the point here, what is in included in Unity5:

Physically-based Shading:

There’s a new shader to setup great looking materials in a range of lighting environments, it’s one shader to rule them all, an uber-shader one might call it, you can use it for a range of different surfaces such as wood, metal, plastics, ceramics, cloth and many others.

Unity5_Teleporter

Realtime Global Illumination:

Built upon Geomerics Enlighten Technology, Unity5¬†has integrated realtime physically-based Global Illumination for cross-platform, runs super nice on mobile / tablet devices. You can animate lights, setup beautiful environments lighting and make use of emissive materials to create stunning effects and visuals. What’s really nice, as an added bonus, you now don’t need to be rebaking any lightmaps, which is especially painful when bake times are long for larger scenes, Global Illumination updates immediately upon making any changes to help dramatically increase iterative times.

WebGL:

The plugin-less browser technology is approaching fast and Unity5 will offer the option to deploy to WebGL without the need for a plugin download to playback content, with a one-click deploy system the building times are super fast and simular to what our WebPlayer plugin build system is like.

Audio Mixer:

New audio mixng technology enters Unity5 with simple workflows for setting up different sounds within your 2d / 3d games. Setup realtime mixing graphs, ability to edit tweak in play mode, create and blend between snapshots, insert effects into the mixers, implement ducking of sounds and many more..

UnityCloud:

This service offers the ability to integrate cross-promotion campaigns for acquiring players and help with retaining them

64-bit Editor:

64-bit editor brings massive improvements to Unity for handling demanding tasks 32-bit version might just crash on with out of memory, the runtime was ported a while back now, but getting the editor ported with all the dependencies took time.

PhysX 3.3:

The much requested update to PhysX has arrived, NVIDIA completely rewrote the system, bringing excellent performance boosts which is great for mobile / tablet devices. A new wheel collider is available amongst other things, more PhysX 3.3 features will be exposed later in the 5.x cycle.

There’s many more features in Unity5¬†which will just populate my blog, but here is more smaller but equally juicy feature set:

  • AI: NavMesh supports LoadLevelAdditive.
  • NavMeshObstacle supports two basic shapes – cylinder and box for both carving and avoidance.
  • Editor: The editor is now a 64-bit application.
  • Graphics: Improved ambient lighting.
  • Cubemaps support texture compression
  • Improved LODGroup. A “fade mode” can be set on each level and a value of “how current LOD be blended/faded to the next LOD” will be passed to shader program in unity_Scale.z.
  • Non-uniformly scaled meshes no longer incur any memory cost or performance hit.
  • PluginInspector: new plugin system.
  • Scripting: Introduced option to auto-update obsolete Unity API usage in scripts / assemblies.
  • Version Control: Scene and Prefab Merging.
  • Asset Store: The asset store window is now many times faster, more responsive, and looks better.
  • Model importing: Updated FBX SDK to 2015.1
  • Windows Store Apps: You can now use joysticks in addition to Xbox 360 controllers

For a more visual look at Unity5‘s new feature set, take a look at the official Unity Feature Preview video:

With such an exciting announcement I can’t wait for all you guys to get your hands on this awesome toolset!

Thanks!

Modelling a Sports Stadium

Rugby Skills Challenge 2013

I’ve had a great month and half or so developing a 3d model and beta testing on a recently released iOS title by game developer Russ Morris.

We got talking about his Rugby game at the Unity UK¬†Christmas party and Russ mentioned about needing a Stadium model for his game, naturally I said “hey, I’ll give it a go” and after a lengthy conversation in which¬†I¬†actually remember the day after, I¬†nagged him for a bit to send over the details, thankfully Russ obliged and the creative development began.

So I wanted to blog about the development of the stadium model and some of the techniques I used, trying to keep it as low poly as possible for mobile development.

Starting point:

My starting point is the centre piece, the field of play, I needed to research the typical dimensions for a Rugby pitch. Modelling the basic¬†rectangular¬†shape then expanding out from there, having the focus point in place gave me a good start in terms of thinking and planning the architecture of the model. Using reference images taken from Cardiff’s¬†Millennium¬†stadium and the Aviva stadium in Ireland, the important thing was to ensure the shape and¬†architecture¬†of the model was directed at the main focus point (the field).

Pitch

The design is to have the curved corners in the tiers, so the stadium is a full oval curved shape like most modern day stadiums have. From here I started building up the second tier and adding some basic roof structure just to get an idea and feel for the model.

Adding details:

I quickly moved on to adding details to the tiers, adding steps and entrance points for isles, the challenging area was creating the corner tiers, I used the technique of extruding and rotating each time by hand, but I could of used the bridge tool and add the correct amount of segments, then reposition each set of poly’s, either technique would of worked fine.

Adding Detail

I finished the lower tier, so I had a fully completed lower tier with steps and isle details added, the good thing is, for the top tier, I can duplicate the lower tier and make adjustments to the positions of some poly’s and up scale when needed, no need to fully model the top tier from the start again. Here’s both tiers fully completed:

Fully completed stands.

I needed to close the gaps up and model some outer geometry, I modelled a bunch of cubes and joined the verts together at each adjacent point, It was just about getting the right positions and joining the correct verts together.

Creating the roof:

The roof structure design is to be based on the Millennium stadium in Cardiff, the corners needed to have gaps, the support structures needed to be added as well.

The Millennium Stadium
Adding roof structure
Support structure

Combining all this together gives me something nearly complete, all the rest of the tweaks were added by Russ in the game project, such as texturing and advertising boards etc.. Here’s the final model in Modo:

Rugby Stadium

Download and install the game now, you can download it by searching for Rugby Skills Challenge 2013 on the app store or by clicking the image below which redirects you to the app store:

appstoreThanks!

Unity and the Beast

I must say I experiment a lot with Lightmapping in Unity using Beast and I have never wrote anything about it, so I wanted to share what it is and how it might be useful to some of you.

Since the time of Quake¬†which¬†was the first video game to utilize lightmapping, Unity has integrated the Beast lightmapping technology for both the pro and free version, yes! you can use expensive rendering power for free on your games, I know what your thinking…this is awesome, and it is, ¬†lightmaps can really bring your environments to life.

What are lightmaps?

If you have read this far without knowing what lightmaps are, I’ll give a quick overview, a typical lightmap is light data stored into a texture and applied to static objects in your scene, lightmaps in Unity take into account meshes, textures, materials and lights.

Unity contains 3 lightmapping modes to choose from, Single Lightmaps. Dual Lightmaps and Directional Lightmaps, each mode has slightly different functionality.

Single lightmap mode uses the far lightmap only, this is a baked texture, so pre-computed and contains full illumination.

Single lightmaps

Dual Lightmaps use a near and far lightmap texture, the near lightmap texture contains indirect illumination from lights set to auto, full illumination if your lights are set to BakeOnly, emissive materials and sky lights.

This near lightmap is only used when within the distance of the camera, when within the camera distance auto lights are rendered as realtime allowing for specular, bump and realtime shadows, this is not a feature for single lightmaps.

Single and  Dual Lightmap

On the right hand side on the image showing dual lightmapping, the near lightmap texture is used, this is because we are within the camera’s distance, near lightmap texture is showing both specular and bump, as if it was realtime lighting. If we were to pan the camera away from the leaf we would eventually not see the bump and spec because it will fallback to the far lightmap, which is shown on the left.

Using Directional lightmapping in Unity has the ability to bake specular and normal maps into the texture without using any realtime lighting, the lightmaps encode the direction of the light so that it can be used in the pixel shader to vary the lighting depending on the per pixel normal and calculates specular for the average light direction.

The image below shows baked specular using directional lightmaps, I have a simple mouse orbit script attached to the camera which allows me to see the specular highlights on all the cubes in the scene.

directional lightmap

Other area’s of lightmapping which I haven’t mentioned in any real detail or at all are using emissive materials, they can give some really interesting effects, as well as area lights, light probes and lightmapping¬†dynamic objects, that’s a whole new¬†dimension¬†of fun.

Maybe I’ll write about those some other time, for now I encourage you all to have a play around with lightmapping. Catch you soon!