We’ve implemented a scene capture object (as a SceneCaptureComponent2D inside an actor blueprint) that renders to a texture.
The scene capture is locked to look at a character so it can watch that character as it moves around. However, we find that when our characters walk outside of the main camera’s FOV, they stop animating, and things start to LOD out.
How to fix this?
Is there a way to notify the player camera manager that the SceneCaptureComponent2D is active, and that we should take it into account as being another active camera?
Hey -
I want to try to test this out for you. Can you be precise in your setup instructions or if at all possible upload a sample map demonstrating this issue? This is my own confusion, but I am having a hard time understanding where your Scene Capture Component 2D is begin rendered out?
Thank You
Eric Ketchum
Hi Eric – Don’t know that I can do a sample map since our setup is a little different from the standard setup, but you should be able to:
- Create an actor blueprint called “Dolly” and put a SceneCapture2D component inside it.
- Also create an animated character and have him walk around in the scene – we’re doing this by having an actor blueprint with a SkeletalMeshComponent inside it.
- Add code or BP to update the Dolly to always be in front of the character and looking at it (we’re doing this using a Scene component inside the character itself but I’m sure anything else would work).
- Create a render target texture (“DollyRenderTarget2D”).
- Set that render target texture as the “TextureTarget” on the scene capture component inside the dolly.
- Now render the target texture every frame in a rectangle somewhere onscreen (we do this via a direct call to UCanvas::DrawTile()).
- You should notice that although the character us always shown inside your render target, whenever the character is not inside the main viewport, it stops animating.
Hope this helps!
OK, it looks like we’re actually no longer able to repro the bug, after just upgrading to 4.6.1 at the end of last week.
We do still sometimes see other characters in the background still not animating properly all the time, and I’m not sure why – but this is an intermittent problem.