Related Discussions
...

My character needs to receive lighting and create shadows. The upper body receives the front light and the lower body receives the light from the back. What is the cause of this? If no shadow is produced, its lighting effect will be normal.

This is the effect I want, but this method does not currently produce a shadow. If a shadow is produced, the effect is the same as above.


the 3.8beta branch, imports the 3.7 version of the resource will crash...

Regarding importing 3.7 assets with the 3.8-beta runtime, please note that we do not support compatibility between versions! You have to re-export your assets from 3.8-beta to use them with the 3.8-beta runtime.

Regarding the lighting issue, maybe it's because the material has two sided enabled? Another issue could be missing normals which I think we currently let the ProceduralMesh generate automatically.

badlogic wrote

Regarding importing 3.7 assets with the 3.8-beta runtime, please note that we do not support compatibility between versions! You have to re-export your assets from 3.8-beta to use them with the 3.8-beta runtime.

Regarding the lighting issue, maybe it's because the material has two sided enabled? Another issue could be missing normals which I think we currently let the ProceduralMesh generate automatically.

I did some work on the normals and it looks normal now.

We could create another set of materials we ship with the plugin that generate the normal like you do in your material. I'm unsure if we want those to become the default materials though. What do you think?

badlogic wrote

We could create another set of materials we ship with the plugin that generate the normal like you do in your material. I'm unsure if we want those to become the default materials though. What do you think?

I think it is possible to preset several common materials in the plugin for developers to choose.


The second question: Is it possible to add the corresponding Attach method, because in some cases we will separate the character from the weapon, so we need to attach the weapon to the API of the character. If this is not allowed, then if the Socket can be exposed, we can choose to attach some components to the Socket.

For example, the screenshot below: we can select the corresponding Bone in "Parent Socket" and attach it to it.

Cool, then we'll add lit materials to the plugin.

Regarding the sockets, I'm afraid I don't quite understand. A Spine object doesn't expose any sockets. For attachable items, you want to use Spine's skin feature, or the bone follower component. With the bone follower component you can add any type of UE4 object to your skeleton. The only problem with this is rendering order.

2 years later
Mario wrote

Cool, then we'll add lit materials to the plugin.

Regarding the sockets, I'm afraid I don't quite understand. A Spine object doesn't expose any sockets. For attachable items, you want to use Spine's skin feature, or the bone follower component. With the bone follower component you can add any type of UE4 object to your skeleton. The only problem with this is rendering order.

Hello. My character casts no shadow. Are there any options how to fix this? If you change the material of the normal, a shadow appears, but something incomprehensible happens to the character. Previously, everything was done by default. What happened? Is there a lesson or document to read about this problem? Thx. Unreal 4-26/ SPine 3899

The SpineUnlitNormalMaterial Material by default does not cast a shadow because the Material property Material - Blend Mode is set to Translucent. But you can enable Cast Dynamic Shadow as Masked to enable shadow casting.

As you said "but something incomprehensible happens to the character": could you share a screenshot or video of what happened?

May I ask what you have updated which started the problem to happen: Did you update spine-ue4, or did you switch from an older version of Unreal Engine to 4.26? If you updated spine-ue4, when was the last time that you updated approximately?

9 days later
Harald wrote

The SpineUnlitNormalMaterial Material by default does not cast a shadow because the Material property Material - Blend Mode is set to Translucent. But you can enable Cast Dynamic Shadow as Masked to enable shadow casting.

As you said "but something incomprehensible happens to the character": could you share a screenshot or video of what happened?

May I ask what you have updated which started the problem to happen: Did you update spine-ue4, or did you switch from an older version of Unreal Engine to 4.26? If you updated spine-ue4, when was the last time that you updated approximately?

Previously,(Unreal 4-23 works fine shadow by default) everything worked by default. Shadows worked as expected. Now we need to switch something somewhere. What for? Why couldn't leave it as it is? I don't understand what you are talking about. Where should I switch? In the materials? What kind of material? There are 4 of them. If it's not difficult to attach a screenshot please. Normal blend material, I dug there, nothing helped.
https://i.imgur.com/wPLnQkC.png

Max Garena wrote

Previously,(Unreal 4-23 works fine shadow by default) everything worked by default. Shadows worked as expected. Now we need to switch something somewhere. What for? Why couldn't leave it as it is?

Are you saying that you upgraded from Unreal 4.23 to 4.26 and left spine-ue4 untouched? If so, then I assume that the default behaviour of Unreal Engine materials changed to provide more performance oriented default values. We could consider changing (i.e. enabling) this material flag in the SpineUnlitNormalMaterial, but we would first need to have a look at previous behaviour across multiple UE4 versions to be sure these changes are reasonable.

In general it is not advisable to upgrade Unreal Engine if you want all behaviour to remain unchanged.

Max Garena wrote

I don't understand what you are talking about.

What did you not understand?

Max Garena wrote

Where should I switch? In the materials? What kind of material? There are 4 of them

As I said above:

Harald wrote

The SpineUnlitNormalMaterial Material

Max Garena wrote

If it's not difficult to attach a screenshot please. Normal blend material, I dug there, nothing helped.

