uhlik / bpy

blender python scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conversion with vertex colors does not work

egemenertugrul opened this issue · comments

I have two PLY files, imported with positions and colors, without normals.

However, whichever type I convert to, the instantiated objects are assigned to white color.

Point clouds:
image

One side converted to Cubes:
image

Although, I can see the color values passed in this function:

def make_colors(self):

The render is also blank. Also, is there a way I can render the point cloud without conversion, just as the point clouds are seen on the viewport?

Same behavior persists on Blender versions 2.83 and 3.1.

commented

hi,
by default blender does not show mesh vertex colors in viewport. i am sure they are created and assigned during conversion and will render if used in material. to show vertex colors you have to enable that in viewport shading options first..

to render with blender e.g. cycles points have to be converted to something blender understands and can render, in this old obsolete pcv version only mesh type is available to do that.
to render points directly using opengl (i.e. instead on screen render to image) use pcv render panel and blender 2.81, earlier or later version may or may not work. there were some blender api changes that broke that. also this old pcv version can render only single point cloud on transparent background. multiple clouds and full viewport rendering is supported only in later versions.