More transparency issues

I have my material with these settings but I get transparency issues. Any ideas what I’m doing wrong?

mat.diffuseColor = new BABYLON.Color3.FromHexString("#7fcdff");
mat.backFaceCulling = false;
mat.transparencyMode = BABYLON.PBRMaterial.PBRMATERIAL_OPAQUE;
mat.hasAlpha = false;

image

Thank you!!

Do you have a playground?

2 Likes

Hi @Givo,

If you click on the mesh in the playground and select option 2,3 or 4 and choose another colour, as you rotate you can see transparency particularly from above and underneath.

https://www.babylonjs-playground.com/#YIU90M#119

HMM. I see just this.
34%20AM
What do you see?

Yes, sorry that’s correct, I loaded just part of the model.

I’ve loaded more of the model in this one, might be easier to see:

https://www.babylonjs-playground.com/#YIU90M#120

1 Like

Ah, ok. (I forgot that you could choose what meshes to load)
I see your issue.
image
I can see the shadows through the car. I don’t want to ping random people, but I wonder if @Vinc3r could help with this.

1 Like

ah cool, so it could be something to do with the shadows.

It only seems to happen at the front and the back of the car so it could be something to do with how I’ve built the model.

How are your normals?

There might be a few weird things going on, the back of the car is probably better than the front. A while ago I may have accidentally removed some edges and not sure how to put them back, these might be leaving gaps.

Is the 3ds Max? or Maya? I primarily use blender but what if you simplified the geometry to have no gaps?

1 Like

make sure your normals are all pointing the right way.

If you wanna swing me the 3d model Ill check it really quick this morning.

2 Likes

Blender, I think you’re right, I did try to before but got in a mess after separating the parts into layers

1 Like

I’ve sent you a message, thanks @Pryme8

1 Like

force your depth pass!
blueMat.forceDepthWrite = true;

https://www.babylonjs-playground.com/#YIU90M#121

2 Likes

Wow you star!!! Really appreciated

1 Like