Hi all, I’ve seen some of the .incremental instructions using the .net framework and having absolutely no experience in command prompt I’m completely stuck. I’ve got a large model and want to see how this would improve the loading.
Is there a very (very) dumbed down step by step guide someone can point me to please. Things like build the project won’t mean anything to me
Hello! What do you mean by incremental instructions? Do you want to create a Babylon application step by step?
Hi, Turning a Babylon file into an incremental Babylon file
This is the GitHub guide that I couldn’t figure out how to get working.
These are the current instructions. If anyone can help break them down a bit more for me that would be super helpful:
Make Incremental scene tool
This tools assists in the creation of
.incremental.babylon scenes that can be loaded dinamically as the camera navigates through your scene.
If you want the compiled versions for you platform look
This project runs on
dotnet core 3.1 . It can be installed from https://dot.net
$ MakeIncremental /i:“SOURCE_FILE” /o:“SOURCE_DEST” [/textures]
Building from source
Make sure you have
dotnet core installed and then just:
$ dotnet build
Building and packing “/Dist”
Make sure you have
dotnet core installed and then:
$ make build
A few more details here Incremental Loading System | Babylon.js Documentation. Not sure how much more they help.
Hi John, thanks for adding. This is where I got the instructions from after clicking the link in that page.
I hadn’t used the plugin before but took a try and got it working. What you will want to do is
- Get the Exporters project from Github (you can download the zip, use Github Desktop, whatever you prefer):
Download and install dotnet core 3.1: Download .NET Core 3.1 (Linux, macOS, and Windows) (microsoft.com)
Open a command line (I used cmd.exe) and navigate to the MakeIncremental directory:
dotnet build on the command prompt:
You see that it wrote something on the subdirectory
\bin\Debug\netcoreapp3.1\, so we go there now:
MakeIncremental.exe with the provided arguments:
It’s going to spit up a TON of files, you copy them ALL and put whereever you’re loading your models from (in my case, I was doing local development, so I moved them to my localDev/src/ folder:
Then just load the .babylon.incremental file:
Hope this answers your question
Thank you so much! I’m out later but I’ll be trying this as soon as I can. I still can’t believe how helpful everyone is in the forum.
@carolhmj this is definitely Documentation material
I’ve got to the run stage bit I get the following error. Am I doing anything wrong? I’ve put the file in the bin folder.
D:\courses\Exporters-master\Exporters-master\Tools\MakeIncremental\bin\Debug\netcoreapp3.1>MakeIncremental.exe /i:scene.babylon /o:out
Fatal error encountered:
Cannot perform runtime binding on a null reference
I managed to run a very very basic babylon model through the tool so I’m guessing the issue is with my file. I’m not sure what part of the file the issue could be though.
slight update from further playing. Exporting my model as a .babylon file from blender doesn’t work. I get that error. But if I export a glb. run it through the sandbox and then export the .babylon file through there, it works. Very strange. I figure blender must be exporting some issues into the file so I’ll see if there’s some settings I can change when exporting. I need it exporting through Blender as it merges meshes which solves a massive problem I have in babylonjs.
Definitely weird, can you share your model?
Sorry that would be easier but there’s a lot of material that is not owned by me on there so I wouldn’t have permission too.
I’ll see if there is something I can share to you though, maybe a condensed version by direct message.
If you can get a condensed version that reproduces the bug it would be even better! easier to debug
after quite a bit of testing I’ve figured out it’s nothing to do with my model but it must be to do with how it exports from Blender. I created a new file, just the basic box that it starts with and tried to export that and I still get the same message. Have you tried to export a babylon file from blender and are you getting the same issue?
If you have got it working, what blender version are you on and what babylonjs exporter have you got?
I tried it and got the same exception. Debugging the actual MakeIncremental code, it seems to be failing because it expects the exported mesh to have the checkCollisions property, which the Blender exporter probably isn’t setting:
Since that’s not a required property anyway, I added a null check for that and some more null checking so that it works for Blender exported files. The PR is here: Add some null checks to make it work with Blender-exported meshes and… by carolhmj · Pull Request #1039 · BabylonJS/Exporters (github.com)