App breaking, help please - babylon 4.2

@roland @jelster and everybody,
I made it work! thank you very much for all your advices, I followed your advice, and basically I carefully reconstructed the dependencies one by one following your advice, and now for the first time the app is launching, of course I had to force all the versions to be the ones of the version that was working in the past, because If I try to use the updated new versions of the libraries then all hell breaks loose, but in this way it now works:

“dependencies”: {
@babylonjs/gui”: “4.2.0”,
@material-ui/core”: “4.11.2”,
@material-ui/icons”: “4.11.2”,
@testing-library/jest-dom”: “5.11.6”,
@testing-library/react”: “11.2.2”,
@testing-library/user-event”: “12.6.0”,
“babylonjs-loaders”: “^7.24.0”,
“react”: “17.0.1”,
“react-bootstrap”: “1.4.0”,
“react-dom”: “17.0.1”,
“react-loading”: “2.0.3”,
“react-redux”: “7.2.2”,
“react-scripts”: “4.0.1”,
“react-window”: “1.8.6”,
“redux”: “4.0.5”,
“redux-thunk”: “2.3.0”,
“web-vitals”: “0.2.4”
},
“devDependencies”: {
@babylonjs/core”: “4.2.0”,
@babylonjs/inspector”: “4.2.0”
}

I did have to include this one:
“babylonjs-loaders”: “^7.24.0”,
the only one without the @, as without it , it wouldn’t run, but it doesn’t seem to produce any problem.

It compiles with only 1 react related warning, that I think it’s not causing problems.

So now my final question. I have accepted that I won’t be able to rely on the Blender to Babylon exporter anymore and that’s ok. What I can do is: there is a menu in the app that loads 3d models exported with that add-on, that can become sort of the legacy menu and I can open a new menu that loads newer models, but the question is, is there any alternative to export from Blender 4.2 models to use them in Babylon today?
what is a possible pipeline forgetting about the old AddOn? I’m ok to try a new path and just create a new menu in the app for these new models, which I guess may look different. Is it documented anywhere? both the process of exporting from blender 4, and also of importing and loading those exports from babylon?
although mmm of course, now I realize about a problem, I cannot use the new babylon, I have to use the old babylon, so maybe it won’t be so easy mmm

thank you for any tips :slight_smile:

4 Likes

Glad you’ve gotten it to a better place!

Regarding Blender and exporting, you should favor GLB/GLTF or OBJ formats as those have good support for loading into BJS. One thing to note though are some specific options (outlined in the specific loader docs) like axis orientation and the like.

I recommend to always stick with glb. There is no full support for objs currently available in Babylonjs.

1 Like

Let me put this straight. Making imports/exports of various format (no matter what it is) puts you basically in the same position than BJS (with obj or 3ds). To which I would also add .glb. Yes, blender is currently the most used and widely supported but it is also native. There’s no guarantee that it will forever be supported in the very same way (although the most it is widely used, the lesser the risk that it will not have backwards compatibility). As for .obj, it’s a standard. A legacy standard for ‘exchange’. It might not be 100% supported in BJS (we just recently uncovered a number of gaps with the import of obj in BJS :grin:). But I would rather think that (within its own limitations) the obj format - as an exchange format - is kind of ‘safe to use’.
The point is, you will have to maintain all of this support for import/export (again, no matter the type of file). It’s a burdain and a committment. So the less you are using additional (addons, plugins, twist and tricks) the better. Doesn’t mean that from time to time you will not wake-up, start your app and next thing realize that you’re gonna have the worst day (or week) of your life :face_with_hand_over_mouth:

@mawa thank you very much :slight_smile:
to summarize, from blender I could just export either a glb (.glTF) or an .obj, I think you mean that glb (glTF) is more recent and more recommended,
and then load that from babylon and I should be ok right? :slight_smile:

yes, sort of. If you need to choose just one, indeed .gltf is the most recent and the best supported in BJS. I think today we can state that gltf tends to become the new standard for ‘exchange’. Hard to do anything today without supporting gltf. For example, MS flight simulator (that’s got a huge community of dev) uses gltf as the default.
If you were to add a second (legacy or exchange) format, I would choose .obj. It could be .fbx but the support for .fbx in BJS is, let’s just say, not the best :face_with_hand_over_mouth: And personally, I’m (historically) not a fan of this format :grin:

@mawa yeah Im going for .gltf all the way, and here hoping for .gltf to stay relevant until the year 3000 and change, go .gltf! and go BJS! you both please stay relevant until the year 3000 at the least :slight_smile:

3 Likes

FWIW, glTF, in the past couple years, became an ISO standard, so it’s not going away anytime soon.

Khronos glTF 2.0 released as an ISO/IEC International Standard

4 Likes

Maybe sometime in the future we will use only USD

pun intended :stuck_out_tongue:

3 Likes

I suppose we all know that this is just what I call ‘tech-washing’ :grin: There’s no real committment for that at this moment (especially not from companies like Apple or Autodesk). The only purpose is to serve ‘marketing’ and be able to use it as an argument for com.