Open lms7127 opened 8 months ago
value=(value+1)*128
Thank you for your reply : ) But under -1 (like, "-1.23") value can be minus. How can i control that value??
Parameters f_dc_0
, f_dc_1
, f_dc_2
contain your R, G and B colors, You need to convert them into regular format with something like
R = 0.5 + C0 * f_dc_0
where C0
is the zeroth-order spherical harmonic coefficient. After that, you will obtain colors in the [0, 1] range and it is straightforward to map them to [0, 255] integers.
The rest of the spherical harmonics don't really make much sense without viewing directions (the rasterizer handles that for you OR you have to do raycasting and compute the view-dependent color by yourself), so I would go just with the base RGB color.
Thank you for your response!! I applied this method just now(0.5 + C0 * f_dc_0, I think C0 is 0.28209479177387814). Some of the values are under 0, but most values are pretty good:)
@lms7127 @antonzub99 can you please tell how we can compute the final view-dependent color and not just base RGB?
f_dc_0(is red), f_dc_1(is green), f_dc_2(is blue) convert f_dc_0, 1, 2 to 0~255 using (0.5 + C0 * f_dc_0, I think C0 is 0.28209479177387814) maybe this is final view color
How is this? i'm reading negative values of the splats like f_dc_0 = -2.2223 from polycam
applying the formula: 0.5 + 0.28209479177387814 * -2.2223 = -0.126899255759089390522
this makes no sense to me.
I notice that there are some parameters in the .ply file called 'f_rest_nums', do you know what these parameters do?
PlyProperty('f_rest_1', 'float'), PlyProperty('f_rest_2', 'float'), PlyProperty('f_rest_3', 'float')
Is this formula applied on the ply output after training
I want to convert vertex color using the result " .ply" file.
In " .ply" file, I checked "property float f_dc_0~1", "property float f_rest_0~44". But this values are -1.~ to 1.~. I want to convert this value to nomal rgb or hs value like 0~255.