Feature request: add draw_range to Object
It is more of a question or feature request: as I see it is possible to share the same mesh between multiple objects (using the mesh handles) but there is no way to share the mesh and create objects referring different ranges of index/vertex buffer to draw.
My use case would be to render lods. The draw ranges define different level of lods for each mesh and based on some heuristics different ranges would required to be rendered. While I could create an objects for each LOD (referring the same mesh) and add/remove it from the scene, I could not find how to set/alter the default draw range and stop rendering the whole index(vertex) data.
Thanks.
edit: some typo fix
In your case it sounds like you would have multiple meshes (one per LOD), then create and remove objects based on the current LOD status. Definitely want this to be improved at some poitn.
The issue is that, the vertex buffer is shared, only the index buffer differs. I could split the indices into multiple meshes but the vertex buffer have to be also duplicated in this solution and as I see buffers cannot be shared between multiple meshes.
That's very Unreal Engine. The camera already has a draw range, of course. Do objects need one? UE has that. It's probably useful when you want small objects to drop out and don't have some system that's swapping mesh LOD models as the camera moves. Won't save any GPU memory, though.
My own experience is that Rend3/WGPU is now fast enough on the better GPUs that I run out of GPU memory before I run out of GPU compute. Going to need more access to the GPU memory situation over the next few months.
That's very Unreal Engine. The camera already has a draw range, of course. Do objects need one?
I don't think if it should be part of the (low level) render framework. It is very application dependent how you want to toggle mesh visibility. For now I'd like to use if for LOD but I could imagine other scenario, where parts of the meshes are turned on/off for some independent application logic.
I have a pre-baked huge soup of geometry data generated from multiple meshes/material etc. constructed by an artiste. The original meaning is lost and application logic can select the index ranges to render based on multiple condition. One of them is the LOD. I really like this concept as assets can be uploaded/manged in a huge chunk/package and all the "hard" part, batching, material unification (like texture atlas generation), adding/removing attributes to the vertices is a task for an offline tool that can take any time (from minutes to even month if one wants to make it so irrational :) ).
Closing, no change for years..