Comments (4)
We have a solution for this, I'll describe below.
This happens when NodeJS cannot allocate all the necessary memory it needs to convert large files. NodeJS always has a hard 1GB limit on how much memory it can allocate for text strings in memory. When we try to process large glTF and JSON files, users often encounter the error you've shown.
In xeokit-sdk 2.4.0 we can now avoid this error by using the model splitting feature described in this tutorial.
For splitting, we extended ifc2gltfcxconverter and convert2xkt, to automatically split models into parts, and we also extended xeokit-sdk and xeokit-bim-viewer to seamlessly load split models. Note that ifc2gltfcxconverter is our closed source tool provided by Creoox with a commercial license.
As a result, we are now able to convert and load models like this 2GB Baku stadium IFC, so it seems to solve this problem pretty nicely:
from xeokit-convert.
Thanks for your reply. We will follow this when want to create split model out of IFC dataset.
Currently we have a JSON (not IFC) with graphical + metadata information. You will find XktCreator.js in XktCreator.zip attached earlier. In that file, createModel() is constructing XKTModel from input json file.
So we want to know how can we create multiple xkts here. Is it by creating multiple XKTModels? If yes, then what should be the condition to split the model into different xkts?
from xeokit-convert.
Unfortunately we can't help with the development of user's application code outside of a commercial support agreement, but hopefully this helps:
- Splitting has been only tested and documented by us for IFC files processed via
ifc2gltfcxconverter
- You could however still use the classes in
xeokit-convert
to build multipleXKTModels
and serialize each of those to a separate XKT file, and generate a manifest file that lists those XKT files, so they can be loaded as a set into a xeokit viewer. We don't demonstrate that anywhere, but the classes are certainly usable like that. - Splitting criteria - you could use the same criteria as
ifc2gltfcxconverter
, which is basically to output objects into a glTF until the glTF hits some specified size, eg 10MB, then save that glTF, start the next glTF, when that's got 10MB objects, save that, and so on.
from xeokit-convert.
Thanks for you reply. This will help us in splitting large models.
from xeokit-convert.
Related Issues (20)
- Option to disable ZIPping in XKT
- [FIX] Fix conversion of JSON glTF with embedded textures
- bug in newest beta: configs.sourceConfigs ||= {}; HOT 5
- Issue with IFC to XKT Conversion Resulting in Reduced Model Sizes
- [FEATURE] Add externalMetadata option for glTF and GLB
- Cannot create a string longer than 0x1fffffe8 characters HOT 3
- IFC ==> XKT - IFCBOOLEAN
- [ERROR]: [parseGLTFIntoXKTModel] RangeError: Invalid typed array length HOT 5
- Deprecate glTF conversion in favor of .glb
- Unsupported value for params.primitiveType HOT 2
- [parseGLTFIntoXKTModel] RangeError: Invalid array length HOT 13
- Can I decode the xktArrayBuffer by calling toString() ? HOT 2
- problem on npm i weokit/report HOT 6
- can not run nodejs from latest release
- Provide hint in logged error for [ERROR]: [parseGLTFIntoXKTModel] RangeError: Invalid typed array length: 11340
- [FEATURE SUGGESTION] Add TypeScript HOT 1
- [FIX] Make convert2xkt configs argument optional HOT 5
- Cannot read properties of undefined (reading 'IfcAPI')
- Update web-ifc version
- commande line convert on ubuntu don't exclude (from ifc to xkt)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xeokit-convert.