- Изменено
Unreal Shaders Bugs and Requests
Hello,
I posted about this issue a while ago but still have not found any solution for the matter.
Unreal Engine Version: 4.26.2
Issue: Creating a dynamic material instance and assigning it as the normal blend material gives a visual bug.
Code used:
preBeginPlay Viewport looks:
On BeginPlay Front:
On BeginPlay Back:
Note that I have used the spineboy as defaulted and the dynamic material I'm creating and assigning is any of the following:
If I apply any of the materials I have as a regular material it works; the problem arises only with dynamic materials and I would like to be able to animate those materials over time thus needing them to be dynamic materials.
Feature Request:
I've been trying for a while now to create an outline material for my spine characters but all in vain. I have seen that for Unity, this is a feature. Is this feature going to be added to Unreal as well?
Thank your for your time,
Giuseppe Boschiero
Thanks for reporting. I've created an issue here: https://github.com/EsotericSoftware/spine-runtimes/issues/2140
Dynamic material handling is a bit complicated by the fact, that the renderer component needs to set the texture from the atlas on the material. My initial guess is that that goes wrong, no texture is actually set on the dynamic material, and a default texture it used that's transparent.
Mario написалThanks for reporting. I've created an issue here: https://github.com/EsotericSoftware/spine-runtimes/issues/2140
Dynamic material handling is a bit complicated by the fact, that the renderer component needs to set the texture from the atlas on the material. My initial guess is that that goes wrong, no texture is actually set on the dynamic material, and a default texture it used that's transparent.
I have been using the default spine which should have the Texture defaulted on it. If I add the material normally it works but if I apply the same material as dynamic instance I get these bugs.
Best,
Giuseppe Boschiero
I've now finally found time to investigate this. The code itself looks like it should work. When you set SkeletonRendererComponent::NormalBlendMaterial
to any kind of material, the component will take it as a parent and create a dynamic material instance out of it itself, ensuring that the correct texture from the texture atlas is assigned as a parameter.
For some reason however, this doesn't work when you set a dynamic material instance. And I currently don't understand why that is. I keep digging.
I'm surprised this hasn't been fixed. It really makes this unusable for Unreal if we can't even modify the material at runtime. I just bought the plugin, and now it looks like I won't be able to use it
It looks like you can access the created Material Instance Dynamic Object this way. It seems to be working, but not sure if there might be unforseen issues.