Your screenshot shows that you have found and enabled the parameter and the preview shows a cast shadow. Unfortunately I fail to see what your current problem is as the text you have posted is contradicting your screenshot.

4 days later

Hello/ in fact of the matter!!!! Everything is fine in the material editor, but there is NO SHADOW in the engine !!!!! this is the crux of the problem.

I assume that you pressed Compile and Apply in the material editor.

Could you please verify that the material is actually used on your SkeletonRenderer in the scene, and that it's not a different one? You could quickly test this by changing anything else at the material (e.g. connect a color to the emissive pin) and then hitting Apply, if it does change your Skeleton in the scene you can be sure.

Harald wrote

I assume that you pressed Compile and Apply in the material editor.

Could you please verify that the material is actually used on your SkeletonRenderer in the scene, and that it's not a different one? You could quickly test this by changing anything else at the material (e.g. connect a color to the emissive pin) and then hitting Apply, if it does change your Skeleton in the scene you can be sure.

Hello/ again/ yes, the material changes. Changes are taking place. But there is no shadow. Thx

Unfortuantely we still could not reproduce your issue on our end.

When I created a new scene in UE 4.26, add an actor with components Spine Skeleton Animation and Spine Skeleton Renderer, assign the atlas and skeletonData, it initializes by default Normal Blend Material with the SpineLitNormalMaterial material assigned casting a shadow by default, or with SpineUnlitNormalMaterial, where the property Cast Dynamic Shadow as Masked needs to be enabled to cast a shadow.

What do you have assigned at your Spine Skeleton Renderer component under Normal Blend Material?
I mean this parameter here: https://prnt.sc/yesazf
Are you sure that Spine Skeleton Renderer parameter Lighting - Cast Shadow is enabled?
See this parameter here: https://prnt.sc/yesfh1

Actually, if the material preview shows a cast shadow in the preview, then there is either
a) the material is not used. But this cannot be the case if you say that other material modifications show up in the scene.
b) something wrong with the scene or component setup, not casting a shadow from the mesh, and the material is not the problem.
b) something wrong/corrupted with the asset state perhaps? You could test this by creating a new UE4 project and importing the Spine plugin again from a clean state and adding a skeleton again. If it works in a new project but not in your existing one, then perhaps re-importing the plugin or the assets helps?

Also please be sure the use the latest git status from both the spine-ue4 and spine-cpp runtimes. Updating only spine-ue4 but not spine-cpp and copying it over again is a common mistake.

Harald wrote

Unfortuantely we still could not reproduce your issue on our end.

When I created a new scene in UE 4.26, add an actor with components Spine Skeleton Animation and Spine Skeleton Renderer, assign the atlas and skeletonData, it initializes by default Normal Blend Material with the SpineLitNormalMaterial material assigned casting a shadow by default, or with SpineUnlitNormalMaterial, where the property Cast Dynamic Shadow as Masked needs to be enabled to cast a shadow.

What do you have assigned at your Spine Skeleton Renderer component under Normal Blend Material?
I mean this parameter here: https://prnt.sc/yesazf
Are you sure that Spine Skeleton Renderer parameter Lighting - Cast Shadow is enabled?
See this parameter here: https://prnt.sc/yesfh1

Actually, if the material preview shows a cast shadow in the preview, then there is either
a) the material is not used. But this cannot be the case if you say that other material modifications show up in the scene.
b) something wrong with the scene or component setup, not casting a shadow from the mesh, and the material is not the problem.
b) something wrong/corrupted with the asset state perhaps? You could test this by creating a new UE4 project and importing the Spine plugin again from a clean state and adding a skeleton again. If it works in a new project but not in your existing one, then perhaps re-importing the plugin or the assets helps?

Also please be sure the use the latest git status from both the spine-ue4 and spine-cpp runtimes. Updating only spine-ue4 but not spine-cpp and copying it over again is a common mistake.

if it's not difficult for you, look at the project file. Otherwise we will correspond for so long. Thx
https://drive.google.com/file/d/1MN5v9r4UpNX-msNAmediFxHgJlHfxjHO/view?usp=sharing

Thanks for sending over the reproduction project. I could now reproduce the problem you are seeing.

It seems to be a problem with lighting or settings caching (or similar), as I could fix the problem by setting the Light Source Mobility from Stationary to Movable and then back to Stationary again. After switching it once it was casting a shadow in every mobility-mode.

https://prnt.sc/yqfl22
https://prnt.sc/yqfcnp

Strangely when trying it out in a local 4.26 test project with the Spineboy asset, I could suddenly see the same issue arising, which I could swear has not occurred there before. Perhaps a recent UE4 update has changed behaviour in this regard, or circumstances just changed.

Thank you, I'm glad you helped me! It's a pleasure to do business with you! See u!

Thanks for your kind words! We're very glad we could resolve the problem.

Harald wrote

Thanks for your kind words! We're very glad we could resolve the problem.

there is such a feature. When I bake the light, the shadow of the character disappears. If not baked, the print "Preview"and the quality of other shadows is weak.
https://i.imgur.com/dcJAUut.png