Putting decals on material elements (Rubik's Cube simulation)

I am trying to create a Rubik’s Cube simulation. The object is a 4x4x4 cube with the 6 traditional colors. I have an added twist, though. Each side will have not only a color, but also a hexadecimal number. In the end, the objectives will be to have each side have all the same color like a normal Rubik’s cube, but also only one of each of the numbers; further, each grouping along the X, Y, & Z axes will have exactly one of each of the numbers. Since I am brand new to UE development, I am taking this in stages, starting with the simple parts & graduating to increasingly more complex goals. My steps are as follows:

  1. Create individual bricks with faces that can be dynamically assigned colors & numbers (done, using material elements for each face)
  2. Create the cube from individual bricks (done, pretty simple)
  3. Assign decals (color & number textures) to each visible face
  4. Build animation so that bricks can be moved in groups like a real cube
  5. Create game actions (shuffling, solution tracking, timer, etc)

Right now, I’m hung up on the decals. I created the decals in Paint, nothing fancy, just 100x100 PNG files. I then imported the PNG files as textures and converted them to materials. The material blueprint shows the complete decal, so that looks like it should work.
When I try to assign the decals to the cube faces, though, they don’t not show up properly. The color shows, so I know the material is being loaded, however, the numbers do not show, or what appears to be blurry zoomed in portions of the numbers show instead. I am using all default values. It seems that the solution should be simple, however, I have not found an answer in any of the tutorials or other posts.
There could certainly be an easier way, just not sure what it is. Ideas welcome. The picture below shows an edge brick with green 0 on the left and blue 0 on the right.

These are the actual faces that should appear. Not worried about the clockwise rotation just yet.
Blue0
Green0

Thanks for any help.

By decals do you mean you are assigning materials to specific walls?
Or are you using deferred decals?

If it’s just materials then I would suggest looking at your Rubik’s cube model in a 3d program and checking if the faces have proper UV maps setup.

Sorry, clicked “solved” by accident. I was trying to uncheck the box.

I’m not sure what you mean by UV maps. I usually think of UV maps as a way to represent material across a curved surface like a sphere. This a flat surface. Seems that the material should overlay on top of it. It has the same number of polygons as a side on the generic cube. Those show the PNG image as it typically appears in an image viewer.
The difference between my 3D object & a regular cube is that mine has smooth beveled edges & a recessed center, like what you typically see in a real Rubik’s cube. When I import that object to UE5, the material shows like the image above.
I would model the object in UE5, but its modeling tools are not as robust as Blender, which I used to create the bricks shown above.

rubicks_block.zip (285.7 KB)
Here is a mapped cube segment in a project. UE 5.2

Sorry for the delayed reply, got overtaken by other events. So, I was able to create a material for the cube using the UE5 material editor That’s a “duh” on my part). Then, I assigned a texture to the material using the blueprint below:

It makes the following face, which is perfect. I can add any additional roughness or imperfections later.
Screenshot 2023-06-01 003950

I will experiment further with adding materials to the other faces. Ideally, I would prefer to add those in blender, then use the blueprint above.
My next phase is to dynamically set the texture, that is the color/hexadecimal number combo, at run time. This adds the ability to mix up the alignment and therefore solution for the cube.

Thanks for your help. I will examine the ZIP file you sent in the near future. :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.