Displacement map or other "custom shape" function

Hi Guys,
I am trying to realize the following mesh in Babylon.
Here is a picture as a goal:

A tube with a cutout that is straight at the bottom and does not follow the outer contour.

Unfortunately, when using a DisplacementMap, the outer contour is simply pressed inwards. What other options would there be for such a problem?

The ideal would be the CreateRibbon function, which would also take over the shape as a function.

I’ve been sitting on this problem for 3 days now … my head is smoking …

You can try with CSG:


I have subtracted a thin torus to a bigger torus to get this.

In your case, you will have to generate your own shape instead of the thin torus, however. Maybe with a ribbon…

Thanks for the answer.
With CSG, I think the calculation would take too long. The inner torus should be straight at the bottom and not round and the path of the inner torus should follow a curve. I am currently implementing this using DisplacementMap. To do this, I have adjusted the displacement function somewhat. If I get a good result, I’ll post it here.

1 Like