Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to get triangles of a Static Mesh?

I am trying to get all the triangle's vertices on a static mesh.

Product Version: UE 4.9
more ▼

asked Nov 29 '15 at 02:19 AM in C++ Programming

avatar image

Mr. Mechanical
8 3 4 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

UStaticMesh has varable called RenderData which is FStaticMeshRenderData


there is LODResources which contains mesh data for each LOD


In there you can access VertexData and so on and other stuff, dive in to API refrence ;]

No sure if you need to do somethign before accessing this date, maybe you need to call Build() in UStaticMesh. It's some breef info i dig out for you.

more ▼

answered Nov 29 '15 at 05:08 AM

avatar image

37.8k 937 172 1123

avatar image Mr. Mechanical Nov 29 '15 at 03:58 PM

Thanks a lot for responding! I really appreciate it!

avatar image Mr. Mechanical Nov 29 '15 at 04:02 PM

Unfortunately, I can't find anything in either link that tells me what vertices make up each triangle.

avatar image Burnrate Nov 09 '16 at 05:04 PM

Do you know how to expose the render data to cpu in a packaged build?

avatar image Richmar1 Feb 23 '19 at 12:51 AM

@Burnrate I believe there is a setting in the static mesh editor that states "check this box to keep render data on cpu"

avatar image Burnrate Feb 23 '19 at 02:43 AM

There was a lot of high res meshes with multiple LODs I wanted info from so I didn't want to keep all that in RAM.

I was able to setup some Enqueue render commands in order to read the specific vertex data I needed from the specific mesh and LOD and memcpy it into an array. Then I sent it to a thread to be iterated over and provide the information I needed during gameplay.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question