PDA

View Full Version : file conversion for all you clever folks



biliousfrog
02-23-2009, 02:15 PM
I've got this file which is being a complete PITA to convert to anything usable. It's a .xyz file which simply contains values in X,Y,Z for each point. There's no poly's just points from an underwater survey, all I want to do is get the data into Lightwave.

I've tried Accutrans but all I get is the points stacked on top of each other in a column or randomly spread in a cube-like shape. I've also tried an application called RapidDXF which is supposed to be able to convert from .xyz to DXF but it's expecting each point to be numbered and they're not. I even tried manually editing the file in notepad to create an obj, which is also CSV, ASCII based, but no luck there either.

The attached file has the co-ordinates seperated with spaces, directly exported from Fledermaus. It's simple to convert the spaces to commas in notepad/wordpad, I can upload a version of that too if it will make a difference.

The file is of a sunken shipwreck, it won't be very obvious at first but it should be mildly recognisable as 'something' if it gets converted correctly.

I'll buy a beer for the first one to get this converted :beerchug:

flakester
02-23-2009, 03:28 PM
Dude, I tried importing and renaming as various file-types and also auto-detecting the format in Polytrans.... but no cigar, which means no beer either, and that's what I'm most peeved about! :p

I dare say you have the conversion tools yourself, but if you need me to try a different file type, I'll throw a few at Polytrans for you.

Hope you get it sorted.

--
flakester.

Kuzey
02-23-2009, 03:40 PM
I found this...seems like it might be helpful:

http://74.125.77.132/search?q=cache:r9sFYbwBmBQJ:www.itg.uiuc.edu/publications/techreports/02-006/02-006.pdf

Good luck :thumbsup:

Kuzey

Myagi
02-23-2009, 04:09 PM
I loaded the points, but they seem somwhat pointless *rimshot*

joking aside, when looking at the original data, the XY components differ so extremly little, when impoting them they'll just look like a single long line of points.

edit: ok, I scaled up Y like crazy and it starts to resemble something

Myagi
02-23-2009, 04:17 PM
translated to roughly origo, then X and Y scaled 5000000.0 %

MicroMouse
02-23-2009, 10:42 PM
AccuTrans can not create a mesh for the random point cloud in this XYZ file.

Use the "File -> Open As -> XYZ (No Mesh)" menu command in AccuTrans.

You get a tall column of points in the view window.

Use the "Tools -> Adjust Object" menu command and new tools appear in the "Tool Palette".

In the edit boxes labeled X, Y and Z enter

X = 1.0
Y = 1.0
Z = 0.00001

and click the "scale" button to scale on the Z axis only.

Rotate the point cloud around in the view window and the hull of the ship can be seen.

The revised point cloud was saved to the attached LWO file.

Wayne

biliousfrog
02-24-2009, 01:10 AM
wow, thanks so much guys, I'll have a look in a little while.

I don't need a mesh from it, the points are fine as they are for reference and possibly for some HV 'growth'....thanks again.

biliousfrog
02-24-2009, 01:43 AM
Excellent work :thumbsup:

Myagi, be sure to let me know when you're in town:beerchug:

and Micromouse, let me know your preferred payment method for Accutrans, I'll be sure to buy it. :)

Thanks again for all of your help.

evenflcw
02-24-2009, 02:13 AM
Were you using 9.x obj importer for LW?

Then you probably did the manual conversion correct (it's not that hard!). It's the new obj importer that is wacky, or rather it's default setting are - it won't load unattached points (ie only point, no polygons, it loads nothing)! To make it load the points you have to turn on the "OBJ ZBrush Mode" setting in the general options. ... Don't ask me why or when ZB started manipulating pointclouds, atleast NT seems to think it does or they couldn't be bothered to figure out a more appropriate name (likely this mode simply uses the old saver/loader)! I'd urge you to report this stupid behaviour but I fear NT doesn't care about 9.x anymore or repairing any recent mistakes made in that series.

A prime example where having the feature is not enough, it needs to be implemented properly aswell.

biliousfrog
02-24-2009, 03:37 AM
A prime example where having the feature is not enough, it needs to be implemented properly aswell.

But CORE will change all that :rolleyes:

I tried absolutely everything I could but couldn't figure out whether it was a problem with the exported object or the way I was trying to import it. I've not used .xyz before so modifying it to .obj seemed like it was worth a try. I didn't get as far as loading it into Lightwave, I couldn't open it in Polytrans or Accutrans so I figured LW wouldn't either.

Thanks for the tip on using obj's in Lightwave, I'll check the switch in general options now.

Myagi
02-24-2009, 09:27 AM
for the record, I exported a dummy collada file (object consisting only of a few points). Then just pasted the xyz data into the points section of the collada file, with the commas replaced by spaces. Then just updated the two relevant "count" tags, and voila :)

(the dummy file should not contain polys, or the importer will only export points referenced by polys)

MicroMouse
02-24-2009, 10:14 AM
No preferred method for payment.

To pay by credit card or PayPal use the 'online ordering' link on the
'pricing' page to IMService.

To pay by cheque or money order, follow the mailing instructions.

------------------------------

If you can find out what 'units of measurement' were used for the data
in the XYZ file, you can scale the wreck to the right size.

When scans are done it is not uncommon to find that one unit of
measurement was used for the X and Y coordinates and another used for
the Z or elevation coordinate. For example, meters are used for X and Y
and decimeters are used for Z to show small changes in elevation.

When scans are done on the surface of our planet, the X and Y
coordinates are usually referenced to a zero point on the planet. If
you are doing a scan of a smaller area like looking for the wreck, the X
and Y coordinates will be relative to some point on a map.

I assumed that the measurements, whether imperial or metric, just
differed by some power of 10 between the XY and Z coordinates.

I decided to scale Z down by using 1, 1, 0.1 for the scale factors until
the ship appeared. I could have scaled up by 10, 10, 1 and scaled the X
and Y coordinates up which is really the better choice so I don't have
to scale to get the original Z coordinates back.

Originally after loading wreck.xyz, I scaled using 1, 1, 0.00001.

Using cut and paste take the minimum X, Y and Z coordinates from the
edit boxes in the 'min-max' group of controls and enter them in the X, Y
and Z edit boxes. Make sure that you get the minus signs. Click the
'Set Cntr' button.

The wreck moves to a new location and the camera is looking at an empty
screen. Use the 'Camera -> Zoom Reset' menu command and the camera is
again looking at the wreck.

Scale by 100000, 100000, 100000 and the wreck is measured in its
original units of measurement. If the units are meters, the wreck is
the correct size to be saved to a LWO file which uses meters.

Due to the lack of information in the XYZ file, AccuTrans can't find the
wreck without your help.

Wayne

biliousfrog
02-24-2009, 11:11 AM
Thanks Wayne, payment is on it's way.

Thank you too Myagi, that's another neat solution which I'll bear in mind for future use.