Dual color model design



I am trying to design a dual color model to 3D print and know that I need 2 STL files (one for each color). As a test, I took an egg/oval shape and then applied a displacement using a black and white texture. In other words, I used the applydisplacement to “carve/engrave” into the egg surface to get grooves in the egg surface. My goal was to obtain the grooves or carvings to use as the 2nd color STL model by Boolean difference of the engraved egg with the original egg.
I have attached a file that has the overlapping eggs in the center. The engraved egg is shaded yellow and the original (before applydisplacement) is not colored.

However, Boolean operations seemed to fail on the 2 center aligned eggs. Remember that my goal is to extract the valleys/grooves from the original egg by subtracting the grooved egg.
Moreover, as I did further boolean tests against the grooved egg, I realized that the success boolean operations treat the grooved egg as if it were the original egg prior to the applydisplacement.

It would appear that the results of the applydisplacement doesn’t really result in a grooved complex nurbs object for boolean operations at all.

Can anyone suggest a workflow to get what I want from the grooved egg with the applieddisplacement? (goal is to get 2 STLs, one of the grooved egg, and one of the Grooves alone. Both STLs have to fit together like a puzzle piece to create the dual color model to 3d print).

Implicit surfaces
(Laurent Delrieu) #2

here is a solution using Grasshopper. As I understand you want to apply displacement and depending of the displacement colorize your mesh. I have done a mesh isoplitting which could be useful.
I propose you a script that is doing a real egg shape as a surface. This surface is remeshed and some displament is added as a proportion on the height with a sinus. But you could imagine whatever function you want.
and then iso splitting, enter a mesh, a value for each point and an iso value and you will get 2 meshes. That normally could be joined without hole.

20161124_egg_split.gh (24.9 KB)

Mesh smoothing
Marble fractal lines and foliation

Hi Laurent,
Thank you for the creative use of grasshopper. I appreciate your efforts. The script has some great creative solutions however, it doesn’t meet my original intent so I should clarify:

  1. I need to generate 2 separate STL file models (one for each color) due to limitations of 3D printer/software. Each STL must be for a single color, one for the bump red stripes alone without body; and one STL for the white body containing the groove valleys but not stripes. The 2 models must then interlock like a puzzle to create a smooth(ish) surface similar to the original surface of the egg before the applydisplacement using picture texture map.
  2. Although you have very creatively used a sine function to create bumps, this solution is too specific. I should have been more clear that this striped egg example is just a simple test of a more general workflow. My real intent is to model something like the nervous system dual color tree frog with 2 interlocking STL files (if you google this, you can find it on Thingiverse to download). As you can see from the frog, the black and white skin lines are very organic and complex and not easy to generate mathematically. I know that nervous systems used reaction-diffusion to procedurally generate the skin pattern but I am trying to use a different approach of using an image texture to map the pattern onto the surface and using applydisplacement to create hills and valleys and then somehow use a boolean operation to get the “valleys” bits as separate STL to interlock with the body+hills.
  3. I am looking more for a useable workflow utilizing applydisplacement on arbitrary closed polysurface using image texture pattern. This allows me to tackle the organic skin patterns like the tree frog mentioned above.
  4. Lastly, I am hoping Mcneel can chime in to provide workaround or answer as to why the applydisplacement bumps do not seem to interact with boolean operations(is there an option to “bake” out the bump textures that I am missing?).


One possible workflow would be to use _ExtractRenderMesh on the object having the displacement, then create a mesh from the ellipsoid without having the displacement. Now you have two meshes you can boolean from each other.

In the example below i did this, and boolean-subtracted a copy of your displaced mesh from the ellipsoid mesh resulting in two interlocked pieces. However, keep in mind that if you overdo your displacement strength like in your example, the result is a selfintersecting mesh which may not be a printable object or perform well using booleans as well.

testdualcolor.zip (7.8 MB)


(Laurent Delrieu) #5
  1. Yes the script I write can output 2 STL, just bake them. I think you wanted 2 STL closed ! Me I proprosed to you 2 STL that are closed after union. But 2 closed STL is doable and seem not to difficult.
  2. Sinus was just a way to show you how to displace mesh in GH. If you look in GH you will find some reaction diffusion on mesh that I did.
    Here is link for frog


Hi Clement,

I actually just did the same using ExtractRenderMesh after watching a video by Brian James of Mcneel on using applydisplacement on a shoe design. Great tutorial packed with info. I also appreciate your contribution here and I confirm that your answer works.
One thing I would like to point out is that ExtractRenderMesh works but Mesh from Nurbs on the object does not work with the suggested workflow. Perhaps this is obvious to some but it wasn’t immediately obvious to me.


Hi Laurent,

Thanks for the link to your work. Love it! I am new to Rhino and have not used Grasshopper so maybe I am not immediately comfortable with it. However, I saw your reaction-diffusion mesh and think that this is awesome. I hope you don’t mind if I come back to you regarding this solution when I take it to another level and get a bit familiar with grasshopper and the geometric procedures used.

(Laurent Delrieu) #8

Yes you are welcome to ask question.
Main discussions and experts for grasshopper are on grasshopper forum.