How to draw a texture? 😭

Godot Version

4.2.1

Question

Sorry, this might seem like a stupid question, but I’m going crazy and it seems absurd that I can’t find any answer online. I’m totally ignorant about 3D, models, textures.

I created a simple cube in Godot.

I would like to apply a texture to this cube, that fits all the six faces of the cube.

What shape and size should the texture be? :neutral_face:

(click on the album to see image captions that describe the various attempts)

So please, how should I draw a texture? :sob:

The easiest way is to use a CSGBox3D node instead of a MeshInstance3D node.

To understand why, you will have to learn about “UV Coordinates”. After a quick Youtube search, I found these 2 explanations, which I think are OK, but you might have to search some more to find the one that makes the most sense to you.

The UV’s of the MeshInstance3D cube mesh look like this:

You can see that the six sides of the cube are arranged in a 3x2 grid. This layout is not very good, because the UVs are stretched vertically. So you either have to use CSGBox3D or model your own cube in another software, like Blender (https://blender.org).

1 Like

oh… now everything is clear. Thank you very much for the explanation!
I got around it composing a cube using plane meshes to compose the 6 faces of the cube :face_with_diagonal_mouth:

If it works, it works :person_shrugging: