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"

FViewExtensionPreDrawCommand

I'm looking for more info as to what FViewExtensionPreDrawCommand actually does. In my VR project this piece of code gets called randomly with up to 14+ ms (according to Frontend profilier), with normal values at around 4 ms (both screenshots attached). There's nothing specific going on when recording the gameplay, I just stand, doing nothing with this function dropping frames randomly every x seconds.

Looking forward to any info that may narrow down the cause.

FViewExtensionPreDrawCommand with 4.7 ms call FViewExtensionPreDrawCommand with over 14 ms call

Product Version: UE 4.15
Tags:
more ▼

asked Jun 30 '17 at 08:28 AM in Rendering

avatar image

Shin_ji
106 5 6 11

avatar image theHolson Jul 11 '17 at 04:17 PM

I'm experiencing similar issues with this call, but on a more consistent basis. I think it's related to something with the HMD, but I have not been able to narrow down what exactly is causing it or how to fix it. Any insight from others would be very helpful.

avatar image Shin_ji Jul 11 '17 at 04:48 PM

We've been heavily optimizing our VR project. At this moment we are able to pull off stable 90 frames with 970 GPU. FViewExtensionPreDrawCommand seems to stabilize after the optimizations been done.

What this function does is simply outputting what's on the monitor screen to HMD (commenting this function out from the engine results in black screen in HMD and normal window on PC monitor). I'm guessing that running low on performance ups the time for this function to get called.

avatar image fudo Jan 05 '18 at 10:56 AM

Hy @Shin_ji, what do you mean with "outputting what's on the monitor screen to HMD"? Shouldn't it be the opposite? Rendering to the monitor a portion of what is beeing rendered on the HMD?

Also, during optimization didn you find or notice something that could reasonable be the offender of the high time consumption of the function?

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

2 answers: sort voted first

To anyone reading this. After running optimization tweaks the function in the subject seems to go back to normal, stable values. Please refer to my comment above for more info.

more ▼

answered Jul 11 '17 at 04:50 PM

avatar image

Shin_ji
106 5 6 11

avatar image Rumbleball Jul 23 '18 at 04:41 PM

Thanks for investigating this. We currently have the same issue. Would you mind telling us what you did optimize? Did you optimize rendering oder game logic?

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

The FExtensionPreDrawCommand issue also exists in VR and was severe enough to prevent App submission to the Oculus Store.

I was able to reduce FExtensionPreDrawCommand to under 11ms from 22ms by turning off dynamic shadows and volumetric shadows on the scene's directional light source. I also removed all widgets and converted to hierarchical instanced static meshes.

Overall it appears that once a certain render time threshold is exceeded, the FExtensionPreDrawCommand time jumps up non-linearly to a much higher time. Doing the optimizations above may or may not bring your render time back under the point where it went non-linear, so the general answer is- optimize your per frame computation until it comes down below the threshold. Working on this optimization was exceptionally frustrating because nothing seemed to affect the FExtensionPreDrawCommand time until one final optimization (dynamic shadows off) caused it to go back to normal.

A helpful discussion can be found at this link.

more ▼

answered Nov 09 '18 at 11:11 PM

avatar image

Thorp
16 1 5 8

avatar image PRESSURE2000 May 09 '19 at 02:53 AM

hey I have this problem. But what if my lights are all static? how do we do the dynamic shadows off optimization????

(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