naelstrof / SkinnedMeshDecals

An example of rendering decals on SkinnedMesh Renderers in Unity.
MIT License
155 stars 24 forks source link

painted texture bad quality #6

Open worbarry opened 2 years ago

worbarry commented 2 years ago

am haing issues with quality even painting a 4k texture to a 4k texture its still pixelated?

naelstrof commented 2 years ago

What do your UV2's look like on the model? Depending on the size and arrangement of the model, it's possible for decals to be pixelated at any resolution.

Could I get a screenshot of your problem as well?

LeoChen125 commented 11 months ago

Hi I also have the same problem and would like to know how to confirm UV2 and improve it? Thank you! Snipaste_2023-12-12_13-28-57

naelstrof commented 11 months ago

That happens for a number of reasons: The system allocates textures in powers of 2 based on the renderer's bounding box and the "texels per meter" setting.

An easy way to increase resolution is by turning it up here. image

Next up, the quality of the UV2 unwrap matters, wasted texels means lower resolution, you can either play with the lightmap packing settings, or manually create UV2s with better packing to increase resolution further.

You can see here, the UV1's on this model are sharing texels by being mirrored. The UV2s are required to not share UV space, so they end up being half as dense even with a good pack. A bad pack can lead to even further texel reduction for decals. image

Finally, there's strategies to "fake" higher resolution-- If you are only applying blood splatters or "damage" to a character, instead of painting albedo textures directly onto a character-- you could instead use it as a mask to reveal a repeated underlying "damage" texture. Or alpha clip clothes to show bloodied body.

I've seen some users separate the R, G, and B, channels to represent skin damage, flesh damage, and burn damage channels that peels away layers of the model to show various damage. This let them author custom damage decals for each kind of weapon. I hope that helps!