CreatiCode last edited by info-creaticode
There are 2 blocks that you can use to add text objects to a 3D scene. The key difference between them is whether the text has some thickness or not. We will focus on text with no thickness first.
3D Text with No thickness
You can add 3D text with no thickness to a scene using this block:
For the first input, you can write any text (numbers, letters, symbols), such as “Hello!”. Note that by default the text will be facing the same direction as the Y axis.
You can also use emojis as the text input. There is a complete list of emojis in this website.
The next input allows you to pick a different font style.
You can set the color (and transparency) of the text using the next input.
Width and Height Limits
You do not set the size of the letters directly. Instead, you specify overall limits on the width and height of the entire text object. Note that the text object will keep its own width and height in proportion, so long as it does not exceed the limits you specify.
For example, suppose you want to add some text over a box that’s 200 wide and 100 tall. You can then specify 200 and 100 as limits for your text’s width and height:
By default, the text will be a flat object. However, sometimes you need the text to curve around another object, such as a sphere or a cylinder. You can use the diameter input to make the text curve back, and it will be as if the text is written over an invisible cylinder of the given diameter. Note that the text size is still controlled by the width and height inputs.
For example, if a cylinder has a diameter of 200, and you specify the diameter of the text to be 201, then your text will be closely wrapped around the cylinder.
Since the text we add is flat, It is hard to read the text if you are not looking at its front face. To make sure the camera is always looking at the front face of the text, you can make the text always facing the camera. As the camera moves, the text will be rotated automatically to face the camera:
Add 3D Text with Thickness
You can use the following block to add a text object with thickness. In addition, much more text styles are available. Note that this block takes more computation to create the 3D text compared to the first block we introduced above.
There are 2 key differences:
- Font: There are many more fonts for you to choose from.
- Thickness: Now you can set the thickness of the text object, so it is no longer invisible from the side.
Updating Text Color and Texture
The 3D text object is just like any other object. You can update its color or texture as well. For example, this program creates some text made of bricks:
Updating Text Position, Rotation and Scale
You can also update the position, rotation and scale of a text just like any other object: