1
$\begingroup$

I am prototyping a racing game in Unreal 5 and using Blender to build the tracks. The game uses the normals on the track mesh to calculate the orientation of the race car.

To make the track in blender I created a track segment and a Bezier curve. I then used the Array Modifier and Curve Modifier to array the track segment along the curve. I then applied Shade Smooth to the mesh. The problem is that the Shade Smooth does not work as desired. The smoothing applies to each track segment, and does not smooth the entire track together.

For reference, I can achieve the desired mesh normals if I create a mesh (e.g. a UV Sphere), apply Shade Smooth, and export the FBX from Blender. In this case the mesh looks smooth in Blender and the car drives smoothly on the surface of the sphere when the mesh is used in game in Unreal.

TL;DR - How can I combine Shade Smooth with the Array Modifier? Or, if there is a different strategy to build a track along a Bezier curve I would be grateful for input.

  1. The track segment.

enter image description here

  1. The track.

enter image description here

  1. Shade Smooth appears on the individual track segments, but not across the length of the track.

enter image description here

  1. The track after enabling Array Modifier > Merge.

enter image description here

  1. Rendering of the track and vertex normals (red lines) in Unreal. Note the vertex normals are parallel to the face normals, rather than matching the normal of the track curvature.

enter image description here

enter image description here

  1. These images show correct (top) and incorrect (bottom) vertex normals on a sphere in Unreal. Both spheres were created with Blender. The vertex normals are only correct when Shade Smooth is used.

enter image description here

enter image description here

$\endgroup$
7
  • $\begingroup$ what does it give if you enable the Merge option of the Array modifier? $\endgroup$
    – moonboots
    Commented Dec 3, 2022 at 21:57
  • $\begingroup$ This does not appear to fix the issue when viewed in Blender. I also confirmed it does not solve the problem by testing in Unreal. I added a screenshot. $\endgroup$ Commented Dec 3, 2022 at 22:19
  • $\begingroup$ did you subdivide your track part at all? $\endgroup$
    – Chris
    Commented Dec 4, 2022 at 1:28
  • $\begingroup$ @Chris Each track segment has some subdivision, but I haven't used the Subdivision Modifier. Can you clarify your question? It's not clear to my why additional subdivision would help. $\endgroup$ Commented Dec 4, 2022 at 2:33
  • $\begingroup$ @StarmanDeluxe: it depends always on your settings. Would be great if you could provide your blend file so we can help you. e.g. if your track part is pretty long, subdivision might help. Also merge might help. But as long as we cannot try it out ourself with your blend file - we can just guess around. Maybe even just your face orientation is wrong...or whatever. [1]: i.sstatic.net/M1sVY.gif $\endgroup$
    – Chris
    Commented Dec 4, 2022 at 8:06

2 Answers 2

0
$\begingroup$

just change the resolution preview of your curve to something high:

enter image description here

result:

enter image description here

if you type in a number manually (not by dragging) you can even go e.g. to 256 and you will get:

enter image description here

$\endgroup$
2
  • $\begingroup$ I tried 64 and 256 for the Resolution Preview in the Bezier curve's Object Data Properties. Unfortunately neither value fixed the situation. I believe the problem is because when the Array Modifier is used the vertex normals of each track segment are parallel to the face normal. Instead, what I want to achieve is that the vertex normals reflect the normal of the track curvature. I've added screenshots to clarify this. $\endgroup$ Commented Dec 4, 2022 at 15:05
  • $\begingroup$ uhm....i tried this with your uploaded version - and that was my result. Did you change something in your blend file in between? what blender version are u using? $\endgroup$
    – Chris
    Commented Dec 4, 2022 at 17:54
0
$\begingroup$

The source of the problem was that the Array Modifier created many overlapping vertices. The solution was to merge the vertices by distance.

This was done by:

  1. Apply the Array Modifier and the Curve Modifier to the mesh.
  2. Enter Edit Mode and select all vertices in the track.
  3. Right click and Merge Vertices > By Distance.
  4. Enter Object Mode. Right click and apply Shade Smooth or Shade Auto Smooth.
  5. Export the FBX file with Geometry > Smoothing > Face enabled.

Thanks @Chris for putting me on the right path suggesting the Merge checkbox in the Array Modifier. I'm not sure why this didn't work during my tests.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .