Making Decals with depth?

Does anyone have a good workflow for creating decals with depth? I have tried sculpting this crack in zbrush and would like to make it a decal texture in UE4, and I baked a low poly verssion that I spawn as a mesh with a masked texture, but this results in the mesh clipping through the ground as you might expect. Is there a better way that I could be going about this to get a ground crack with depth? Thanks!

1 Like

I would personally look into Parallax Occlusion Mapping, I’ve seen some people make some badass crack decals with it, among other things.

Hope that helps! :slight_smile:

2 Likes

Yep, convert it to a height map and use pom.
https://vimeo.com/282890534/description

2 Likes

Haha Andreas I was just looking at your video! I have been having issues saving a height map from this which is another problem. I will try that when i figure out how to get that. Most videos I find are regarding creating a model FROM a height map, which is the opposite of what I am trying to do :stuck_out_tongue:

Bake it to a plane. If you are using Houdini, just save the height as a color and normalize it against the max height and bake out color using simplebaker. 2min job. It’s how I made the bullet holes. Make the mesh first.

Got it! Side note, substance painter needs to add the ability to bake height maps! Had to go back to xNormal for this one. I still need to renew my Houdini indie license ;__; I’d lve to get back into it

If you’re married to the idea of using z brush. You can import a flat plane, subdivide it with smooth turned off.

Make a mask, ie the cracks you’ve painted could be a mask texture. Drag in the mask over the plane, isolate areas and sculpt away. After that you’ll wanna decimate and then bake the normals from high to low.

You can do this in Houdini as well. The workflow is a bit different but very doable. Depends I guess on your comfort with zbrush or Houdini

I almost got everything figured out, but one problem still remains, it does not seem that Ambient Occlusion or Pixel Deoth offest will work with decals. Do you guys think those are necessary or is there no way to make them work with Deferred Decals?

Think it has to be a mesh decal. I find Deffered Decals don’t work in many situations :slight_smile:

but will a mesh decal work being spawned on the floor of a level or something like that? The reason I am using a deffered decal is because I can spawn them in blueprint. I assume using a mesh plane will cause Z-fighting

Yeah, you will need to programe a bit how they spawn in Blueprint. It isn’t hard to make them spawn correctly on flat surfaces, but curved or spherical objects is kinda hard or needs some trickery.

@Partikel made a version of that, and I’m also interested in how it was made :smiley:

If you want to spawn them on flat surfaces, you can use for instance a LineTrace, and get the Normal of the Hit object, and use RotationFromVector to get the rotation of the decal. For Z depth, also needs some trickery, but you could bare bones fake it and translate the decal by 0,001 from the surface :smiley:
Maybe not the best solution, but i tried it that way and it kinda works.

But I’m very interested to see some more elegenat solutions :smiley:

There is no great way of doing it. In my video I’m spawning a quad and depth hack it. If you want to use decals you have to spawn a blueprint which is also crap.

So, if you want to dynamically spawned cracks you’ll simply have to pick your poison. The way it’s implemented in Unreal is iffy.

I was planning on doing a tutorial on it but I don’t want to show the hacky, non performant way of doing it.

2 Likes

hmmm interesting. I will try just instantiating it on a plane mesh. Is that what you mean when you said you are spawning a quad? It’s very interesting that this is so difficult to implement.

Yeah. I used a meshparticle because it was just a quick test but spawning a mesh would work just fine.

Sorry for late comment. I am struggling to figure out on depth with decals too. Anyone know if there is a tutorial somewhere on how to achieve this? I tried many things that people did from different threads, but was not able to do it anyway.
thank you