I want to create a bas relief from a 3d scene in Blender. I have found one way to do it but it’s not perfect and doesn’t look quite right.
This is what “bas relief” is for anyone who doesn’t know:
More info: the bas relief mesh is going to be exported to STL and printed with a jeweler’s 3d printer and made into a necklace. So it has to be real (polygonal) geometry, not something like normal maps. It’s not hard to think of other situations as well where you’d need a geometry instead of normalmap, such as bigger architectural bas reliefs, not coins or jewelry, so an answer should benefit more than people wanting to 3d print or mill something.
Here is the current way I do it and explanation where the issues are with this approach.
- Add a camera facing the model(s).
- If there are multiple models, make sure the models are the same distance from the camera and have the same “thickness” (Y scale/size in the camera’s local Y axis), make the latter 1 blender unit.
- Set materials to black, shadeless. Set background and ambient colors to white.
- Set renderer to Blender Renderer.
- Enable Mist. This is where the magic happens. Have the mist appear where the closest polygons to the camera are, have it completely fade in when the farthest polygon from the camera is located. If the camera is 4 units away from the closest point of the model, set Mist Start value to 4.0, and if the model has been scaled to 1 Blender unit in the Y axis, set the Mist Depth to 1.
A Bright/Contrast Node can be used in the compositing nodes to further adjust the rendered heightmap.
- Important! Render in OpenEXR or another 32 bit format, otherwise the depth data stored in pixels won’t look smooth when applied as a Displacement modifier later.
A model like this (download link: http://www.blendswap.com/blends/view/69985 ),
Should render into something like this:
Use power-of-two resolutions for this image to save render time when used as heightmap. Use a high resolution, such as 2048x2048.
Now, add a plane and subdivide it 10 times, or any other flat mesh with many polygons. Add a Displacement modifier, and set its texture to the image you have generated. Change the Strength value until it looks good for you.
You should end up with something like this:
Looks pretty good, but there are two issues.
Look at the last picture, there’s a noticeable “drop” in height where the model ends and the surface of the “coin” begins. Would be nice to make it smoother transition, doesn’t look like a natural bas relief on the edges of the model this way.
Need few million polygons to make this displacement modifier approach look decent. Most of it is wasted. Is there any way to do this without ending up with millions of polygons that cripple my and the jeweler’s PC and make it hard to inspect the model before wasting money on the 3d printing process?