View Full Version : Importing a list of points intro modeller?

12-29-2003, 01:39 PM
OK, I have a list of points in a txt file, (actualy a .CSV preadsheet, but that's easy enough to manipulate). X, Y, Z coordinates, but can be transformed if that helps...

What I want to do is get these points into modeller. so I can use them to make an oject in Lightwave.

Is there a faierly straightfoprward way of doing this?

I think it's a one-off task...


:confused: :confused: :confused:

12-30-2003, 03:58 AM
Could probably be solved by writing an lscript to parse through the file. If it'll acctually be able to connect the dots aswell to form a surface depends on how the data is arranged I guess. How about giving us a peek at the file?

12-30-2003, 08:14 AM
It's actuallty not in a form ready to use yet.

Perhaps I can be a bit more specific though.

It is actually data from a star catalog, with the positions of the brightest stars. A while back I did something using the old 'lightswarm', to basicly make a realistic night sky using several thousand small lens flares!

It looked quite good, and rendered fas, but now I want to try it again with better data.

So what I have is a text list of several thousand x, y and z positions, that form a rough unit sphere, as a text file.

I don't want to make polys, just get the points into modeller.

Any ideas?

Perhaps one of the formats LW can import is nice and simple?


12-30-2003, 09:08 AM
i would highly recommend what evenflcw suggested. writing an lscript for this is almost a no-brainer.. wont probably take 20 lines of code i reckon.

i'm sure evenflcw will gladly help you out with that. :p :D

12-30-2003, 10:25 AM
Sure I could... I think ;)

Or you could take a look at the OBJ format. It's pure text and pretty straight forward. Just export one out of LW and have a look at in Notepad. I think you should be able to mimic that structure quite easily.

12-30-2003, 11:03 AM
Thanks for the suggestions - I have never looked at an lscript, but the OBJ idea sounds good.

I found a definition on the web at:


And if it's as easy as it looks, that should solve my problem nicely.
Thanks for the ideas guys!


12-30-2003, 11:05 AM
Found a more detailed description at:


12-31-2003, 02:02 PM
OK, thanks for all the suggestions. As a result of which I took a look at Lsripts for the first time, and absolutely correct, this really was VERY easy!

So, just in case anyone would find it useful, here's the script that works:

// Command Sequence mode.
editbegin(); // Mesh Data Edit mode.
addpoint (-0.187480864,0.939227629,-0.287580227);
addpoint (-0.063221726,0.602741245,-0.79542819);
addpoint (-0.783738043,-0.527009846,0.328656816);
addpoint (-0.373746681,-0.312727015,-0.873221182);
addpoint (0.125089271,-0.769422004,0.626372456);
addpoint (0.195052093,0.970362607,-0.14265725);
addpoint (-0.418137256,0.903803119,0.091110693);
addpoint (0.492725098,0.223801789,-0.840913037);
addpoint (0.008692556,0.07028798,0.997488867);
editend(); // Command Sequence mode

I've only included a few points, as I doubt you need all 9000 to get the idea!


No I will produce a better 'stars' object, stay tuned and I'll make it available for everyone when done...


01-02-2004, 06:06 AM
As promised, the improved stars object has been made available for download.


for the links to the file, and the texturing it thread.