Xenodream 2.3 with point cloud export

Hi, Tonttu
I tried the csv script but it gives an error on line1
In fact i'm trying to import point clouds in Lw to include Modeler in a workflow using Photosynth 3D scanning exporting points with color in Meshlab.
I tried the same process to export xenodream to meshlab (re-writting the header in Oo calc).
Do someone succed to export colours from xenodream (demo)?
 
Hi Tonttu
I explored the workflow between xenodream and lightwave:
With the pointcoud export:
to keep the color of the mesh i transformed the .csv to .ply
(with Oo calc)

you can export the cloud in PLY (ASCII)
that's a plain text file with x,y,z,r,g,b
with the header i sent to you
but the r,g,b are a part of 256 i presume
so i multiplyded per 255 your r,g,b columns and replaced "," by "space" in Oo calc
+ the header...

usualy in MeshLab, we only need a header to open a point cloud:
ply
format ascii 1.0
element vertex XXXX
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
end_header


(XXXX) is the number of vertices

Despite an error when i open the ply:
unespected eof
i have the colored point cloud in the free Meshlab

I began to reconstruct the meshes:
Filters/Remeshing../Marching Cubes (APSS)
then:
Filters/Sampling/Vertex Attribute Transfer
source Mesh : the imported ply
Target mesh : the mc_mesh (made by the Marching Cubes )

I also imported a .obj mesh from XenoDream, which has very good
quality, and mapping the vertex colors from the ply file.
This works better,
but still results in jagged coloring especialy on hedges.
It needs the obj file to be centered and scaled to fit before the vertex attribute transfer.

Well it's not perfect but i'm just a newbee in Meshlab
but the workflow is open!

The problem now is:
Lightwave can't recognize the obj texture!!!!!!!!


have you a solution?
thanks
 
Hi, Tonttu
I tried the csv script but it gives an error on line1
I'll have a look at the script this evening. It's been a while since I wrote it and I don't remember all the details., but error on line1 sounds unusual. What version of LW are you using?
I think the script expects XYZ values in first three columns of the csv. Is that how you have it? If not, maybe the script (or the data?) needs to be adjusted accordingly.
 
Now I understand after trying the export out myself:
-2.0306,-1.8323,1.2472,0.890,0.890,0.890
0.4515,-1.1020,1.1550,0.890,0.890,0.890
1.5832,1.0100,1.0697,0.890,0.890,0.890
0.9257,3.1294,0.9906,0.890,0.890,0.890

It gives rgb color data after xyz. Well, I think névada was referring to this.
 
I see. I looked at the script, line1 refers to line1 of the csv file, not the lscript code.
The culprit is this block of code:

if(sizeof(tokens) != 3)
{
error("XYZ data error on line ", line_count);
return;
}

It checks if there are exactly 3 values per line. It should be safe to remove it out as long as XYZ data are in the first 3 columns.

EDIT: I attached updated script. I have no way of testing it at this moment but it should work.

EDIT2: since we already have the data it may be interesting to import RGB as well, maybe using 1 point polygons?
 

Attachments

  • loadcsv_no check.zip
    439 bytes · Views: 249
Last edited:
I see. I looked at the script, line1 refers to line1 of the csv file, not the lscript code.
The culprit is this block of code:

if(sizeof(tokens) != 3)
{
error("XYZ data error on line ", line_count);
return;
}

It checks if there are exactly 3 values per line. It should be safe to remove it out as long as XYZ data are in the first 3 columns.

EDIT: I attached updated script. I have no way of testing it at this moment but it should work.

EDIT2: since we already have the data it may be interesting to import RGB as well, maybe using 1 point polygons?
Was there an update to do colours from csv files?

Cloud compare will export a txt file point cloud in this format:

CC-csv.JPG
 
Back
Top