# Getting UVs and colors to work with dynamic mesh using FDynamicMesh3

**URL:** <https://forums.unrealengine.com/t/getting-uvs-and-colors-to-work-with-dynamic-mesh-using-fdynamicmesh3/761209>\
**Category:** World Creation\
**Tags:** unreal-engine, Rendering, CPP, question\
**Created:** [February 1, 2023, 8:16am UTC](https://forums.unrealengine.com/t/getting-uvs-and-colors-to-work-with-dynamic-mesh-using-fdynamicmesh3/761209 "2023-02-01T08:16:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sqdcn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sqdcn](https://forums.unrealengine.com/u/sqdcn)\
**Post date:** [November 9, 2023, 3:20am UTC](https://forums.unrealengine.com/t/getting-uvs-and-colors-to-work-with-dynamic-mesh-using-fdynamicmesh3/761209/2 "2023-11-09T03:20:10Z")

</div>

After some digging around, [this post](https://forums.unrealengine.com/t/from-proceduralmesh-to-dynamicmesh/661279/3) what ended up solving it for me:

I am doing these (not sure if all of them are necessary)

```auto
	FDynamicMesh3 newMesh;
	newMesh.EnableAttributes();
	newMesh.EnableVertexUVs(FVector2f::Zero());
 
// generate vertices with UV logics ....

	UE::Geometry::CopyVertexUVsToOverlay(newMesh, *newMesh.Attributes()->PrimaryUV());

```

Voila!

---

_[View the full topic](https://forums.unrealengine.com/t/getting-uvs-and-colors-to-work-with-dynamic-mesh-using-fdynamicmesh3/761209)._
