Exporting points as .XYZ

Hi,
We’re trying to import scans into a point cloud editing software, but the xyz files are not interpreted properly. We’re able to open .txt files (from Photoscan) but not .xyz files. Perhaps it’s the way the data is stored?
Thanks,

Jules

Hi julesmalcomson
Depends on what all are you exporting ( + normals ? ) The XYZ format is quite simple if you look inside…
If the app doesn’t import it, it can be because the normal’s included or due to an external application IMPORTER settings.
What application are you using ??

Hi Milos,

I disabled export normals, but enabled coloured points. The file is too big to open in notepad so I can’t look at the txt file that way.
Here is an exmaple of the result I get when I try to import in to point tools:
The importer dialog box in point tools shows the same contents as a text file from photoscan but the results are like in the image above.
Thanks

Jules

Hi julesmalcomson

What application are you using ??

Point tools.
Its just confusing because files from Photoscan work without any problems, although the txt file content seems to have the same layout.

Try to use Textpad https://www.textpad.com/ to open it and post a copy of the first 20 lines or so here

Here’s how the file looks: -1.2636348053376505e+001 -2.4749339064101363e+000 7.0364952232111033e-001 148 141 128
-8.6752332093037836e+000 4.6277769424897102e+000 2.2676465530775403e-001 172 164 150
-8.6760308232863732e+000 4.6240228513768145e+000 2.3236430656366380e-001 166 157 144
-1.2682939061974285e+001 -7.9988283740593147e-001 2.2299281663833623e+000 192 182 161
-1.2693095110187830e+001 -1.7267980572364436e+000 9.0824167710696058e-001 107 96 81
-1.2663097741841201e+001 -1.6480214149690511e+000 9.4252043656349871e-001 117 108 95
-1.2160746180418474e+001 -1.4340708098253074e+000 8.4581287633071511e-001 93 84 71
-1.2467932352440464e+001 -1.4083147743728972e+000 7.8864698760901009e-001 140 130 110
-1.1969943041043777e+001 -1.2737783745173203e+000 8.6097859448429848e-001 83 77 67
-1.2340276638157173e+001 -2.2833315016532865e+000 7.5501232574986687e-001 101 91 77
-1.1939800308731325e+001 -1.3466515744992194e+000 8.5209172561029423e-001 83 77 68
-1.2716816513439317e+001 -1.8592862648992892e+000 7.2992976040553215e-001 145 135 120
-1.2688048515976938e+001 -1.7800886510874179e+000 7.4138998634860309e-001 129 118 100
-1.2689203645622268e+001 -1.7755772088961876e+000 7.4348238585951432e-001 130 118 98
-1.2679466662829498e+001 -1.7589375713825532e+000 7.4454547755918155e-001 122 111 90
-1.2670205371418577e+001 -1.7232244090832509e+000 7.5665063319608006e-001 129 120 105
-1.2670745903973927e+001 -1.7241772270880915e+000 7.5759811351380790e-001 133 124 110
-1.2672802736631011e+001 -1.7381980951552478e+000 7.5510045821586580e-001 121 112 95
-1.2685127832203609e+001 -1.7758178156771436e+000 7.3824747457184303e-001 127 116 96
-1.2713673886636784e+001 -1.8612252667278213e+000 7.2891237726889768e-001 141 130 114
-1.2704331757297787e+001 -1.8667455861969628e+000 7.5795716682128056e-001 125 114 97
-1.2695650381843878e+001 -1.7859817149317649e+000 7.8433432034262918e-001 118 109 93
-1.2694221079054252e+001 -1.7874003498170978e+000 7.7758815236622780e-001 118 109 93
-1.2702443194646628e+001 -1.8653499602586976e+000 7.6219357666990240e-001 123 113 95
-1.2702506746578232e+001 -1.8400406127294318e+000 7.9138171512709077e-001 115 104 87
-1.2706863408125290e+001 -1.8808377618314225e+000 7.9045335154044505e-001 117 105 86
-1.2716245710918365e+001 -1.8552848505244839e+000 7.2980375599381198e-001 145 134 119
-1.2697564995600693e+001 -1.8515429749851435e+000 7.7811643472976444e-001 115 104 86
-1.2691851750973717e+001 -1.7937273671587306e+000 7.6605439336585501e-001 124 114 98
-1.2697038026408245e+001 -1.8283728983294480e+000 7.6152333354646773e-001 126 117 101

Those numbers do look a little funny I wouldn’t expect to see e+000 in a point cloud. Have you scaled your object correctly, What units are you working in.

Yes, I assume the scale was wrong as I did not set a scale for this model.
I will look try re-exporting after setting scale.
Thanks

Jules

This is the format of my .xyz exported cloud.

