Vinc3r / Polycount

A Blender addon helping to know about your scene polycount.
https://www.nothing-is-3d.com/
Do What The F*ck You Want To Public License
65 stars 3 forks source link

ability to view the correct vertex count #2

Closed Vinc3r closed 4 years ago

Vinc3r commented 4 years ago

Verts algorithm have to be enhanced (for now, a smoothed shading cube get the same count (8) as a sharped one, which should give us a count of 24)

Vinc3r commented 4 years ago

https://docs.blender.org/api/2.80/bmesh.utils.html https://archive.blender.org/wiki/index.php/Dev:Source/Modeling/BMesh/Design/ https://developer.blender.org/diffusion/B/browse/master/source/blender/modifiers/intern/MOD_edgesplit.c

Vinc3r commented 4 years ago

maybe create a tmp object with edge split modifier ? looks like performances killer? check how glTF guys are doing

https://github.com/KhronosGroup/glTF-Blender-IO/blob/master/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py#L97

Vinc3r commented 4 years ago

thanks to Julien Duroure : https://github.com/KhronosGroup/glTF-Blender-IO/blob/master/addons/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py#L288

Vinc3r commented 4 years ago

starting to get somewhere : https://github.com/Vinc3r/Blender-Python-Snippets/blob/master/blender-2.8%2B/polycount-to-console-using-bmesh.py

Vinc3r commented 4 years ago

need some tests, but already better : https://github.com/Vinc3r/Polycount/commit/eb1dcbf4f25ed183c2dc13ff8803de63873d0f81

Vinc3r commented 4 years ago

brute force idea : made a copy of the object and force "convert to mesh"