Texture only 1 face of a cube

I’m having difficulty trying to texture only one face of a cube. My cubes are game tiles - think scrabble tiles - that the player selects. I want to put a texture only on the top face. I would greatly prefer to use a single material and mesh and dynamically swap out the tile color and texture as needed. I would like to “UV Unwrap” the standard cube static mesh and create the textures I need from that, but I can’t figure out how to do it.

I already know how to change the color and texture dynamically. I just need to figure out how to make a texture that fits.

Any help would be appreciated.

Uh! It sounds to me that you’d be better off learning more about UV/Unwrapping… and once you’ve got that, it should be easy to

  • UV map a cube to this need
  • Set UV coordinates in your material
  • Set up textures to be used with the above combo

Not being able to find any good resources for how to do this inside Unreal, I used Blender to create a cube, unwrapped that, deleted everything from the uv map except the top face. When I imported that into Unreal and applied a square texture to it, it seemed to know where the texture fit. I would still be interested to know if this can be done inside Unreal for the native static meshes it has.

OK, I think you need to read up quite a lot on the whole UV-mapping thing :slight_smile:

You wrote: “deleted everything from the uv map except the top face” - this means you have an imported mesh with areas not UV-wrapped = not good :slight_smile:

UE4 works with (can work with) several UV maps on a mesh, also for proper light handling. If you want to make anything remotely serious, you have to have a profound understanding of how this works.

There’s a trillion tons of info about UV mapping out there, Blender is a fantastic application to handle this, and you cannot / should not be able to do any unwrapping inside Unreal, that would not make a lot of sense IMO.

Perhaps you’d want to use Unity instead, it is somewhat simpler in this whole regard (Unreal is a better tool, but it is therefore also more demanding of the developer)

Also, it would not make any sense to unwrap Unreals internal (‘native’) static mesh, it’s not there to show anything finalized, you’d need to use a 3D application for this.

Perhaps read into Unreals BSP’s, but in general it sounds to me that you are trying to invent a technical solution to a challenge and that there would be a much simpler way to do it and that you should probably ask how to make that game instead, and start there - or start by ‘just learning’.

Think of that person trying to build a robot to change the tires of his car asking how to program the AI on the robot… when he would probably be better off learn how to fix cars from ground up instead :wink:

Cheers!

I have no earthly idea how to interpret your posts. I can’t tell if you think you are being helpful or if you are deliberately being a jerk. I don’t know if you think telling me I need to learn more is actually beneficial or what, but I would think it should be pretty obvious by virtue of the fact that I posted a question on a forum that there is more I need to learn – hence the question. I am definitely still learning.

Telling me there are tons of resources out there but failing to provide any specific links or guidance is relatively pointless. I’ve watched a great number of tutorials and read quite a bit of Epic’s documentation, but none of it applied directly to my circumstance. Epic’s documentation is horrible from what I’ve seen anyway. The vast, vast majority of resources I’ve found are out of date and / or not directly applicable.

I appreciate your telling me having a mesh with only partial UV Mapping is not good. Perhaps you would care to explain why? Or link me to a resource that does? Additionally, pointing me toward BSP’s may (or may not) prove useful. I had seen the term, but haven’t specifically read anything about it yet.

Incidentally, I would have accepted your first response as the answer if you had so much as provided a single link or two to a useful resource.

and Regards.

2 Likes

I agreed with thunder chicken on that one buddy. you are not helping this tread at all. Can someone please direct user to good tutorials on U.V mapping or page reference?.

Hi ThunderChicken - and Deathscyp - I have no idea why I did not get any notifications of news in the tread before Deathscyp poked me :smiley:

So it’s probably much too late for ThunderChicken, sorry for that, but for the next searching soul out there let me pretend I could turn back time:

UV mapping is done in your 3D modeling package. Now, since I cannot know which one you’d like to use, I cannot tell you how to do it in your package.

Most known such packages are probably Blender, Maya, and 3DMax - but this is much a war of religion, there are MANY programs out there, and many people tend to say that the one they have learned is the BEST and everything else sucks.

Blender is free, the 2 others are probably in most cases illegal cracks, and the ones that do have legal copies are paying a LOT. You’d probably then conclude that Blender is less capable than the 2 others, but this is strangely not the case.

Furthermore Blender has a thriving community.

All this said, I’m sorry to say that no matter which package you chose, you have a LOT to learn if you want to make games, make use of UV mapping, and am not familiar with any 3D packages.

This is one reason why games are most often made in teams: One person knows programming, another has a 3D package that he/she knows, and another does game design etc.

I’m not saying it’s impossible to master all, but there is a LOT to learn.

To get started with a 3D modeling package (needed to master UV mapping), I’d suggest go to Blender.org and download the latest.

Then dive in: Google Blender Tutorial

You can of course also get the answer you ask for, but it’s slamming you into a wall:
https://www.blender.org/manual/editors/uv_image/uv_editing/layout_editing.html

Please PM me if there’s anything else, not sure if I’m not notifications, maybe a spam filter or something, hmm… cheers.

Hi all,

While I think it’s a great idea to check out resources on how to UV map your mesh, there is another method that I can recommend for achieving the desired effect in the engine without the need to redo your UV maps.

In the example provided ThunderChicken asked how to apply a texture to just one side of his mesh (like a scrabble tile) and be able to change this texture dynamically. I think using a deferred decal would be good for this particular scenario.

  • Create a blueprint actor with your mesh
  • add a decal component
  • create a deferred decal material and use that for the decal component (make sure the decal is sized and rotated correctly so that it applies to the mesh)
  • in the decal material you can adjust the texture dynamically at run time and since it is a child component of the Blueprint it will always be oriented correctly relative to the mesh

Here is a very simple example where I used a texture of a target. You can also mask out parts of the texture by using the opacity input in the material. Typically a black and white texture is used (white is fully visible and black is hidden).

I hope that helps,

Ed