3D attributes filtering
The ability to work with 3D attributes is a feature that works with
ArcGIS3DModel to allow you to visualize the objects in the layer in a more meaningful way.
3D Object scene layers have attributes with values for each node. Depending on how the layer was authored, the cached attributes can have a slew of different information.
In the image above is an example of what you can do with the 3D attributes functionality. In this image you see the buildings differently based on their "NUM_FLOORS" attribute to show buildings with more than 100 floors in red, buildings with more than 20 floors in yellow and the remaining buildings in green.
The image above is an example of how to use the "NAME" attribute to visualize the Empire State building in a unique way. Set up an Attribute transform so it can find the feature with the name of "Empire State Building". This gives you the ability to apply a different texture to that specific building. In this example you can also use more complicated textures than just solid colors to bring more realism to the 3D object scene layers that do not have textures baked in.
New methods were added to
ArcGIS3DModel to support this feature
GetMaterialReference SetMaterialReference SetAttributesToVisualize
Material property on the
ArcGIS3DModel allows you to specify a material to render the layer with. You can use this method without using any layer attributes to render the layer with a different material than the one used by default by the layer.
Set allows you to specify which attributes will be published in a texture to the
Material. By default, no attributes are published to the material, so using the
Set allows you to set an array of the attributes you want to publish. This step requires you to have knowledge of the attributes in your layer.
The shaders that power the materials will only work with integers and floats by default. Doubles are also supported, but internally they are converted to floats. This means that you can set attributes on
Set that are of type
esri. Here is a full list of types.
If you want to use a field with a different type, use the
Set method. This method takes an
Attribute. It allows you to convert an attribute such as "NAME" into a float or integer that has meaning within the material's shader.