Babylon 5.0.2 Mesh.MergeMeshes flips backface of GLB Models

This PG shows an imported GLB file that gets all meshes merged into one (used to work in v5.0.0-beta.2 - I don’t know since what version it broke).

PG of the bug → now with v5.0.2 release, all glb meshes render from the backface after merging meshes (see ERROR---------- comment part).

cc @Deltakosh

When was 5.0.0 beta2?
I’m also having a merged meshes issue (with clones) since about 3 weeks. I remember it happened after a nightly update on a friday (I think 3 weeks ago).
@RaananW is aware of it and said he would have a look into merged meshes next week. May be this can be added to it. May be it’s part of the same.

about two months ago

OK, well my problem occured as I said only about friday 3 weeks ago. Before that was working fine.
Edit: Apologies, time is running :wink:
From my files, the problem occured since February 26. If this can help track it.

Cc @bghgary

I’m actually having a look right now :slight_smile:

Ok fix is there:
fix mergemesh when using RH by deltakosh · Pull Request #12334 · BabylonJS/Babylon.js (github.com)

1 Like

Awesome, thanks for lightning fast fix ).

Does this fix solve your issue as well?

Sadly no, not just now. I believe I will have to check on it again.

1 Like

I run to this same problem when merging meshes after importing GLB-file. I’m using BabylonJS v5.1.0.

cc @syntheticmagus or @ryantrem as I think we may have a bug in how we use the transform here (in 5.1.0 the mesh is not where it should be)

Edit: It is not related to transform. The transform is actually correct. The material orientation seems off. I’m working on it

Ok I have a fix :slight_smile:
PR: Removed flip faces for MergeMeshes by deltakosh · Pull Request #12360 · BabylonJS/Babylon.js (github.com)

4 Likes

Ok sorry it will be fixed with next release :slight_smile:

This PG of the bug does not work and it is expected because you need to reset the overrideMaterialSideOrientation:
Blender Mesh Test | Babylon.js Playground (babylonjs.com)

mesh.overrideMaterialSideOrientation = null;

This is because that value works with the previous material but as you removed the material you do not need to override the side orientation anymore

I’m still having a problem with my merged clones in my project
https://media-geneva.ch/demos/bjs/motorcycle/motorcycle-cdn-preview.html

Are yours @Deltakosh @RaananW now done with the fix of merged meshes? Should I return investigating (what was working prior to release of v5) or should I still wait for a fix to come? Thx,

Once my pr will be merged you should be good

So let’s say you can retry on Tuesday?

1 Like

Got it. will do. Meanwhile, have a great WE.

1 Like

With latest version of BJS MergeMeshes seems to work now as expected - thanks @Deltakosh !!! :ok_hand:

2 Likes

Isn’t this going against backwards compatibility?
In 4.2 it only works without mesh.overrideMaterialSideOrientation = null;
but now in 5.2, it only works with mesh.overrideMaterialSideOrientation = null;

I checked using your PG.

Having upgraded Babylon three times, now I’m really afraid of it, because something always breaks.

Each time I wasted at least one to two days of unnecessary debugging. Then followed by several days waiting for the released fix to be on npm. Usually accompanied by dirty quick fixes while waiting (manually changing code in npm node_modules before bundling) in order to release to production.

I mean breaking changes between versions is normal, as long as they are clearly stated in Change logs, and without promising people that it’s backwards compatible.