I'm working on a HUD that uses a combination of a SceneCapture2DComponent, TextureRenderTarget2D, and SetExternalTexture in order to display a live camera view as part of the HUD. The scene capture component is attached to a socket on a vehicle, and the idea is that the player should be able to drive the vehicle using only the video on the HUD for reference. For the most part it's working, except that depending on how I add the MovieClip containing the target .png to the stage in Flash, I may or may not be able to capture the entire environment. Both the MovieClip and .png are set up for Export for ActionScript and Export in Frame 1.

I was able to recreate the problem on my home machine using a fresh install of the 08-2014 build (please excuse the boring default scene!). In the picture above, both boxes on the right are being replaced by the same texture from UDK. The one on the top is exactly the effect that I want, because it can show everything as the scene capture component sees. This MovieClip was simply added to the stage from the library and is there at all times. I've adjusted the alpha xA+ to 255 to resolve the transparency issue (as per these instructions: https://udn.epicgames.com/Three/GFxU...erTargets.html )
The bottom box is the exact same MovieClip, but it is meant to be added and removed via ActionScript for different uses. I also just like to keep everything off the stage and add it with script when it's needed. I add the MovieClip to the stage, and also set it's alpha to 255. But I can't seem to get it to show the entire image, even though the render texture in UDK shows the full image with skydome when I exit PIE. Keep in mind that it is also receiving the same texture as the top box. I've played with the variables for the scene capture component and can get different results, but not the one I want. Another minor bit of frustration is that not all of those variables seem to have an effect. For example, you'll see in my script below that the frame rate is meant to be 2, but the scene captures just as quickly as the game's framerate allows. It's not as important, but would be nice to have for the sake optimization.
At this point I think my main problem has been narrowed down to how I add the MovieClip in Flash, and not something from UDK directly. I do change the Target Gamma in the TextureRenderTarget2D to 4.0, just to lighten up the image, but as long as the texture seems to be capturing correctly (proven(?) by viewing the render texture after exiting PIE), I don't understand why the same texture should display in different ways in Flash depending on how it's added. I'm guessing it may be something really, really silly... ^-^'
Just in case there's something helpful, here is the main code used to make the system work for this little test. There may be a few gaps, but this at least got me the screenshot above.
ActionScript 3 (Used only for the bottom box, addCameraCaptureDisplay() is called when it's time to add the MovieClip. Maybe there is something missing here?)
UnrealScript (for the vehicle)
UnrealScript (for the HUD Movie Player)
Any thoughts are welcome! This is bothering me more for the sake of curiosity than anything else. XD

I was able to recreate the problem on my home machine using a fresh install of the 08-2014 build (please excuse the boring default scene!). In the picture above, both boxes on the right are being replaced by the same texture from UDK. The one on the top is exactly the effect that I want, because it can show everything as the scene capture component sees. This MovieClip was simply added to the stage from the library and is there at all times. I've adjusted the alpha xA+ to 255 to resolve the transparency issue (as per these instructions: https://udn.epicgames.com/Three/GFxU...erTargets.html )
The bottom box is the exact same MovieClip, but it is meant to be added and removed via ActionScript for different uses. I also just like to keep everything off the stage and add it with script when it's needed. I add the MovieClip to the stage, and also set it's alpha to 255. But I can't seem to get it to show the entire image, even though the render texture in UDK shows the full image with skydome when I exit PIE. Keep in mind that it is also receiving the same texture as the top box. I've played with the variables for the scene capture component and can get different results, but not the one I want. Another minor bit of frustration is that not all of those variables seem to have an effect. For example, you'll see in my script below that the frame rate is meant to be 2, but the scene captures just as quickly as the game's framerate allows. It's not as important, but would be nice to have for the sake optimization.
At this point I think my main problem has been narrowed down to how I add the MovieClip in Flash, and not something from UDK directly. I do change the Target Gamma in the TextureRenderTarget2D to 4.0, just to lighten up the image, but as long as the texture seems to be capturing correctly (proven(?) by viewing the render texture after exiting PIE), I don't understand why the same texture should display in different ways in Flash depending on how it's added. I'm guessing it may be something really, really silly... ^-^'
Just in case there's something helpful, here is the main code used to make the system work for this little test. There may be a few gaps, but this at least got me the screenshot above.
ActionScript 3 (Used only for the bottom box, addCameraCaptureDisplay() is called when it's time to add the MovieClip. Maybe there is something missing here?)
Code:
var CameraCapture_Display = new CameraCapture_Display_MC; function addCameraCaptureDisplay() { addChild(CameraCapture_Display); CameraCapture_Display.alpha = 255.0; }
Code:
var SceneCapture2DComponent CameraCapture; simulated function PostBeginPlay() { Super.PostBeginPlay(); Mesh.AttachComponentToSocket(CameraCapture, ‘CameraLens’); } simulated function Tick (float DeltaTime) { Super.Tick(DeltaTime); if(Controller != none && OSC_HUD(PlayerController(Controller).myHUD).HudMovie.CameraCaptureTexture != CameraCapture.TextureTarget) { OSC_HUD(PlayerController(Controller).myHUD).HudMovie.SetRenderTexture(CameraCapture.TextureTarget); } } defaultProperties { Begin Object Class=SceneCapture2DComponent Name=CameraCaptureComp TextureTarget = TextureRenderTarget2D’OnScreenCamera.Materials.TRT_CameraView’ FieldOfView = 110.0 NearPlane = 10.0 FarPlane = 0.0 MaxViewDistanceOverride = 0.0 FrameRate = 2.0 bEnablePostProcess = true bEnableFog = true ViewMode = SceneCapView_Lit End Object CameraCapture = CameraCaptureComp }
Code:
var TextureRenderTarget2D CameraCaptureTexture; function SetRenderTexture(TextureRenderTarget2D SetCameraCaptureTarget) { CameraCaptureTexture = SetCameraCaptureTexture; SetExternalTexture(“CameraCapture_Target”, CameraCaptureTexture); } defaultProperties { CameraCaptureTexture = none }
Comment