TriAxis-Games / RealtimeMeshComponent

Unreal Engine 5 plugin component for rendering runtime generated content.
https://rmc.triaxis.games/
Other
1.56k stars 410 forks source link

Mesh creation completely broken when using UV1 #243

Closed ParapetCloud closed 8 months ago

ParapetCloud commented 1 year ago

Everything works fine if I only use UV0. the mesh displays correctly and the UV works.

image

If I start putting different UVs into UV1 one of two things will happen. If collision generation is enabled the engine crashes immediately.

Assertion failed: sizeof(DataType) == GetStride() [File:C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Public\Data\RealtimeMeshDataBuilder.h] [Line: 92]

UnrealEditor_RealtimeMeshComponent!RealtimeMesh::FRealtimeMeshSectionSimple::GetPhysicsTriMeshData() [C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Private\RealtimeMeshSimple.cpp:350]
UnrealEditor_RealtimeMeshComponent!RealtimeMesh::FRealtimeMeshSectionGroupSimple::GetPhysicsTriMeshData() [C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Private\RealtimeMeshSimple.cpp:644]
UnrealEditor_RealtimeMeshComponent!RealtimeMesh::FRealtimeMeshLODSimple::GetPhysicsTriMeshData() [C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Private\RealtimeMeshSimple.cpp:674]
UnrealEditor_RealtimeMeshComponent!RealtimeMesh::FRealtimeMeshDataSimple::GetPhysicsTriMeshData() [C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Private\RealtimeMeshSimple.cpp:702]
UnrealEditor_RealtimeMeshComponent!URealtimeMesh::GetPhysicsTriMeshData() [C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Private\RealtimeMesh.cpp:219]
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_RealtimeMeshComponent!URealtimeMesh::UpdateCollision() [C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Private\RealtimeMesh.cpp:310]
UnrealEditor_RealtimeMeshComponent!URealtimeMesh::Tick() [C:\Users\Parap\source\repos\ScreamAtUnreal4ever\Plugins\RealtimeMeshComponent-5.0\Source\RealtimeMeshComponent\Private\RealtimeMesh.cpp:235]
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll

If it's not enabled I get bad output. the UVs appear to be mixed. this material does not use the UV1 list, so it shouldn't change.

image

plugin: https://github.com/TriAxis-Games/RealtimeMeshComponent/commit/34e9785fdcf512a83a2c6e746e64dd6d93889af6 UE 5.1.1

Koderz commented 8 months ago

Hey @ParapetCloud

This should be fixed in master!

-Chris