Is it possible in Unreal (preferably blueprints) to change material properties of a 3D tile at runtime? In my case I have a gITF model showing nothing but a whole bunch of adjacent plot lines for a real estate developer’s unbuilt but planned community. I want a user to be able to click on one plot and we would change the color and emissivity of the plot outline and tint the plot area.
Is there a way to get a reference to one plot in a 3D tile that contains many? Or is the only way to make a separate 3D Tile for each plot (in my case 1000s of them).
For changing the colors interactively:
In Unreal one way to do this if we know the material’s exposed parameters (e.g. OutlineColor, FillColor) is to create a Dynamic Material Instance of that material, assign it to the object and then manipulate its values. But the 3D Tile does not appear to expose its Materials. In my line of thinking, if we can know the Cesium material type and can get an array of materials used and a way to assign a Dynamic Material Instance to any one of them we can manipulate them at runtime.
Maybe there is a better way that I just haven’t run across yet so any suggestions are welcome.
This is the purpose of the metadata system. It lets you have multiple separate “features” in a single 3D Tiles tileset (or even a single tile), and yet distinguish them from one another and attach properties to them. The properties can also be used for styling. There’s a tutorial here:
Well wow, that is an excellent “half” answer. Your link and tutorial look great for consuming 3d tiles with metadata, which is wonderful. However, is there also another good link for how to get the metadata into the tiles? If we have a 3d model how is it prepared so the cesium importer will save our metadata features properly.
I have been following the tutorial in this link, and looked at the metadata reference which both seem to indicate that it is up to the 3d modeler to attach metadata to either every face, or every vertex, in the tile. For any reasonably detailed model there will be 1000s of faces or verticies. Surely repeating the same attribute list over large regions of a model is so inefficieint as to not be the recommended way?? Also, it is still not at all clear how the per feature metadata is formatted and attached to every vertex in the model (if this is really the way). I know Cesium are not the authority on modeling software, but cesium has specified the way a model must arrive to its importer, so surely they are confident that there is a way to achieve this and can provide guidance?
both seem to indicate that it is up to the 3d modeler to attach metadata to either every face, or every vertex, in the tile.
Each vertex merely contains a feature ID, which is an index into a table containing the actual feature data.
This blog post has an intro to the topic:
The exact mechanism of getting the metadata into a tileset I guess depends on how you’re creating that tileset in the first place. Are you using Cesium ion? What sort of source data are feeding to it?