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;
Thank you!!
Givo
October 22, 2019, 4:45pm
2
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
Givo
October 23, 2019, 1:10pm
4
HMM. I see just this.
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
Givo
October 23, 2019, 1:39pm
6
Ah, ok. (I forgot that you could choose what meshes to load)
I see your issue.
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.
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.
Givo
October 23, 2019, 2:11pm
10
Is the 3ds Max? or Maya? I primarily use blender but what if you simplified the geometry to have no gaps?
1 Like
Pryme8
October 23, 2019, 2:14pm
11
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
Pryme8
October 23, 2019, 2:53pm
14
force your depth pass!
blueMat.forceDepthWrite = true;
https://www.babylonjs-playground.com/#YIU90M#121
2 Likes
Wow you star!!! Really appreciated
1 Like