Decal Shader?

I recently used the decal system UE4 has for a project and it’s good but it just doesn’t feel as robust as it could be. I was hoping for something along the lines of what star citizen is doing in terms of being able to use a decal map. Unless I missed something I can’t really use their method of making a plane to map the decals to and use them almost like stickers. So does anyone know of a way to get an effect like that in UE4? I imagine it would be something with the material editor I just have no idea what really.

Unreal has the “decal actor” which applies the decal to nearby geometry.
I have a hard time understanding why that’s not fulfilling your needs?
Could you post some small screen shots of what you want, and what you currently have?

What you’re describing is just some polygons that are mapped in UV space to a ‘decal atlas’.
these act more like stickers, and are *usually *made within the mesh before exporting.
so you have a single texture with all sorts of different decals on it, and you have some meshes which are unwrapped for each of the decals within that texture.
you would then either have those meshes (usually just planes) built on top of the meshes you make when you model them before exporting to ue4, or if you want them to be manually movable and placed in the editor you’d have to make a blueprint out of the base mesh and add the decal meshes in that way.

Doing it with the method of them being made with the mesh before exporting doesn’t sound like it would work to get the effect I’m looking for. The idea is that these “stickers” blend down into the texture on the actor like decals do. But with the decal actor in UE4 ut doesn’t really let you map anything like that.

Have you read the GDC 2015 “Visual Effects in Star Citizen” presentation/paper?

I have but it doesn’t seem to go into much detail about decals unless I’m missing something?

Wait ok so I’m completely lost then.
You either project a texture on to the object using the ‘decal’ actor, or you have a texture-mapped plane that you place where you want the sticker to be. there is literally no other way to do it…
Can you post some pictures or link to a video showing what you’re wanting to do so we can help you out please?

EDIT: ok so if you’re meaningthis video then that would be using decal actors. except the bits of the mesh falling off, that would be a completely different story.

Okay, so I’m gonna state I’m thinking of this with a more environmental/ prop kind of design than what they showed in the video. It’s the work flow they’ve used to make a few of their ships and other actors like here: From what I can see they have modeled the planes and other things before hand or just have a system set up to apply them to the surface. Then like here That indented piece is a normal mapped decal but it’s mapped to a decal atlas/ texture. The decal actor in UE4 does not let you do this I believe and the reason for doing it like this is so that you can blend it with the texture beneath the decal. So I don’t know if by this point I should be looking at something with the texture editor or be looking at blueprints because the decal actor in UE4 seems limiting in terms of what I’ve seen elsewhere. Again, unless I am completely missing something.

Ah, ok, I get you now.
yes, to get a texture atlas to work with decals is a bit more complicated than it would at first appear, but less complicated than you might think.
I’ve made a material function that will do the job here. Just plug 4 scalar numbers in to the ‘x1’,‘x2’,‘y1’,‘y2’ inputs, with the values for them as a percentage of the location of the specific texture within your atlas. you can find this out really easily in Photoshop with [ctrl+R, then right-click the ruler and chose ‘percentage’, then with the ‘v’ select tool drag out from the rulers to the start and end points of the atlased texture] and plug those numbers as fractional percentages in to the UVAtlasing function, and plug the function in to the ‘UVs’ input of your texture, and you’re good to go with the decal actor :slight_smile:

Awesome. Thank you. I’ll try this in a bit and see if I can’t get it to work.