Set random materials based on the differences in the metadata

As you can see, I loaded the 3D Tiles data following the example program from the official website, and displayed the floors according to the fields in the metadata. However, they look quite similar. Is it possible to apply random materials based on the differences in the metadata?

Hi @LiWebGIS25, welcome to the community!
You can’t change which Unreal Material is used based on metadata properties. But you can create a single custom material that does whatever you like to change the appearance based on metadata properties.

I’m glad to receive your reply. To achieve better visualization effects, I am learning Cesium for Unreal, but I’m a beginner with UE. I would like to know if assigning materials based on metadata properties require a lot of conditional statements.In my project, after numerous attempts, I achieved a result that is not very aesthetically pleasing.

And I used a lot of the following operations:
image

I’m not sure if there is a more straightforward way to achieve this.

Here is the result I achieved:

Hi @LiWebGIS25,

It really depends on what the “materials” are trying to do, and what metadata properties you’re using. Since it seems like you want to visualize discrete floors (instead of data that’s more continuous, or a gradient), then yes you’d need to check for those hard thresholds. If you’re trying to check for specific integer values in the metadata, then you’ll probably have to use those if statements.

I find that the material’s node system can easily get cluttered when you’re trying to do complex effects – I suggest trying the Custom node and writing a script instead!

1 Like

Thanks for answering my questions and for the advice. I guess I’ll have to learn how to manage my chaotic material nodes, haha.