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"

SceneCapture2d frame behind? Stencil Buffer?

I am using a SceneCapture2d in c++ to render to a texture and noticed it is a frame behind since it captures the scene at the end of the frame and uses that texture at the beginning of the following frame. Is there a way to force the capture to happen at the beginning of the frame so it isn't a frame behind when rendering? Is there a better way to avoid creating a texture and instead render to stencil buffer? Thanks.

Product Version: UE 4.15
Tags:
more ▼

asked Mar 13 '17 at 01:32 AM in Rendering

avatar image

Ian Proulx
44 7 13 20

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

1 answer: sort voted first

If you are using the 'update every frame' method, it will happen on the next frame, there's nothing you can do about that. Look at USceneCaptureComponent::CaptureSceneDeferred() to see why.

The only way to correct this would be to turn the 'update every frame' feature off and implement your own version of the capture each frame.

There are some caveats with doing that, though. You will need to pay attention to the 'Tickgroup' of the scene component. If you are trying to capture a scene with any physics you will need to make sure that that stuff has all been completed before you attempt a capture. Otherwise you can cause crashes or hangs. By default, the scene capture component belongs in the 'TG_DuringPhysics' tick group, which works fine enough with deferred updates, but can cause loads of trouble if you're trying to manually update the capture on a component that is also in the middle of a physics update.

more ▼

answered Jul 10 '17 at 10:59 AM

avatar image

UnexpectedSquirt
79 4 11 13

(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