Hello,
I have a .glb file which containt 3 doulble light, but need 18 draws to render.
How I can do with this file to reduce draw when render with Blender or GltfTransform?
Ray 2.glb (4.1 MB)
Thank you
Hello,
I have a .glb file which containt 3 doulble light, but need 18 draws to render.
How I can do with this file to reduce draw when render with Blender or GltfTransform?
Ray 2.glb (4.1 MB)
Try reducing the amount of materials and their duplicates in Blender.
After instacing into blender must be 2-3 draw calls. And if merge triangles into one gepmetry and merge textures into one then maybe 1 draw call
If you open the model in https://gltf.report/ and then run the sample in the script tab, youâll get it down to 1 draw call. This merges the (identical) lighting fixtures, which you might prefer to skip if youâll be placing them throughout the scene. The script is comparable to running gltf-transform optimize in.glb out.glb
and works by generating a small palette texture for all of the unique material colors:
Hi Don,
Thank you. I tried and be very impresived.
Can I join all mesh but keep userdata on them ?
You can have one mesh for rendering, multiple meshes or just nodes for data/raycasting etc
Maybe, but it will make everything else more complicated, youâd need to pack identifiers into vertex data. Until you are well over 100+ draw calls and sure itâs causing performance issues, I would not worry about that type of optimization yet.
Yes,
My problem is I have to solve with 700 .glb files in to scene without lost interact with objects. I tried to load gltf norrmally, It raised to 8000 callsâŚ
Server side: used blender and gltf transform to optimized them.
Client side: Load them and merged some file gltf less important. But âimpotant fileâ still to much.
So I turn back to server to find the better way to solve
Raycast to not added to scene default not merged meshes with userdata. Added to scene will be only merged.
Like Iâm understanding. I have merged mesh and original meshs.
Merged mesh will be rendered to scene, original meshs add to scene but not render.
When click, raycast check data on original mesh. Right ?
About highlight object, will I render object from original mesh by glb scene node?
But if I want hide object, I need create custom atributes for vertexs.
This sounds about right, yes. Iâd have a look at BatchedMesh as well. It takes some work to set up correctly, but would allow you to show/hide individual objects while still drawing them in batches.
I added ID for meshes of each object like this.
So, I think I can merge them all to one mesh with same ID condition, that will reduce draw call.
How can I do this ?
Ray 3.zip (7.7 MB)
Hi everybody,
Finally I had some results from your advices.
To handle interaction with object and reduce draw call. I devide glb file by nodes. Then use Join to reduce draw call.
Now I have to solve logic about view with instancedmesh. But seem looks like it has a solution.
Thank you everybody