You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@chasergit BatchedMesh supports instancing already, without InstancedBufferGeometry, could you describe why it would be helpful for you to use BatchedMesh in combination with InstancedBufferGeometry? What is it you are looking for that BatchedMesh alone, or InstancedBufferGeometry alone, cannot do?
Excuse my english. I will try to explain. For example i have got 9 meshes created with Three.MeshInstance. Each mesh is 100.000 instances. Total is 900.000 instances.
Case 1: When we will be using BatchedMesh then instances will be converted to 1 buffergeometry and 900.000 instances. And for frustum will be runs 900.000 times every frame and take about 100ms.
Case 2: We converted 9 meshes to indexed buffergeometry and then apply BatchedMesh. Frustum will be runs 9 times every frame, but 900.000 indexed BufferGeometry will slower then 9 instancedBufferGeometry am i right?
Case 3: If its possible. 9 meshes created with instancedBuffergeometry with 100.000 inctances (and custom shader).
We apply BatchedMesh and got 9 geometries in BatchedMesh.InstancedBufferGeometry instead BatchedMesh.BufferGeometry. Frustum will be runs 9 times every frame and take about 1ms but we will be have 900.000 instancedBufferGeometry instead 9 frustum with 900.000 indexedBufferGeometry and less memory of course. If its possible too realise.
I wrote script which merging 9 instancedBufferGeometry to 1 and i have got 1 draw call with 900.000 inctances, but i want to achive 1 draw with BatchedMesh and frustum and maybe without raycasting etc.
Totally BatchedMesh.InstancedBufferGeometry will be have 9 geometryes info into BatchedMesh.geometry.attributes.positions and 900.000 offsets into BatchedMesh.geometry.attributes.offsets. Offsets attributes i use into customShader to offset position to display instance.
Maybe its immposible because of drawrange. I dont know.
Description
BatchedMesh.InstancedBufferGeometry instead BatchedMesh.BufferGeometry possible ?
Solution
Change buffergeometry to InstancedBufferGeometry and recompute draw range after frustum culling
Alternatives
Maybe without raycasting. Its need for grass rendering with big amount
Additional context
No response
The text was updated successfully, but these errors were encountered: