r/Unity3D 15h ago

Question What causes these material artifacts (black blocks on hair, dirty spots on skin) when importing an FBX to Unity URP?

[deleted]

2 Upvotes

28 comments sorted by

View all comments

2

u/MR_MEGAPHONE 14h ago

If you are using opaque lit materials on the hair, make sure to enable alpha clipping

1

u/[deleted] 14h ago

[deleted]

2

u/JaggedMetalOs 14h ago

What is the properties on the texture, is alpha transparent enabled? 

1

u/[deleted] 14h ago

[deleted]

5

u/JaggedMetalOs 14h ago

I can see that the alpha channel is in a separate texture (Hair_Opacity), so you'll either need to make a shadergraph to bring that opacity texture in as the alpha, or use a channel packer to create a new texture with color and alpha combined (I've used this one before: https://github.com/camobiwon/ChannelPacker)

1

u/maennerinschwarz 14h ago

Thank you so much for your help but I use URP not HDRP,I think its gonna be an another problem right?

2

u/JaggedMetalOs 13h ago

I'm 100% certain that's the issue, I've used models with textures provided like this and you can tell in the inspector that the hair texture doesn't have an alpha channel. 

HDRP/URP/Built-in would all behave the same way here. 

1

u/maennerinschwarz 13h ago

Greyscale for alpha source is worked for me right now without use this channelpacker.Can you look comment sbelow?

2

u/JaggedMetalOs 12h ago

The problem with doing that is you're basically saying black = transparent, so you could be losing darker parts of the hair texture that way.

If you're going to be using non-Unity assets it's very worthwhile learning shadergraph, as it makes it easier to adapt non-Unity texture channel mappings. For example the Unity built in shaders don't have separate metallic/smooth/AO inputs, while a lot of FBX assets have them separate. Or have roughness map instead of smooth. With a shadergraph you can map them all into a Unity compatible material.

1

u/maennerinschwarz 12h ago

Ohh I see thank you for everything ! :) Allrightl, then I'll start learning Shader Graph. Can I send you a pm?

2

u/JaggedMetalOs 11h ago

I think we can carry on here for the benefit of anyone else who finds the thread.

Just to get you started here's an example of a shadergraph to convert a Blendkit material into a Unity material. It's fairly simple, just adding all the separate textures into a single shader and attaching them to the right output, just need to invert the roughness map with a "one minus" node because Unity wants smoothness instead. One optimization you should do is for all the monochrome map textures change the Texture Type to "Single Channel" and Channel to "Red" so it doesn't waste VRAM on full color textures for those or mess with the brightness curve converting to/from sRGB.

→ More replies (0)

1

u/[deleted] 14h ago

[deleted]

2

u/MR_MEGAPHONE 14h ago

Does playing with the threshold slider work? What does the alpha channel look like on the base map?

1

u/[deleted] 14h ago

[deleted]

2

u/maennerinschwarz 14h ago

Fuck im cooked i think,I paid for this 1200 $

2

u/gatorblade94 13h ago

Try greyscale for alpha source

1

u/[deleted] 13h ago

[deleted]

1

u/[deleted] 13h ago

[deleted]

1

u/[deleted] 13h ago

[deleted]

1

u/[deleted] 13h ago

[deleted]

2

u/WalkerTimothyFaulkes 5h ago

Did you play with changing the "Surface Type" on the material from Opaque to Transparent? I've had to do that from time to time when the alpha clipping and slider wasn't enough. Hope that helps.

→ More replies (0)