Tutorial: Electric Dreams - Tire Deformation

During the demo called Electric Dreams developped by Epic Games, I had the pleasure to work as a Technical Artist on fun feature such as Tire Deformations, Water Impact on the car, Nanite Suspension and many more …
I wanted to take some time to show you some tricks in order to help you understanding how things are done behind the demo.

https://dev.epicgames.com/community/learning/tutorials/BEZV/unreal-engine-electric-dreams-tire-deformation

This is fantastic

1 Like

awesome!

1 Like

This is a great tutorial thanks!

I am curious about how you guys handled the collision between the tires and the terrain. Those meshes on the ground are super dense and very high poly count, even if just using the fallback verts. Did you guys really collide or perform height traces against that complex geometry? Or did you simplify it to convex shapes or something. It looks very accurate when driving over top of the dirt pathways. Or did you guys convert your colliders to a height map or something?

thanks!

How do I create such radial sceleton? I guess, the only way is to use external 3D modelling software for that?

yes. This function can create evenly distributed points around a radius. Can run that in your browser and just add the joints in Blender/Maya etc

import math

def generate_points(num_points, radius):
    points = []
    angle_increment = 2 * math.pi / num_points

    for i in range(num_points):
        angle = i * angle_increment
        x = radius * math.cos(angle)
        y = radius * math.sin(angle)
        points.append((x, y))

    return points

# Example: Generate 20 points with a radius of 5 units
points = generate_points(20, 5)
for point in points:
    print(point)

This would only make one row. I’ve made bones in blender, started with zero knowledge and some help from ChatGPT. Now I’m struggling with multiple roots, as each bone is it’s own root starting from (0;0) coordinate, and Unreal cannot import fbx with multiple roots. But Blender does not allow me to make zero-length bone as a root too, though. Don’t know how to solve that… Except, make a bone from non-zero coordinate and it’s tail at zero coodinates?

correct it will make a single row. But you can just copy paste the rows to make as many as you need. All rows should only have a single parent, which is your root bone. Or you can just use the skeleton referenced from this tutorial project if you don’t want to make one yourself

There’s a tutorial project?!

yeah its in the link Marien provided at the top

Unless I’m missing something, it’s the link to the tutorial, not the project.

Following this Tutorial like 3 times cant seem to get the deformation to transfer to the Static Mesh. I’ve even downloaded the file crossed referenced everything 1:1 and still not working. UE5.3

Hi @Marien_ElAlaoui ,

First I wanted to say thanks for taking the time to create this detailed tutorial last year and sharing it with us! I think many of us in the automotive field have been seeking solutions like this. As one with no background of game dev, I was really intrigued by the approach of getting the bone data to the material via a render target that’s updated by Niagara. Learned a lot here!

I initially struggled with jelly-like deformation, but tweaking the flesh asset made the deform more stable. The only issue now is that if the tire is spinning very fast, it balloons out like an RC car tire! :laughing: Though I’m imagining this won’t be an issue when rendering in MRQ with many temporal samples.

One thing I am still struggling with still is collision detection - it doesn’t always deform around certain static meshes, and I’m not sure why it works on some and not on others. All of the static mesh actors should be gathered and added to the DeformableCollision component. Is it possible for the DeformableCollision component to use complex collisions instead of simple?