1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna

[Tutorial] [Intermediate] Recreate Need For Speed Carbon’s Autosculpt in Unreal Engine 4 and Blender using Shape Keys and Morph Targets

Before following this tutorial, please note that this is not a step-by-step tutorial and it assumes you have some familiarity with Unreal Engine and Blender or a similar 3D package.
If you’re a complete beginner Tesla Dev has a good video tutorial on Morph Targets ( https://www.youtube.com/watch?v=r0Jlu3mI6v0 )

Intro:
When I first played Need for Speed Carbon I was amazed by the Autosculpt system and wanted to know how they’ve done it. While I didn’t find out at the time, while playing with Morph Targets in Unreal Engine recently, I figured they could be used to recreate a system similar to Autosculpt.

For those who haven’t played the game, Autosculpt was a feature that allowed you to do fine visual tweaks on different car parts such as wheels, bumpers, spoilers, side skirts, etc by adjusting a few sliders. These adjustments allowed you to vary several properties such as size, position, rotation, pulling on various groups of vertices to achieve numerous unique variations of a car part. 

Here’s what we’re going to achieve:

image

Part 1 - Blender
First of all we have to prepare the mesh. I’ll be using Blender for this but the following is achievable in most 3D packages such as 3DS Max and Maya. You can also make this in Unity instead of Unreal Engine.

The key feature in Blender which will help us achieve our goal is called Shape Keys. Shape Keys allow you to define several variations of a mesh and smoothly blend between them.

We start with a fairly simple car rim and tyre as one mesh with the modifier stack collapsed. This is needed due to Shape Keys not working with modifiers. So if you built your rim using the Array modifier you’ll unfortunately have to apply it to continue.

It’s important to keep your topology as simple as you can, avoiding any unnecessary topology such as no loops on the spokes like below. You’ll see why in a moment.

Important!
Before you go any further make sure your mesh’s scale is applied as it will cause issues if not. To do this select your mesh, press Ctrl + A and select Scale.

image

Now go to the Data tab in the Properties panel and under Shape Keys click the “plus” icon to add a new shape key. This will add your Basis Key which defines the base shape of your mesh. Then click once more to add a new key, double-click it’s name to rename it and call it Split, followed by setting it’s Value slider to 1. 

image

Now press Tab to go into Edit Mode and tweak your mesh to look similar to below. After you’re finished exit Edit Mode.

Note: This is where not having an edge loop on the spoke helps as you can bend it out of place by just moving the top vertices retaining its overall shape. This is a bit tedious and while it might be tempting to use the Array modifier to model just one spoke of the rim and duplicate everything it is unfortunately not possible due to the incompatibility of Shape Keys with the Array modifier.

image

After modifying your mesh like above you can drag the Split slider and see how your mesh blends nicely between the 2 variations.

image

Now you can move the slider to 0 and click on “plus” to add another Shape Key

The process from here is the same:

1. Add Shape Key
2. Set the value to maximum
3. Enter Edit Mode > Modify your mesh to represent the maximum deformation for that Shape Key
4. Exit Edit Mode and play with the new Shape Key to check if you’re happy

I’ll quickly demonstrate all my Shape Keys and let you to either try and do the same or come up with your own.

Width - modifies the top width of the spokes

image

Poke - pokes the centre of the rim in

image

Offset - moves the entire spoke assembly in and out (deep dish style)

image

Twist - rotates the centre of the rim only

image

Radius - changes the radius of the rim (hint: use Proportional Editing to make this)

image

Tire - changes the tire width (if you want fat Lambo tires)

image

All that’s left to do in Blender now is to export this as a .fbx file and import into UE4. So go to File > Export > FBX and use the below settings.

image

This is for the Blender part now let’s jump to Unreal.

Part 2 - Unreal

In Unreal the feature that allows us to use the Shape Keys we created is called Morph Target. These are a property of Skeletal Meshes so we’ll have to import our wheel like one.

In a project of your choice import the .fbx you exported earlier and match the settings underlined in red. You can leave everything else as default.

image

After you’ve done the settings press Import and double click your rim in the Content Browser. Go to the Mesh tab and your Shape Keys/Morph Targets are on the right. You can now adjust these as you did in Blender and combine them to achieve rather unique variations of your mesh. 

As a bonus UE4 allows you to move the slider negatively down to -1 so you can get the opposite result to the original intent of your shape key. This might end in some interesting or just outright funny results!

image

To adjust these sliders within a game, use the Set Morph Target node in Blueprint which you can drive using a UMG slider or whatever else you prefer.

image

Challenge: Try and use the above techniques to tweak another car part!
Did you know?: You can use these techniques to also make customisable doors, windows, stairs and many other things. 

Hope this was helpful and if you have any questions send me a message and I’ll try to answer.

ue4 unrealengine unrealengine4 blueprints blender b3d racing nfs need for speed carbon tuning jdm tutorial training cgi
This is my 3D printed spin-off on a Romanian tradition of sowing wheat in the form of this cute hedgehog :)
Started with this model by Tomi3D (http://www.thingiverse.com/thing:506088) and modified him in Blender to make him hollow so I can put the...

This is my 3D printed spin-off on a Romanian tradition of sowing wheat in the form of this cute hedgehog :)

Started with this model by Tomi3D (http://www.thingiverse.com/thing:506088) and modified him in Blender to make him hollow so I can put the wheat inside.

Printed it in PLA on a Wanhao i3 and although it didn’t print as good as I wanted, it was good enough for the purpose.

I’m really happy how it turned out. Hope you like it too :)

3d printing wanhao 3d makersmovement maker blender b3d blender3d wanhaoi3 plants wheat hedgehogs cute cute animals
My LD36 entry is done!
Decimus Maximus is an ancient vehicle combat game, featuring catapults, battering rams and iron spikes.
Quite happy with this one as it’s both a genre I love (vehicle combat) and the first time I made a 3D game during a game...

My LD36 entry is done!

Decimus Maximus is an ancient vehicle combat game, featuring catapults, battering rams and iron spikes.

Quite happy with this one as it’s both a genre I love (vehicle combat) and the first time I made a 3D game during a game jam.

Here’s the link to my Ludum Dare submission: http://ludumdare.com/compo/ludum-dare-36/?action=preview&uid=34175

I’d really appreciate if you could play and rate! Thanks!

gamedev ue4 unrealengine Unreal Engine 4 ld36 ldjam ludum dare blender 3d games