Hello, I have an issue trying to use a model from the Unity Asset Store: Sci-Fi Styled Modular Pack. I donāt know how to fix it. Basically, Iām trying to use this asset, and it looks fine when Iām using it in Unity, but in the browser, it looks bad with some white dots. Iām also getting two warnings in the console:
Warning 1:
vconsole.min.js:10 Your MeshCollider āwindow_big_complete_(3)ā is scaled (2.0000001007665515, 2, 1.0000000503940163). This is not optimal for performance since it isnāt supported by the Rapier physics engine yet. Consider applying the scale to the collider mesh.
Warning 2:
vconsole.min.js:10 MeshCollider mesh is a group āwindow_big_complete_(4)ā, adding all children as colliders. This is currently not fully supported (colliders cannot be removed from the world again). MeshCollider {__context: _Context, __name: āMeshColliderā, gameObject: Object3D, guid: ād8e2534e-896e-521d-9850-74b0ed2c19b1ā, sourceId: āassets/sampleScene.glbā, ā¦}
I really donāt know how to fix it. Apologies in advance, Iām new to this. Can anyone help me?
Original Post on Discord
by user 691445074055397447
Hi, the warnings are due to the physics engine (rapier) not being able to apply scaling to mesh colliders automatically right now - to still make it work we do copy the mesh in those cases, scale it and then give it to rapier for creating the collider shapes. Depending on the complexity of the colliders (and the amount) it can hurt performance. It depends on your scene really.
Regarding the dots: Which material are used on those meshes in Unity? Are they transparent by any chance? And did you use any other rendering feature here (like lightmapping) ?
They use different materials like this, but the majority, if not all, have a white material, which is this one
by user 691445074055397447
Another question, and if itās not too complicated, how could I do this āto still make it work we do copy the mesh in those cases, scale it and then give it to rapier for creating the collider shapes.ā?
by user 691445074055397447
To avoid this youād have to have all Gameobjects set to scale 1,1,1 in Unity. That would remove the need to scale mesh colliders. Otherwise you could replace the colliders with Box colliders if possible. But it might not be a big problem (your scene looks not very high poly) since it only happens once per mesh
Oh, okay, perfect, thank you! Do they all have to be at that scale, or can some have a slight difference in size
by user 691445074055397447
Donāt think you actually need to do anything - we make it work and just warn that the mesh is copied
Can you send us a bug report with that scene? Iāll need to look at the material and mesh settings to understand if we can improve the material export for that case.
That being said, values like normalScale=-0.1 may just lead to garbage results, I donāt think thatās well-defined in Unity either
Sure, no problem. How could I send the bug report? Through Discord or your website? Thank you very much for your help, truly appreciated
by user 691445074055397447
You can send a bugreport via Unity using our menu item āNeedle Engine/Report a Bug/Current sceneā
ok ok thank you !
by user 691445074055397447