Arisego / UnrealLive2D

UE4 plugin for live2d model
MIT License
142 stars 24 forks source link

Cubism SDK does not support DirectX 12 #5

Open MakotoIchinose opened 4 years ago

MakotoIchinose commented 4 years ago

I'm sure this is more of the Cubism SDK problem than the plugin problem. Calling any Live2D renderer in DirectX 12 RHI mode crashes the engine. Upon searching through the official SDK website, there's no DirectX 12 written anywhere, which indicates the SDK only supports up to DX11.

image

I'm creating the issue here just for cautionary note, in case someone else thinking of using Live2D in their UE4 project that's built to use DX12 by default. Using Cubism SDK means that you have to forget about using DX12 (and in extent, fancy ray-tracing features) at all.

Also, Vulkan is out of the list, so it's very unlikely to work with Vulkan RHI mode.

AA-Developer commented 4 years ago

Hello Mostly and widely used DirectX 11 But the update is also a good thing

Just the new question Why rendered in UMG Contains distortions When I grow up the model in UMG Accuracy has become as perfect as it should be in Live2D Cubism Viewer Is the reason in Cubism Native SDK or plugin

I even raised the quality in RenderTarget

Note the picture, https://i.ibb.co/Q9Ygg6p/Untitled.png there are no distortions Or black lines that are poorly quality in rendered Is there a way to improve the quality of the look in UMG

Because I think this is the last problem in this plugin It will be perfect then

In the end, you made a mighty job of making this plugin

thank you very much Arisego I really appreciate your work Good luck

Arisego commented 4 years ago

Hello, Do you mean the aliasing problem while scaling down the render target texture? Cubism model has an origin size, render result will be ok if the RenderTarget size fits it. But while passing to UMG, the aliasing still happens. There must be some way to do anti-aliasing in UMG, but I am not so familiar with UMG so I do not know how to handle this.

About Direct12, I will take a look at it when I got time, maybe there is something wrong with the shader part in plugin.

AA-Developer commented 4 years ago

Hello Yes, you are right The problem is related anti-aliasing I looked for solutions and found There is anti aliasing blueprint If you can update it It would be a very good addition

Arisego commented 4 years ago

The direct12 crash happens in RHI part, seems Dx12 RHI has a more restricted state check. I modified the render state initialize order and now it wont crash on my computer with Dx12 RHI. If the crash still happens, more information may be needed to help reproduce it.

Arisego commented 4 years ago

@AA-Developer I did a quick search but failed to find a way to do anti aliasing without post process, may be I missed something important, could you provide more information about it?