2016년 1월 25일 월요일

UE4 Rendering thread problem related to Editor

UE4 has multi-thread rendering architecture which is similar to UE3(almost same..).
Game thread datas(PrimitiveComponent..) and Rendering thread datas(SceneProxy..) are main components of it.

Game thread enqueue asynchronous rendering command continously to rendering thread. Applying changed property in game thread to rendering thread is one of them.

Usually there is no bad thing here. Until Editor and UpdateRendertargetCapture are used together.

case :
1. Component property is changed by editor click.(from Window Msg Pump)
2. There is 2dSceneCaptureActor in the scene.
3. GarbageCollection is performed.

problem :
1. some object could be garbage collected.
2. Scene could be rendered before change of property is applied to render thread.
3. Garbaged collected object could be referenced in rendering thread.

I resolved this sitation by FlushRenderingCommand. But still, We could say this is flaw of UE4 multi-threading or update capture architecture.

댓글 없음:

댓글 쓰기