2
$\begingroup$

I downloaded STL objects and want to add Texture to the surface. How can I do that?

$\endgroup$
1
  • $\begingroup$ Please provide a sample object, if possible. $\endgroup$
    – bbgodfrey
    Mar 14, 2017 at 0:19

1 Answer 1

5
$\begingroup$

Import the "PolygonObjects" and use Texture

polygons = Import["ExampleData/spikey.stl", "PolygonObjects"];
textures = ExampleData /@ ExampleData["ColorTexture"]; 

Graphics3D[{Texture[RandomChoice[textures]], 
Polygon[#, VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1/2, 1}}]} & @@@ polygons]

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.