POV-Ray : Newsgroups : povray.newusers : import openGL Server Time
31 Jul 2024 06:20:02 EDT (-0400)
  import openGL (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: anne
Subject: import openGL
Date: 23 Apr 2003 15:40:09
Message: <web.3ea6ebaa5940d35b82dec0910@news.povray.org>
I ran the tutorial and got a rendering of a sphere, and then of a cube. Now
my nephew sent me an openGL object he made with lightwave. He said to use
the import function, but the import function is greyed out and I can't use
it. I am using the mac 3.5 ray program on a 9.2.2 power mac. I can't find
anything about it in the help.

what is the problem?  in what condition is the import activated so I can use
it?


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: import openGL
Date: 23 Apr 2003 16:11:14
Message: <Xns9366E239E6C0Ctorolavkhotmailcom@204.213.191.226>
"anne" <ann### [at] wjhharvardedu> wrote in
news:web.3ea6ebaa5940d35b82dec0910@news.povray.org: 

> I ran the tutorial and got a rendering of a sphere, and then of a
> cube. Now my nephew sent me an openGL object he made with lightwave.
> He said to use the import function, but the import function is greyed
> out and I can't use it. I am using the mac 3.5 ray program on a 9.2.2
> power mac. I can't find anything about it in the help.
> 
> what is the problem?  in what condition is the import activated so I
> can use it?

Anne,
POV-Ray does not have any import
functions in it's menus.

(But you can write scripts that can
import information from certain files.)

Maybe you are referring to Moray ?


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: import openGL
Date: 23 Apr 2003 16:19:29
Message: <Xns9366E3A01492Dtorolavkhotmailcom@204.213.191.226>
Tor Olav Kristensen <tor_olav_kCURLYAhotmail.com> wrote in 
news:Xns### [at] 204213191226:

...
> Anne,
> POV-Ray does not have any import
> functions in it's menus.
> 
> (But you can write scripts that can
> import information from certain files.)
> 
> Maybe you are referring to Moray ?

I just realised that maybe you are referring
to POV-Ray for Mac. I have never tried it.

So it may have a import menu item.

But I don't know anything about it. Sorry.


Tor Olav


Post a reply to this message

From: anne
Subject: Re: import openGL
Date: 23 Apr 2003 16:30:13
Message: <web.3ea6f6ca2424fca482dec0910@news.povray.org>
Well, it is pov-ray 3.5 for mac os, and the import and export I see are
options under the templates menu along with "pov-ray 3.1 templates" and
"pov-ray 3.5 templates".

Maybe it has nothing to do with importing an openGL .obj object.

how do I get it into pov-ray 3.5?


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: import openGL
Date: 23 Apr 2003 16:43:36
Message: <Xns9366E7B72C6A5torolavkhotmailcom@204.213.191.226>
"anne" <ann### [at] wjhharvardedu> wrote in 
news:web.3ea6f6ca2424fca482dec0910@news.povray.org:

> Well, it is pov-ray 3.5 for mac os, and the import and export I see are
> options under the templates menu along with "pov-ray 3.1 templates" and
> "pov-ray 3.5 templates".

I see.


> Maybe it has nothing to do with importing an openGL .obj object.

No, I don't think this has anything to
do with importing objects into a scene.


> how do I get it into pov-ray 3.5?

Is the openGL file you got a text file ?

(E.g. a C or Java source code file)


Tor Olav


Post a reply to this message

From: Christopher James Huff
Subject: Re: import openGL
Date: 23 Apr 2003 17:08:31
Message: <cjameshuff-B99656.17082323042003@netplex.aussie.org>
In article <web.3ea6ebaa5940d35b82dec0910@news.povray.org>,
 "anne" <ann### [at] wjhharvardedu> wrote:

> I ran the tutorial and got a rendering of a sphere, and then of a cube. Now
> my nephew sent me an openGL object he made with lightwave. He said to use
> the import function, but the import function is greyed out and I can't use
> it. I am using the mac 3.5 ray program on a 9.2.2 power mac. I can't find
> anything about it in the help.
> 
> what is the problem?  in what condition is the import activated so I can use
> it?

This question falls under the "not even wrong" category...it just 
doesn't make sense. There is no such thing as an "OpenGL object". OpenGL 
is a graphics API mainly used for drawing on a screen...it is a toolkit 
for programmers, not a file format. And POV-Ray does not have an import 
feature, and can generally not handle external file formats. I don't knw 
what "import function" you are talking about.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: anne
Subject: Re: import openGL
Date: 23 Apr 2003 17:10:10
Message: <web.3ea700d92424fca482dec0910@news.povray.org>
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

From: Christopher James Huff
Subject: Re: import openGL
Date: 23 Apr 2003 17:17:11
Message: <cjameshuff-B5050E.17170323042003@netplex.aussie.org>
In article <web.3ea6f6ca2424fca482dec0910@news.povray.org>,
 "anne" <ann### [at] wjhharvardedu> wrote:

> Well, it is pov-ray 3.5 for mac os, and the import and export I see are
> options under the templates menu along with "pov-ray 3.1 templates" and
> "pov-ray 3.5 templates".

Uhh...that's the import feature for templates. It lets you import 
templates. That's why it is under the "Templates" menu.


> Maybe it has nothing to do with importing an openGL .obj object.

This would be partially correct. *.obj files are not "OpenGL objects", 
there is no such thing. From what I can tell, they are Wavefront files. 
POV-Ray can not directly handle *.obj files.


> how do I get it into pov-ray 3.5?

You will have to use an external program. You might want to start with a 
web search:
http://www.povray.org/resources/links/3D_Programs/Conversion_Utilities/
http://www.google.com/search?q=Mac+converter+.obj

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: gonzo
Subject: Re: import openGL
Date: 23 Apr 2003 17:20:12
Message: <web.3ea7027f2424fca4a0c272b50@news.povray.org>
anne wrote:
>I ran the tutorial and got a rendering of a sphere, and then of a cube. Now
>my nephew sent me an openGL object he made with lightwave. He said to use
>the import function, but the import function is greyed out and I can't use
>it. I am using the mac 3.5 ray program on a 9.2.2 power mac. I can't find
>anything about it in the help.
>
>what is the problem?  in what condition is the import activated so I can use
>it?
>


I don't know about any import function, but Lightwave .obj files can be
converted to POV using PoseRay. Look on the povray links.

RG


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: import openGL
Date: 23 Apr 2003 17:59:04
Message: <Xns93675FBD9B3torolavkhotmailcom@204.213.191.226>
"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

Goto Latest 10 Messages Next 6 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.