DevGius

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:

ApplyingMaterialCode.png


preBeginPlay Viewport looks:

Viewport.png


On BeginPlay Front:

Applying dynamic material.png


On BeginPlay Back:

Applying dynamic materialback.png


Note that I have used the spineboy as defaulted and the dynamic material I'm creating and assigning is any of the following:

Materials.png


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
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
DevGius
  • Postovi: 4

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.
Avatar
Mario

Mario
  • Postovi: 3242

DevGius

Mario je napisao/la: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
DevGius
  • Postovi: 4

Mario

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.
Avatar
Mario

Mario
  • Postovi: 3242


Natrag na Runtimes