2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ Please provide a sample object, if possible. $\endgroup$ – bbgodfrey Mar 14 '17 at 0:19
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, privacy policy and cookie policy

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