x

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 do I update verts in a vertex buffer every frame?

Hello! I'm trying to create an effect with over 10,000 cards that update their position every frame. My naive implementation used Paper 2D Sprites, and it was breathtakingly slow. No surprise there. I switched to building something off of this example procedural mesh component (which is derived from CustomMeshComponent), which works better, but still is much slower than I would hope.

In digging through the code, instead of updating the vertex buffer, it recreates the vertex buffer every time you update it. Since I have a fixed number of cards, it seems like I should create the vertex buffer once with BUF_Dynamic (or BUF_Volatile?) and then lock it every frame to update the coordinates. In looking over the code, I'm not really clear how to do that since it seems like I can only modify it in the render thread and there are quite a few support objects

Does anyone have any sample code that does this or something similar? Is there an easier way (something like glDrawArrays)?

Thank you so much for your help!

Product Version: UE 4.8
Tags:
more ▼

asked Aug 12 '15 at 03:30 PM in Rendering

avatar image

UnreallyReal
6 1 1 2

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

0 answers: sort voted first
Be the first one to answer this question
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