Skip to content

BlenderNeRF v6

Latest
Compare
Choose a tag to compare
@maximeraafat maximeraafat released this 06 Aug 23:38
· 2 commits to main since this release
b13b39e

This release introduces two major updates:

  • Transition from the deprecated Blender add-ons to the new Blender extension format convention introduced in Blender 4.2,
  • Support for Gaussian Splatting dataset creation.

Although the bl_info dictionary in the __init__.py file is no longer necessary, I have retained it for extended compatibility.

Gaussian Splatting Dataset Creation Support

The Gaussian Splatting repository (referred to as 3DGS) natively supports the NeRF file format convention, but benefits from an additional point cloud initialisation. This release enables the optional creation of a points3d.ply file when the Gaussian Points (PLY file) option is selected.

The points3d.ply file is generated using Blender's built-in bpy.ops.wm.ply_export function, introduced in Blender 4.0. Therefore Blender 4.0 is the lowest supported version of this release. While previous versions of BlenderNeRF (compatible with Blender versions >= 3.0.0) remain available, using Blender 4.0 or later is recommended for this functionality.

The points3d.ply file contains vertices of all visible meshes at render time, serving as the initial points for 3DGS. Only mesh objects visible in the render will be included. Meshes hidden in render or within hidden collections will be excluded.

Known issues

  • The functionality may break in specific scenarios, such as scenes with rendered child objects but hidden parent objects (e.g., a particle system where the emitter is hidden). Despite potential mismatches, the ply file is merely a starting point for 3DGS and will be optimised further.
  • Modifiers are applied to meshes during vertex storage, affecting the ply file's total vertex count. If more or fewer points are desired for 3DGS initialisation, consider applying subdivision or decimate modifiers accordingly.

Additional notes

  • Vertex colours: if vertex colours are available, they will be included in the ply file. If not, vertex colours will default to zero, as their existence is required by 3DGS.
  • Export time: generating the ply file can be time-consuming, naturally depending on the scene’s vertex count.

When using NeRF datasets, 3DGS currently requires both transforms_train.json and transforms_test.json camera files. For users solely interested in creating a splat file, the new dummy option creates an empty transforms_test.json file, bypassing the need for a complete test dataset. This is a temporary measure until the 3DGS repository potentially supports optional NeRF test camera poses.

File path adjustments

When exporting with the Gaussian Points option, file extensions are removed from paths in the transforms.json files, as 3DGS automatically appends a PNG extension. This feature remains until the 3DGS repository offers an argument for specifying file extensions or automatically detects them.