-3.0876874923706055e-001 -6.1447496414184570e+000 2.8668460845947266e+000 7.2539761662483215e-002 -9.9576818943023682e-001 5.6424017995595932e-002 77 79 82
2.4159860610961914e-001 -6.1897153854370117e+000 2.9187984466552734e+000 -2.1142612397670746e-001 -8.3230924606323242e-001 5.1240628957748413e-001 107 110 109
1.0110301971435547e+000 -6.0789957046508789e+000 3.1838548183441162e+000 1.7502127448096871e-003 -2.6180258393287659e-001 9.6511983871459961e-001 125 122 114
-2.6641893386840820e+000 -5.7549057006835938e+000 2.9153008460998535e+000 1.0593303292989731e-001 -9.9323666095733643e-001 4.7528866678476334e-002 146 146 143
-1.1151599884033203e-001 -9.1418304443359375e+000 3.4350519180297852e+000 9.3948346376419067e-001 2.9228454828262329e-001 1.7871905863285065e-001 153 156 110
-1.0675282478332520e+000 -8.6564016342163086e+000 3.8918223381042480e+000 1.5197315812110901e-001 5.3236782550811768e-001 8.3275967836380005e-001 117 116 108
9.1909599304199219e-001 -5.8866872787475586e+000 4.9830322265625000e+000 8.9574597775936127e-002 -7.5978171825408936e-001 6.4397835731506348e-001 200 198 207

What are the other numbers besides xyz and rgb?

Hi Vlad Moldovan
the other numbers are NORMALS, you can try to DISABLE them and export without them, if it helps or not…

After re-exporting a model simplified to 20M polygons at scale x100 I am still getting the same error in point tools. I have disabled normals but have colorized points enabled.
Here are a few lines from the file:

-8.6763724307455630e+002 4.6239654928198206e+002 2.2724411669317305e+001 168 160 147
-1.2160746180418473e+003 -1.4340708098253074e+002 8.4581287633071511e+001 93 84 71
-1.2467932352440464e+003 -1.4083147743728972e+002 7.8864698760901007e+001 140 130 110
-1.2347698304449079e+003 -2.2816651223934414e+002 7.5500673707953240e+001 102 91 78
-1.2687976412700398e+003 -1.7797122489703412e+002 7.4111794631985902e+001 129 118 100
-1.2715216692733841e+003 -1.8669163952622156e+002 7.2947156199734934e+001 142 132 115
-1.2697114833066096e+003 -1.8558871805737098e+002 7.8025566350466576e+001 116 104 86
-1.2691770514790746e+003 -1.7926903220001904e+002 7.6221048471559612e+001 127 117 101
-1.2697636573415718e+003 -1.8290191053743214e+002 7.5505547509188006e+001 135 125 110
-1.2424692808058408e+003 -2.4293404276636323e+002 7.4453645090722276e+001 119 107 89
-1.2408179487446682e+003 -2.4654574842457535e+002 7.4106519108777121e+001 118 106 87
-1.2419295474752962e+003 -2.4240946536080585e+002 7.4607643900775685e+001 118 106 87
-1.2398542632810124e+003 -2.4716983190573885e+002 7.4341361111307336e+001 115 103 85
-1.2414069680439361e+003 -2.4198543690486360e+002 7.4525460255989088e+001 118 105 87
-1.2402225079303300e+003 -2.4289377588648762e+002 7.4693169080470497e+001 115 103 86
-1.2398752243382055e+003 -2.4552870867258605e+002 7.4612431457202618e+001 116 105 87
-1.2386039914701757e+003 -2.4379202640650561e+002 7.4716821176341327e+001 112 101 83
-1.2510863616823140e+003 -2.3903589207983771e+002 7.4200541855973682e+001 132 120 99
-1.1946611753024877e+003 -2.4521236294510089e+002 7.7037660155305772e+001 84 80 71
-1.1853826972717004e+003 -1.8639830253560987e+002 8.2049598476317868e+001 85 80 73
-1.2146692545977403e+003 -1.7876097749391917e+002 7.9133835274923300e+001 89 82 71
-1.2695708597396533e+003 -2.0867320009859966e+002 7.3690736944868988e+001 142 135 123
-1.2659288319926591e+003 -2.2625890755518228e+002 7.2755170866594199e+001 143 135 123
-1.2641888464542494e+003 -2.3977935827980161e+002 7.2235324924517471e+001 135 127 115
-1.2658534600367043e+003 -2.2788419911038105e+002 7.3462339541240055e+001 145 138 127
-1.2663788577360615e+003 -2.2621640050824183e+002 7.3799152802346327e+001 147 141 129
-1.2638933103033498e+003 -2.4272880888887798e+002 7.2452642147097635e+001 128 119 107
-1.2645905601474799e+003 -2.4377235791636380e+002 7.1289980968685640e+001 156 147 135
-1.2660306436225658e+003 -2.2284219988982343e+002 7.4245224059549386e+001 145 138 126
-1.2649250995541117e+003 -2.3884562711497139e+002 7.5059508737024942e+001 126 118 106
-1.2650531469594034e+003 -2.3371311660806811e+002 7.4971431862699234e+001 128 121 109

