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"

Time of SwapChain->Present()

I'm currently looking for a way, to get timestamp that is as close as possible to the actual appearance of a new actor on the screen. The idea is to take the time of SwapChain->Present() of that very frame, in which my actor will visible on the screen for the first time. The best way would be of course, when I could send a command to the RHI, after I've called SpawnActor() in the game thread, to take the time of Present() of the according frame in which my actor will be visible on the screen. How could I achieve something like that and how difficult would it be (I'm not a programmer)?

However, since this is not for a game but for a neuroscientific experiment, I would also be happy with a less elegant but easier way to achieve this. One idea is to take the time of Present() on every time. When I then know the time of SpawnActor() I could figure out, when the according present() was called. But this would only work if I always know, how many frames are between my game thread and the RHI thread. Can I be sure, that there is always one frame between SpawnActor() and the according Present(),so that I have to look for the second Present() after SpawnActor()? Or if I disable r.OneFrameThreadLag, can I be sure that the very next Present() after SpawnActor() is what I'm looking for?

Edit.: In case that it matters, I'm using directx11 on windows 10.

Product Version: UE 4.21
more ▼

asked Feb 02 '19 at 05:52 PM in Rendering

avatar image

3 1 3

(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