If it cannot be achieved in a short time, we can only use unreal to achieve the relevant functions。unreal can only be learn from the beginning
janine
November 11, 2024, 3:57pm
2
Hi @islovingness ,
Currently, Cesium for Unity does not support metadata styling like the way it is supported in Unreal. We have a Github issue open for this feature request below:
opened 09:49PM - 03 Feb 23 UTC
enhancement
Cesium for Unity should offer feature styling, similar to Cesium for Unreal. The… implications of this affect what we'll do with point cloud rendering, so I'm starting to think about this now. CC @argallegos, we discussed this offline and I'm paraphrasing his ideas for this issue.
In Cesium for Unreal, feature styling with metadata is done through the `CesiumEncodedMetadata` component. We can see how it's used via the [Visualizing Metadata tutorial](https://cesium.com/learn/unreal/unreal-visualize-metadata/), but basically it creates nodes in the Unreal version of Shader Graph and uses HLSL to access the metadata properties.
It makes sense to do something similar with Shader Graph in Unity, especially because they offer [custom function nodes](https://docs.unity3d.com/Packages/com.unity.shadergraph@13.1/manual/Custom-Function-Node.html). The user may need to configure the `CesiumMetadata` component on the tileset, and then create their own version of the material / shader, in order to hook up the metadata properties to their own code. This may have complications with point cloud shading, but I'll write that up in another issue.
Another option (though less preferable) is to have a metadata styling component that shows the user what metadata properties are present. Then, the user can set the colors (and perhaps other styling) of the metadata properties in the component itself, and Cesium for Unity could translate that into a shader under the hood. This is more approachable for a beginner user who is unfamiliar with writing shaders and just wants to do simple styling (e.g. make all buildings of a type blue), but it doesn't offer freedom for people who want to write more advanced shaders.
Just some ideas for now -- we should try to figure out the ideal UX before thinking about implementation details.
I will link this forum post in the issue so that we can share updates when we make progress on it.
In the meantime, I’m not sure what you mean regarding Unreal Engine. Can you clarify what you mean?
Meaning, if not, I’ll just have to learn Unreal Engine