maximeraafat / BlenderNeRF

Easy NeRF synthetic dataset creation within Blender
MIT License
810 stars 50 forks source link

When i try to get GS splat .ply file, "blendernerf_vertex_colors_tmp" not found' #42

Open SamChonCLO opened 5 days ago

SamChonCLO commented 5 days ago

Hi I had tried to get nerf type rendered dataset and also. .ply (splats) file

blender version : 4.3.0 4.2.3 both one scripts : latest

`

Python: Traceback (most recent call last): File "C:\Users\ML-SERVER\AppData\Roaming\Blender Foundation\Blender\4.3\extensions\user_default\BlenderNeRF\sof_operator.py", line 36, in execute if scene.splats: self.save_splats_ply(scene, output_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ML-SERVER\AppData\Roaming\Blender Foundation\Blender\4.3\extensions\user_default\BlenderNeRF\blender_nerf_operator.py", line 148, in save_splats_ply obj.data.vertex_colors.remove(obj.data.vertex_colors[TMP_VERTEX_COLORS])


KeyError: 'bpy_prop_collection[key]: key "blendernerf_vertex_colors_tmp" not found'

what is a 'blendernerf_vertex_colors_tmp' and how can i get this map?
maximeraafat commented 4 days ago

Hi @SamChonCLO, thanks for bringing up this issue.

The blendernerf_vertex_colors_tmp is a temporary vertex colours object created for each mesh when no vertex colours are available. After saving the points3d.ply file, this temporary object is deleted. However, the current implementation does not check if the blendernerf_vertex_colors_tmp object exists before attempting to delete it. This can cause issues if vertex colours already exist for a mesh, as the temporary object won't be created. Could you please confirm that one of your objects already has vertex colours?

I will fix this issue soon!