Comments (11)
The reason you are experiencing performance issues is that you are not using the culler. As explained in the docs, the culler is needed to improve the performance of bigger scenes.
When I load the IFC without using the culler, it looks like in your video:
2024-07-01.10-49-40.mp4
I just used exactly the same code as in the IfcLoader tutorial, but changed the loading function to add the loaded fragments to the culler:
const cullers = components.get(OBC.Cullers);
const culler = cullers.create(world);
culler.threshold = 10;
async function loadIfc() {
const file = await fetch(
"../../../../../resources/parisa.ifc",
);
const data = await file.arrayBuffer();
const buffer = new Uint8Array(data);
const model = await fragmentIfcLoader.load(buffer);
model.name = "example";
world.scene.three.add(model);
for (const child of model.children) {
if (child instanceof THREE.InstancedMesh) {
culler.add(child);
}
}
culler.needsUpdate = true;
world.camera.controls.addEventListener("sleep", () => {
culler.needsUpdate = true;
});
}
This is the result:
2024-07-01.10-41-02.mp4
from components.
I don't know if that's possible, the library is not designed to do that. Nevertheless, I'll try to address this issue today, so maybe you want to wait until I check this out to see if you can use the latest version directly
from components.
The reason you are experiencing performance issues is that you are not using the culler. As explained in the docs, the culler is needed to improve the performance of bigger scenes.
When I load the IFC without using the culler, it looks like in your video:
2024-07-01.10-49-40.mp4
I just used exactly the same code as in the IfcLoader tutorial, but changed the loading function to add the loaded fragments to the culler:const cullers = components.get(OBC.Cullers); const culler = cullers.create(world); culler.threshold = 10; async function loadIfc() { const file = await fetch( "../../../../../resources/parisa.ifc", ); const data = await file.arrayBuffer(); const buffer = new Uint8Array(data); const model = await fragmentIfcLoader.load(buffer); model.name = "example"; world.scene.three.add(model); for (const child of model.children) { if (child instanceof THREE.InstancedMesh) { culler.add(child); } } culler.needsUpdate = true; world.camera.controls.addEventListener("sleep", () => { culler.needsUpdate = true; }); }This is the result:
2024-07-01.10-41-02.mp4
The reason you are experiencing performance issues is that you are not using the culler. As explained in the docs, the culler is needed to improve the performance of bigger scenes.
When I load the IFC without using the culler, it looks like in your video:
2024-07-01.10-49-40.mp4
I just used exactly the same code as in the IfcLoader tutorial, but changed the loading function to add the loaded fragments to the culler:const cullers = components.get(OBC.Cullers); const culler = cullers.create(world); culler.threshold = 10; async function loadIfc() { const file = await fetch( "../../../../../resources/parisa.ifc", ); const data = await file.arrayBuffer(); const buffer = new Uint8Array(data); const model = await fragmentIfcLoader.load(buffer); model.name = "example"; world.scene.three.add(model); for (const child of model.children) { if (child instanceof THREE.InstancedMesh) { culler.add(child); } } culler.needsUpdate = true; world.camera.controls.addEventListener("sleep", () => { culler.needsUpdate = true; }); }This is the result:
2024-07-01.10-41-02.mp4
Please check this model
https://solidcloud.parisashahbazi.com/orange.ifc
load parts with your code by culler takes a lot of time.
I need sth like in the first part of the video like: https://3dviewer.net/.
Is it possible to make it faster for good appearance by culling?
culler-s.mp4
from components.
@shahbaziparisa I can take a look to improve it. That said, keep in mind that we are a small team and we won't be able to take a look at it until the end of the week.
I understand your situation at work, but we are making this code for free and we can't go faster. Insisting more in all our networks (LinkedIn, That Open People, etc) won't make us go faster 😅 If you are really in a hurry, you can also look for a solution and contribute with a pull request. I'll get back to you when I have news!
For now, I'm reopening this issue.
from components.
@shahbaziparisa I can take a look to improve it. That said, keep in mind that we are a small team and we won't be able to take a look at it until the end of the week.
I understand your situation at work, but we are making this code for free and we can't go faster. Insisting more in all our networks (LinkedIn, That Open People, etc) won't make us go faster 😅 If you are really in a hurry, you can also look for a solution and contribute with a pull request. I'll get back to you when I have news!
For now, I'm reopening this issue.
Thanks a million.
Sorry for my questions
from components.
@shahbaziparisa I can take a look to improve it. That said, keep in mind that we are a small team and we won't be able to take a look at it until the end of the week.
I understand your situation at work, but we are making this code for free and we can't go faster. Insisting more in all our networks (LinkedIn, That Open People, etc) won't make us go faster 😅 If you are really in a hurry, you can also look for a solution and contribute with a pull request. I'll get back to you when I have news!
For now, I'm reopening this issue.
Hi
unfortunately after a month I could not solve performance problem for my client.When I use latest version I have to use tiles and culling When I use it all details did not appear .
If I have to use first version like openbim 1.3.2 tell me please for high performance.
my model is this :
https://drive.google.com/file/d/1CVEMAn-6sepB7K4VRkwM-pH1UrB38We0/view?usp=sharing
but with latest version 2.1.14 and using culler result is this:
tiles-s.mp4
what is different with this template?
https://thatopen.github.io/engine_web-ifc/demo/
from components.
Hi! As said above, we'll take a look at this asap. This is a free and open source project, so you are also free to address the issue yourself and propose a solution. Otherwise, we'll take a look when we can, hopefully soon.
from components.
Hi! As said above, we'll take a look at this asap. This is a free and open source project, so you are also free to address the issue yourself and propose a solution. Otherwise, we'll take a look when we can, hopefully soon.
Thanks.
So I have to use old versions for large files yes?
from components.
You can use whatever fits your needs. We'll fix performance in the modern version as soon as we can
from components.
You can use whatever fits your needs. We'll fix performance in the modern version as soon as we can
Can we use the latest version and the old version on the same project?
from components.
Hi @shahbaziparisa I've been checking out this IFC and the problem is that each brick is a different geometry. The result is that when I only load the walls, I get 86,000 meshes, which result in 86,000 draw calls.
Our library deduplicates geometry according to the IFC. This IFC doesn't have any deduplication, so we just represent what we find. The reason this IFC is visible in other viewers is because they merge the geometry in a single buffergeometry, which in this specific case is favourable.
This is not a problem of the culler, but a problem of the IFC itself. I think this problem has 2 possible solutions:
-
Create your own loader using our core library using a merging strategy rather than an instancing strategy like we do. This might be a lot of work, and most tools of our library (like highlighting) won't work with it, so I don't recommend you to do this.
-
Create a deduplication algorithm and apply it to the IFC to this IFC to optimize it before loading it in the viewer. This is something we might want to implement in the library ourselves, so we could maybe implement it and add it to the library, so you can just use it.
I think 2 is the best way to go. I'm closing this issue for now, feel free to create a new issue requesting a deduplication feature and we can take care. Cheers!
from components.
Related Issues (20)
- Loading several IFC files HOT 2
- Allow to define selectable/hoverable categories in the highlighter HOT 5
- 2D Plans problem HOT 8
- Issue using "@thatopen/components" when using watchify HOT 3
- ClipEdges is not working anymore HOT 2
- Config optional to unloadLostGeometries and toHide when using culler for IfcStreamer. HOT 4
- IfcStreamer load multiple json files
- Camera controls broken if the zoom distance is too high HOT 1
- Multiple Building Not in Center HOT 3
- Fragment loading fails with large IFC file HOT 5
- Consistency in process and language in the documentation
- Highlighter - Improving events
- Display IFCGRID in 3D view HOT 3
- Highlighter - AutoToggle is active during function highlighter.highlightByID HOT 2
- Each CullerRenderer creates a new WebGL context HOT 7
- Possible memory leak when disposing HOT 1
- some IFC mesh elements not being properly processed with ifcLoader HOT 10
- Static Errors class to throw and document all errors in the library
- Same model twice breaks the scene (with culler in place) HOT 2
- Investigate "Please ignore" messages in tree in umdasch 700MB model
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 components.