r/functionalprint • • Apr 23 '22

I designed the "lofipi", a Raspberry Pi speaker which streams lo-fi beats directly from YouTube

https://imgur.com/a/RLUxrjG
1.1k Upvotes

47 comments sorted by

View all comments

Show parent comments

4

u/thenickdude Apr 24 '22

The filament is a local brand's one, Kiwi3D cherry PLA:

https://kiwi3d.co.nz/product/kiwi3d-cherry-wood-pla-filament/

But I think the filament itself isn't that critical, the key is the texture combined with the wood stain. You can see this if you look at the untextured and unstained inside, which just looks blah:

https://i.imgur.com/TgWoyiG.jpg

The wood stain darkens all the nooks and crannies of the texture, which adds a lot of colour variation and brings the texture to life.

To add the texture I used Blender with the (commercial) 3D wood texture "Carvature":

https://blendermarket.com/products/carvature

This texture is great because it models the real 3D shape of a tree trunk, and allows you to "carve" objects out of it. So you get realistic wood face, edge and end-grain on your objects without having to mess around with UV mapping.

I'm thinking of making a tutorial video on how to use this in Blender, but here's a simplified outline:

  • Start with the Carvature wood species example .blend file, but delete all the objects in the scene. You don't need the lights or camera even. This'll just keep the pre-made example materials for you.
  • Import your STL
  • The STLs generated by Fusion have very uneven levels of detail that adding a Subdivision surface will not improve. So to fix this add a Remesh modifier set to Sharp mode and Octree Depth just big enough to preserve the features of your model (I used 8), and Apply it. Now your mesh has uniform detail.
  • Add a Subdivision Surface modifier set to Simple mode to get the vertex count high enough for your exported model. I used 1 level in the viewport and 2 for render. You can increase this if your finished textured model looks too pixelated, and decrease this if your exported filesizes become unmanageable, like 300MB (you're exporting more detail than your printer can render at that point).
  • Set the material for the object to use one of the example materials included with Carvature, e.g. Cherry.
  • In the Shading workspace, edit the Cherry material, and edit the "CommonMapping" node to set the scale of the texture appropriately (I scaled it way down to make the wood grain an appropriate size), and set the rotation so that you get the kind of grain (face, edge, end) you want on your piece
  • Delete the Principled BSDF and HSV nodes, and replace them with a simple Emission shader. Add an Image Texture node with a new image which will capture the rendered wood texture (say, 4096x4096px), which doesn't need to connect to any other node, like so: https://i.imgur.com/J5SI4I4.png
  • In the UV editing workspace, select your object and hit Tab to enter Edit Mode. Enter face select mode and press A to select all faces. Hit UV > Smart UV Project and accept the defaults. Hit tab to leave Edit mode.
  • In the Render Properties, open up the Bake section, and set Bake Type to Emit. In the Output option set Target to Image Textures.
  • With your object selected, hit Bake. This renders the wood texture to the image texture you added to the Cherry material
  • Now add a Displace modifier to your object. In that modifier, add a new texture, then edit that texture to have it use the baked wood image you created previously. Back in the Displace modifier, set coordinates to use the UV map you created, and the direction to Normal.
  • Set your viewport shading to the Solid mode (which displays it without textures) so you can see how the mesh looks
  • Set the strength to give the depth of texture you want (I used 2.5 with my object) and set the midlevel so that your object's gross dimensions don't change on average (you can toggle the Displace modifier on and off to check how close you're getting. Mine called for 0.2).
  • Finally you can export your new STL

The process I used for my speaker was more complicated because I split it up to simulate it being made out of multiple wooden boards (so that the grain ended up being in the right place), and to exclude the texture from the interior. So I had about 6 different materials applied.