Description

ProxyLOD::FQuadricMeshSimplifier::OutputMesh may remove duped verts.
The input vertex buffer was resized by numVerts from FQuadricMeshSimplifier before calling OutputMesh.
So these behaviors generate uninitialized vertices at the end of the vertex buffer.

This vertices may be accessed by a process that iterates over the vertex buffer not through the index buffer (e.g., UVAtlus).

Here's a workaround.

in ProxyLOD::SimplifyMesh

	// Resize the AOSMesh to hold the result - this empties it first.
	InOutMesh.Resize(Simplifier.GetNumVerts(), Simplifier.GetNumTris());

	// Copy the new mesh back into the AOSMeshedVolume and capture the seam vertexes.
	Simplifier.OutputMesh(InOutMesh.Vertexes, InOutMesh.Indexes, SeamVertexArray);

	// ***Workaround*** : Set the number of vertices again after calling OutputMesh
	InOutMesh.SetVertexAndIndexCount(Simplifier.GetNumVerts(), Simplifier.GetNumTris() * 3);	
 
Steps to Reproduce

Couldn't find a way to repro, may depend on input and simplification settings

Have Comments or More Details?

There's no existing public thread on this issue, so head over to AnswerHub just mention UE-99466 in the post.

0
Login to Vote

Fixed
ComponentTools - HLOD
Affects Versions4.25
Target Fix4.26
Fix Commit14319316
Release Commit14319316
CreatedSep 11, 2020
ResolvedSep 15, 2020
UpdatedNov 10, 2020