Giter Site home page Giter Site logo

Comments (4)

xeolabs avatar xeolabs commented on July 24, 2024

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:

Screenshot from 2023-11-10 02-00-29

from xeokit-convert.

intrida-dev avatar intrida-dev commented on July 24, 2024

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.

xeolabs avatar xeolabs commented on July 24, 2024

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 multiple XKTModels 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.

intrida-dev avatar intrida-dev commented on July 24, 2024

Thanks for you reply. This will help us in splitting large models.

from xeokit-convert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.