Changing a part of a texture on a 3d mesh

Godot Version

Godot-4

Question

Hello everyone, I’m trying to try something different from 2d and I’m trying to create 3D dice where I can customize each side while running the game. As I don’t have any experience working with 3D models I’m wondering if somebody has any pointers for me.

The case I fear is having a trillion textures to cover each case (It would get ridiculous quickly even with a six-sided die ). I came up with a solution of making a die out of 6 planes and I can change the texture of each one individually. Still, I fear there might be some issues with this approach when it comes to the mesh but so far at least it works.

Does anyone know how to approach this or have any keywords I could search up?

Hi Gatherm8,
have you managed to find a suitable implementation for your game? I’m currently trying to develop something very similar and so far I have no clue how to solve it.
If you did find a solution could you share it here? I’ll do the same.

good luck

In Blender, you can select a different material for each face. If you just make a cube, go into edit mode, and assign a different material for each face of the cube in face select, I think it would have the result you’re looking for.

You can then import it into Godot, place it into a scene, and set “editable children” to true. Then, you can change the surface material overrides for each face, with any material you’d like, a texture for example.

If you need a more in-depth explanation, i could probably write that up if you need.

1 Like


Something like this?

I think that is a possibility but what I ended up doing was to create a cube out of 6 planes and a cube collision shape and raycasts to detect which side the cube landed on. That way they can all have an independant texture and it is quite easy to change the function of the sides.