What are these black artifacts on my mesh?- SOLVED!

These are just some block outs I’m using but I’m getting these black artifacts around the corners of the mesh, and black splotchy areas on the ceiling.

My directional light is movable since I’m using a day-night cycle, so I’m not baking any light.

Also, if it makes a difference, these meshes are added in-game during runtime.

Are the mesh UVs good? Do you have mesh distance fields turned on?

I do have mesh distance fields turned on to get a water shader I’m using working. I’m fairly new to them.

UV’s could definitely be better, since most of my game is solid colors I usually just have blender smart unwrap them for me to save time.

But I think it is the mesh distance fields because this is the result after I disabled them:

Only issue is that this destroys my water shader.

Ok, then check the the distance fields for these wall meshes:

The should look roughly the same as the meshes.

yep, this is what I’m getting.

Looks good. Also use dynamic skylight with MDF.

If it’s not that, I guess it must be UVs. What does it look like in the mesh editor, channel 1?

Perfect! Wow, thank you so much, this is exactly what I needed.

For anyone else having similar problems: I disabled generate mesh distance fields in the project settings (which fixed my black artifacts). Then for my water shader, I enabled mesh distance fields for the meshes that overlap my water (since I’m using distance fields for foam). That option is found in the mesh editor details panel, see the picture in the comment I’m replying to.

In my specific case, I also needed to enable Distance Field Indirect Shadows. This is done on specific instances of the mesh in the world, not in the mesh editor. (Select the mesh in your world and search for it in the details panel). The option will only become available if your mesh is set to Movable.

Once again ClockworkOcean, thank you for your help!

1 Like

You might get some joy tweaking something here:

323857-screenshot-3.jpg

Can you elaborate a little more on how your water worked before and how you got it working properly after disabling distance fields in the entire project?

After disabling distance fields my marketplace cartoon water asset looks like this:

When it should look more like this (which it did before disabling distance fields):

I’ve tried enabling them individually on the water meshes themselves, but I don’t see a way to enable distance fields for the landscape, which is what I think is used to draw the shore foam properly, but I’m not sure just yet. Hoping some insight from you might help me out here.