Message 1 of 5
Applying a material to a DirectShape

Not applicable
07-28-2015
02:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using the suggested TessellatedFace.MaterialId in Jeremy's post, I am able to set the material of faces when I'm building the geometry of a DirectShape. However, if I wish to change the material later (because the user changed the value in the shared parameter), I'm stumped. I can iterate through the faces of the DirectShape, but the MaterialId for those faces is read-only.
The same post refers to SolidOptions.MaterialId... how does one use that to set the material? Is it also only at time of creation?
If I want to change the material, do I need to reconstruct the DirectShape geometry from scratch, or is there a way to use the existing structure and just set some parameter?
Thanks,
Andrea