Change the Shading Model/Material on Mobile

slarti
Fri, 29 Jan 2016 11:28:54 +0000
Rendering

Hi,

I’m using a subsurface material (Shading Model: Subsurface) for an object. But since subsurface materials are not supported on mobile/ES2 devices, I want to swap out the material of that object for a simple default lit or unlit emissive material in that case. How do I achieve this?

What I tried so far:

The “Feature Level Switch” Node in the material. But this only allows me to change the behavior of the material, not the Shading Model.

A Material Instance of the subsurface Material with overridden Shading Model. This would work, but I don’t know how to apply this material depending on the feature level.

Using a blueprint to swap the material on all affected meshes to the emissive one. But how do I check for the feature level in a blueprint?

I could check the device platform by using the “Get Platform Name” Blueprint Node to check for android/ios devices but I would rather check for the devices feature level, not the generic “it’s an android device” to correctly catch all additional platforms.

Using the “Get Rendering Material Quality Level” Blueprint node to check if the Quality is “low” and swap the material depending on that. But the description for this node says that it “cannot be used inside a construction script” and the quality level does not necessarily match the feature level.

Are there any better options? I would like to directly check for subsurface availability and determine the used material depending on that.

5 posts - 1 participant