skinned mesh renderer x-raying through itself

i have a few skinned mesh renderers on a player and it looks like you can see part of the mesh through itself for some reason. i saw somewere that turning on update bounds while offscreen fixes it but it dosent. it used to work fine im not sure what happened. i will post some images here:

I can’t really tell what’s supposedly off about these images because I can’t tell what they are or what they’re even supposed to look like. I’d say make sure that your normals are all pointing in the right direction and that you don’t actually have any actual overlapping geometry.

its supposed to be a monkey and you can see the head through the body in this image:

and the arm is going through the body here:

but i shift the angle a little and now you cant see it here:

i have no idea why this is happing

Looks like inverted normals to me. In your 3D app see if there is a way to visualize normals or face orientation. Make sure all your normals are pointing outward. If the normals are pointing in the wrong direction then in Unity you will see the inside of the model instead of the outside.

nope its all correct and the render face on the material is set to front. also when i move inside it the isides invisible. plus the render face on the material is set to front. im using a custom material required for a portal asset im using but switching the material to lit doesn’t help, but you must be right about the mesh being wrong in some way because when i just make a mesh renderer not skinned mesh render it still does that wierd clipping issue.

help.

also just tried probuilderizing the regular mesh renderer one and fliping the face normals it dosent help just makes it look wierder.

Does it look correct if you use the standard shader? If so, it could also be a problem with your custom material depth testing or something like that.

no it looks wierd with both

hello? dose anyone know how to fix this?

I can’t tell anymore without seeing the actual model.

i finally realized what the issue is. when i set the material to transparent then it starts doing that but when its opaque it looks fine. the problem is i need it to be transparnt.

Transparency is tricky in video games. Transparent materials don’t write to the depth buffer so that means that the renderer cannot reliable sort overlapping faces like opaque materials can.

Why does it need to be transparent? Is it some kind-of ghost ape? In that case, you might try rendering the ape opaque to a render texture with transparent background and then using the render texture to texture a camera-facing quad. It’s sort-of complicated to set-up but then you won’t have to worry about overlapping parts of the model.

If you’re trying to use transparency to key-out certain parts of the model, then you could use alpha-cutout instead of transparency.

ok thanks it works now because im using it to cut parts of the model out to appear on other sides of a portal but not the whole thing and i thought alpha clipping required the material to be transparent