|
|
"anne" <ann### [at] wjhharvardedu> wrote in
news:web.3ea700d92424fca482dec0910@news.povray.org:
This file does not seem to be an openGL "file"
(i.e. a program in C, Java or any other programming
language).
But it describes a shape by triangles, which also
can be done with both openGL and POV-Ray.
When programming with openGL, you can typically
make a triangle like this:
glBegin(GL_TRIANGLES);
glVertex3fv(0.181892, 4.40051, -0.133597);
glVertex3fv(0.73675, 4.53695, -0.908689);
glVertex3fv(-0.406486, 4.83995, -1.7559);
glEnd;
In POV-Ray script you can do it like this:
triangle {
<0.181892, 4.40051, -0.133597>,
<0.73675, 4.53695, -0.908689>,
<-0.406486, 4.83995, -1.7559>
}
You can also build meshes of triangles in a more
compact form in POV-Ray. Here's an example that
should be very close to the one in your file:
mesh2 {
vertex_vectors {
362,
<0.181892, 4.40051, -0.133597>,
<0.73675, 4.53695, -0.908689>,
<-0.406486, 4.83995, -1.7559>,
...
<-1.06245, -0.0848655, -5.01761>,
<-0.971358, -0.537017, -3.95753>,
<-0.707503, 0.875963, -5.32494>
}
face_indices {
720,
<2, 95, 93>,
<93, 94, 1>,
...
<86, 362, 360>,
<362, 358, 360>
}
}
So you probably see that converting the file you
have to POV-Ray script can actually be done but it
would take a very long time to do by hand.
I think that it can be done with a self-made macro in
POV-Ray, but there might be some programs out on the
net that can do this for you.
I would recommend searching with Google for these
keywords: "translate" and/or "convert", "POV-Ray" and
"LightWave3D"
The webpage for "Crossroads 3D" states that Crossroads
will be able to read LightWave3D files in the future:
http://home.europa.com/~keithr/Crossroads/index.html
(NB Ken: Capital C in Crossroads)
http://www.europa.com/~keithr/crossroads)
Tor Olav
> well I can open it with word. It starts with
> ####
> #
> # OBJ File Generated by LightWave3D
> # LightWave3D OBJ Export v2.2
> #
> ####
> # Object: Ball1Flat.lwo
> #
> # Vertices: 362
> # Points: 0
> # Lines: 0
> # Faces: 720
> # Materials: 1
> #
> ####
>
> o Ball1Flat.lwo
>
> # Vertex list
>
> v 0.181892 4.40051 -0.133597
> v 0.73675 4.53695 -0.908689
> v -0.406486 4.83995 -1.7559
> ....
> v -1.06245 -0.0848655 -5.01761
> v -0.971358 -0.537017 -3.95753
> v -0.707503 0.875963 -5.32494
>
> # Face list
>
> g
> usemtl Default
> f 2 95 93
> g
> f 93 94 1
> ....
> f 86 362 360
> g
> f 362 358 360
>
> # End of file
Post a reply to this message
|
|