POV-Ray : Newsgroups : povray.newusers : import openGL Server Time
31 Jul 2024 04:21:22 EDT (-0400)
  import openGL (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
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

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

...
> 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
...

If Chris is right about it being a Wavefront file, then
you are lucky. (Maybe your nephew used LightWave3D to
export the shape to a Wavefront file ?)

Crossroads 3D seems to be able to both read Wavefront
files and write POV-Ray scene files.


Tor Olav


Post a reply to this message

From: anne
Subject: Re: import openGL
Date: 23 Apr 2003 18:10:06
Message: <web.3ea70e9e2424fca482dec0910@news.povray.org>
thank you all for your help

I did find a poseray version for the mac
http://users.skynet.be/smellenbergh/poseray.htm
and this program converted the files to .pov format.

I had two objects, one with flat surfaces, the other with round surfaces.
the one with flat surfaces looked ok, the one with round surfaces is very
coarse in the ray rendition it does not really look smooth and round, but I
guess I need to learn more about ray-tracer and extrapolation.

thank you very much for all your help

anne


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: import openGL
Date: 23 Apr 2003 18:23:04
Message: <Xns9367471412BBtorolavkhotmailcom@204.213.191.226>
"anne" <ann### [at] wjhharvardedu> wrote in
news:web.3ea70e9e2424fca482dec0910@news.povray.org: 

> thank you all for your help
> 
> I did find a poseray version for the mac
> http://users.skynet.be/smellenbergh/poseray.htm
> and this program converted the files to .pov format.
> 
> I had two objects, one with flat surfaces, the other with round
> surfaces. the one with flat surfaces looked ok, the one with round
> surfaces is very coarse in the ray rendition it does not really look
> smooth and round, but I guess I need to learn more about ray-tracer
> and extrapolation. 
> 
> thank you very much for all your help
> 
> anne
> 

To make the shape with flat surfaces smoother you can add
normals to the triangles.

Here's info about that:

http://www.povray.org/documentation/view/167/#s06_05_02_06
http://www.povray.org/documentation/view/56/#s03_05_02_01


Tor Olav


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: import openGL
Date: 24 Apr 2003 04:01:02
Message: <3ea799be$1@news.povray.org>
In article <cja### [at] netplexaussieorg> , 
Christopher James Huff <cja### [at] earthlinknet>  wrote:

> And POV-Ray does not have an import
> feature, and can generally not handle external file formats.

No, but the Mac version can "import" a POV-Ray for Windos template menu
directory tree as well as the POV-Ray 3.0/3.1 template menu file.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: ABX
Subject: Re: import openGL
Date: 24 Apr 2003 04:25:06
Message: <vi7fav8hbdpdfg204h6l5l3o8vtii0ch9e@4ax.com>
On Thu, 24 Apr 2003 10:01:02 +0200, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> "import" a POV-Ray for Windos template menu

You probably mean "Insert Menu" from "POV-Ray for Windows". Please more respect
for platform supported in your product ;-)

ABX


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: import openGL
Date: 24 Apr 2003 11:11:04
Message: <3ea7fe88@news.povray.org>
In article <vi7fav8hbdpdfg204h6l5l3o8vtii0ch9e@4ax.com> , ABX 
<abx### [at] abxartpl>  wrote:

> You probably mean "Insert Menu" from "POV-Ray for Windows". Please more
respect
> for platform supported in your product ;-)

Yes, I actually removed "Windos" and added "Windos" to my spell-checker's
dictionary.  It works really well since I rarely need to write about
hardware rather than the software ;-)

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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