How can I create a hole in a geometry with text?

Hi,
how can I create a hole in a geometry with text?

For example, if I have a box and the text hello, how can I create a hole in the box with that text?

Thanks.

Search for CSG
Here is one example of using text to hollow out the inside of a cylinder wall.
Example : Engraving - Three.js Tutorials
image

2 Likes

And here is a simpler example of “hello” in a box
Example : Threejs Boilerplate - JSFiddle - Code Playground
image

thanks for your answer :slight_smile:

do you know if you can do something similar with shapes and holes? using the text as a hole in the shape.

https://threejs.org/docs/#api/en/extras/core/Shape.holes

If you generate the text outlines yourself, you can do it like in this example:
Shapes - author @Mugen87
(From the Collection of examples from discourse.threejs.org .)

Thanks, finally I did it

I created a geometry with the text and I extracted the shapes array from it.
I mixed that with an extruded shape.