aclysma / rendering-demo-scenes

Scripts to import data into blender for use with testing/benchmarking renderers
12 stars 1 forks source link

Achieving minimal size pbr-test #3

Open kvark opened 2 years ago

kvark commented 2 years ago

I think pbr test is valuable enough to include in-tree with code for engines that can support it, as an example asset. For this, it would be nice to have the gltf size to be the minimum. Currently it sits at 4460128 in my naive export into "glb" from blender, which is discouraging.

One thing I noticed is that each sphere ends up being a separate mesh in the result. Any way we can force them to re-use the mesh instead?

aclysma commented 2 years ago

Something like bpy.data.objects["Cube"].data = bpy.data.meshes["Cube.002"] can be used to point an object at a different mesh.

image

(The green triangles are meshes and the orange triangles are objects. Objects have a "data" attribute that can be a few different types.)

aclysma commented 2 years ago

(If this works, we could consider making the grid 11x11 instead of 6x6 so that we get 0.1 increments across roughness/metalness. This is how it was originally, but I reduced it specifically because of the excessive size.)