Cannot Disable Shadows for Scenegraph Meshes

Summary

This was never responded to and closed, but has been causing me problems for months. There is currently no way to disable shadows on scenegraph meshes either via the mesh asset or the material which is a problem when scenegraph entities are already so excessively costly in performance

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

Try to spawn a mesh via scenegraph that is visible, it will be casting a a shadow which can be ugly and costs performance

Expected Result

There is no shadow when “Cast Shadows” in the mesh is disabled for the material slot

Observed Result

There are shadows

Platform(s)

PC, but prob all

Yea this should have been a foundation thing when they created the mesh_comp its crazy its still not added.

1 Like

Can you share your setup in the material to disable the shadows? I tested here and is working fine, idk if you are doing something different from me…

Shadow material / No Shadow material:

We mean this

Works on static mesh but not the mesh_comp

The main thing is the inconsistency between systems ie bpp and static mesh and mesh_comp. We shouldn’t need to change materials just to disable shadows on a mesh in sg its like taking 2 steps back from having a system that worked perfect to a new work around.

1 Like

Still can’t access static switch params via verse, so I’ll have to make a ton of MIs for this and this still doesn’t remove the mesh from the shadow depth render :confused: Might as well keep the shadows as my concern is CPU performance rn

Static Switch Params are static because they only exist before compiling the shaders. (Same with anything that has “Static” in the name such as static bools)

Shaders are pure math on the gpu, only numbers (specifically, only floats), no bools, and not even integers exist without doing workarounds… (Plus considering different shader platforms and instruction libraries)

The Static Switch node is just a utility for UE to make more easy making multiple variants and toggling states/features of that material on different instances (all at compile time, none are possible at runtime).

For runtime, you use things such as 0.0 to 1.0 param, instead of static switch / static bools. This is normal and not a workaround, is just how GPUs work to compute the shader… Even epic does that on their own materials for example, common in all gamedev scenarios :­P (Any language that says it is a bool, is just a disguised 0-1 float. And you can do that in verse if you want)

About the shadow options (together with collision and other options on the LOD settings), it seems weird, it was supposed to work, idk why is not working.
But to be honest, considering all the engine tech, I would remove these settigns from that place and more to other places, maybe that’s why they did not considered that when migrating meshes to Scene Graph yet…

For example, the collision is server sided, only one lod can have its “mandatory” collision to be shared across all players, regardless if each player is seeing a different LOD type due to graphics settings for example. (That’s why the option is grayed out - It would usually be also modified on the “LOD for collision” setting on the other cattegory…)

FORT-1091611 has been created and its status is ‘Unconfirmed’. This is now in a queue to be reproduced and confirmed.