Comments (9)
Yeah, I think alteredq was going to take a look at improving the instancing.
GeometryUtils::merge
does the consolidation thing already.
from three.js.
Oh wicked. This makes what I was trying to do super-easy.
I don't want to step on alteredq's toes and don't even need instancing ATM so I'll leave that for now.
from three.js.
Yeah, I have VBO reuse on my TODO list.
from three.js.
fabricasapiens (via email) wanted to know why "the engine gets pretty choppy when I output 900 objects" and how to fix it...
GeometryUtils::merge will join the cubes into a single mesh (and therefor single VBO for giving to WebGL) which will reduce you draw calls from hundreds down to one (which is the reason for your low FPS).
Of course you lose some flexibility here (it's slower and more difficult to animate/manipulate individual cubes) but it's a necessary evil when facilitating "infinite" chunk-based worlds.
from three.js.
I'm getting confused. Where did fabricasapiens asked that? I don't see him in this conversation... ?
from three.js.
It was via email. I thought I'd post it here since it's relevant.
Using GeometryUtils::merge his FPS rose from <10 to the full 60.
~40FPS with 4000+ cubes.
~30FPS with 16000+ cubes.
~15FPS with 65000+ cubes.
alteredq - I'm not expert at the materials in three.js but do these cubes have two materials applied? One for the green and one for the lines? If so...does that mean they require two passes or draws?
At reasonably low numbers of cubes (<10000) it's the fillrate not the drawrate that's slowing down fabricasapiens's app.
from three.js.
So here is 'Fabricasapiens' himself ;-)
( Sorry if I'm asking noobish questions. I don't have experience with 3D engines, and try as best as I can to understand what is going on... )
What is the difference between drawrate and fillrate?
And why (technically) is one large object faster to render than a bunch individual objects? I understand that reading more objects takes more time, but the large object still has all the same vertices present, so what differnce is there in rendering...?
from three.js.
https://github.com/mrdoob/three.js/wiki/%22infinite%22-chunk-based-worlds
from three.js.
On TODO list. Closing...
from three.js.
Related Issues (20)
- [Bug] Invalid handling bufferSubData after grown source array size HOT 6
- webgpu rtt(clear bug)
- Semi-transparent textures are rendered differently with postprocessing HOT 3
- THREE.JS not working on Android 11 HOT 10
- THREE.JS not working on Android 14 Webview HOT 7
- Can materials support customizing their own toneMappingExposure strength and toneMapping type? Instead of forcing the use of global HOT 1
- THREE.Box3 compute has animation GLTF.It causes the model to be messed up HOT 7
- Adding a model using THREE InstancedMesh in mapboxgl, losing vertices after modifying and scaling HOT 3
- High gpu usage with WebGPURenderer returned with video textures HOT 7
- BatchedMesh: Provide approach for sharing geometry and transforms between BatchedMesh HOT 3
- setPositions on LineGeometry doesn't delete _maxInstanceCount, required when adding more points. HOT 2
- Crash in WebGPU: Error: no matching constructor for vec4 HOT 7
- WebGPU: BufferGeometry position attribute not updating in WebGPU renderer HOT 6
- Using WebGPURenderer, putting the loaded GLB model into the scene will result in an error "TypeError: Cannot read properties of undefined (reading 'isInterleavedBufferAttribute') HOT 9
- Object3D: getObjectsByProperty improvement HOT 1
- Imposter.js Not Found HOT 1
- 3DS Loader - possibly use MeshPhysicalMaterial HOT 2
- GLTFLoader Failed to loading Texture with mimeType (mimeType:"image/ktx2") HOT 1
- HTMLMesh throws error if radio element has height of width of 0. HOT 2
- When using Box3.setFromObject() on GLTF containing animation, the cloned model does not display properly. HOT 5
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 three.js.