How to render a scene capture from a commandlet
I've been trying to use the SceneCaptureComponent2D to generate a thumbnail (saving to png) from a static mesh given as input in a commandlet and so far cannot figure out how to get it to work.(I can get it to work fine in the editor or PIE).
What I've tried:
The result: I get a png image, but it's all black. When I run this in editor it works and I get a thumbnail I expected.
I start the commandlet with AllowCommandletRendering, there's no errors or warnings and I didn't spot any suspicious early exits in USceneCaptureComponent2D::CaptureScene while debugging.
Tried adding lights to the scene and blueprint, setting GI on scene capture component - case it was just complete darkness, but no change. Object positioning part most likely works fine as same input will work outside of the commandlet.
Attached some screengrabs (in 3rd screenshot there's 2 different ways to start the thumbnail generation depending on where the exec pin goes) and the packed plugin to better illustrate setup.
asked Oct 05 '18 at 08:55 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here