When I import the points into meshlab the point cloud appears either solid grey or black, depending on viewing angle, rather than coloured. Has anyone had this problem before? Maybe this might say something about the error?
Thanks

Jules

Just to clarify, the points render solid white when the lighting is turned off in the render settings.

Also, when using depth map shader, Z min render black and the Z max renders white. Almost like the model is inverted.

Anyone?

Hi Jules,

julesmalcomson wrote:

After re-exporting a model simplified to 20M polygons at scale x100 I am still getting the same error in point tools. I have disabled normals but have colorized points enabled.
Here are a few lines from the file:

Code:
-8.6763724307455630e+002 4.6239654928198206e+002 2.2724411669317305e+001 168 160 147
-1.2160746180418473e+003 -1.4340708098253074e+002 8.4581287633071511e+001 93 84 71
-1.2467932352440464e+003 -1.4083147743728972e+002 7.8864698760901007e+001 140 130 110
-1.2347698304449079e+003 -2.2816651223934414e+002 7.5500673707953240e+001 102 91 78
-1.2687976412700398e+003 -1.7797122489703412e+002 7.4111794631985902e+001 129 118 100
-1.2715216692733841e+003 -1.8669163952622156e+002 7.2947156199734934e+001 142 132 115
-1.2697114833066096e+003 -1.8558871805737098e+002 7.8025566350466576e+001 116 104 86
-1.2691770514790746e+003 -1.7926903220001904e+002 7.6221048471559612e+001 127 117 101
-1.2697636573415718e+003 -1.8290191053743214e+002 7.5505547509188006e+001 135 125 110
-1.2424692808058408e+003 -2.4293404276636323e+002 7.4453645090722276e+001 119 107 89
-1.2408179487446682e+003 -2.4654574842457535e+002 7.4106519108777121e+001 118 106 87
-1.2419295474752962e+003 -2.4240946536080585e+002 7.4607643900775685e+001 118 106 87
-1.2398542632810124e+003 -2.4716983190573885e+002 7.4341361111307336e+001 115 103 85
-1.2414069680439361e+003 -2.4198543690486360e+002 7.4525460255989088e+001 118 105 87
-1.2402225079303300e+003 -2.4289377588648762e+002 7.4693169080470497e+001 115 103 86
-1.2398752243382055e+003 -2.4552870867258605e+002 7.4612431457202618e+001 116 105 87
-1.2386039914701757e+003 -2.4379202640650561e+002 7.4716821176341327e+001 112 101 83
-1.2510863616823140e+003 -2.3903589207983771e+002 7.4200541855973682e+001 132 120 99
-1.1946611753024877e+003 -2.4521236294510089e+002 7.7037660155305772e+001 84 80 71
-1.1853826972717004e+003 -1.8639830253560987e+002 8.2049598476317868e+001 85 80 73
-1.2146692545977403e+003 -1.7876097749391917e+002 7.9133835274923300e+001 89 82 71
-1.2695708597396533e+003 -2.0867320009859966e+002 7.3690736944868988e+001 142 135 123
-1.2659288319926591e+003 -2.2625890755518228e+002 7.2755170866594199e+001 143 135 123
-1.2641888464542494e+003 -2.3977935827980161e+002 7.2235324924517471e+001 135 127 115
-1.2658534600367043e+003 -2.2788419911038105e+002 7.3462339541240055e+001 145 138 127
-1.2663788577360615e+003 -2.2621640050824183e+002 7.3799152802346327e+001 147 141 129
-1.2638933103033498e+003 -2.4272880888887798e+002 7.2452642147097635e+001 128 119 107
-1.2645905601474799e+003 -2.4377235791636380e+002 7.1289980968685640e+001 156 147 135
-1.2660306436225658e+003 -2.2284219988982343e+002 7.4245224059549386e+001 145 138 126
-1.2649250995541117e+003 -2.3884562711497139e+002 7.5059508737024942e+001 126 118 106
-1.2650531469594034e+003 -2.3371311660806811e+002 7.4971431862699234e+001 128 121 109
When I import the points into meshlab the point cloud appears either solid grey or black, depending on viewing angle, rather than coloured. Has anyone had this problem before? Maybe this might say something about the error? Thanks

Jules

Your export seems correct just by looking at it.
But I succeeded importing this sample you pasted here to meshlab without any problem. And I even tried to replace every color with 0 255 0 and everything was green as expected.

There is nothing weird about your point cloud rendered in grey colors, because they actually are near grey colors. Lightly brownish grey colors :).

First thing that came to my mind is that, you exported not colored/textured mesh. Are you sure that you selected correct model in 1Ds view?