I have a
BufferGeometry with X vertices indexed by Y triangles.
renderer.info shows Y triangles and Y / 3 vertices. Is this true, is everything just simply rendered with triangle soups?
I have a
No, indexed geometries are rendered via
vertices property of
renderer.info shows in this case the amount of processed indices.
Isn’t it redundant? If it logs A and B and B = A/3, there may be no need to log it?
What am i missing, how is this number relevant?
Um, the problem is that
renderer.info.vertices should always reflect the vertex count of a geometry. But in the case of an indexed geometry, it’s the amount of processed indices. So yeah, right now the information in
renderer.info are somewhat redundant.
IMO, there are two options to make things more consistent:
- Ensure, indexed geometries write their vertex count to
I vote for B. And noting it somewhere. I stumbled upon this and gave up half way after a few “no it doesnt work” “yes it does”
I’ve actually changed my mind, maybe for now removing vertices might make more sense. It doesn’t look trivial to add the actual vertex count, while this number is misleading.
Yeah, i’ve looked into the code too and we need a considerable amount of refactoring to implement a “non-hacky” solution
Well, aparently it’s even more complicated, and the whole discussion melted my mind. I think im going to log the counts that im interested in, manually, and pretend that
renderer.info never existed
Just for the sake of completeness: The structure of
renderer.info.render has changed with the following PRs:
three.js reports now the amount of rendered primitives:
vertices has been removed.