POV-Ray : Newsgroups : povray.programming : OpenGL porting or support? Server Time
1 Jun 2024 14:55:22 EDT (-0400)
  OpenGL porting or support? (Message 1 to 10 of 19)  
Goto Latest 10 Messages Next 9 Messages >>>
From: Draggy
Subject: OpenGL porting or support?
Date: 28 Jun 2005 05:10:01
Message: <web.42c1137fc739b361d9bc26010@news.povray.org>
hi...

is there any way to port POV to opengl?


Thanks


Post a reply to this message

From: Warp
Subject: Re: OpenGL porting or support?
Date: 28 Jun 2005 05:15:57
Message: <42c1154d@news.povray.org>
Draggy <dra### [at] gmailcom> wrote:
> is there any way to port POV to opengl?

  No.

-- 

                                                          - Warp


Post a reply to this message

From: Patrick Elliott
Subject: Re: OpenGL porting or support?
Date: 28 Jun 2005 23:15:23
Message: <MPG.1d2bbffd61ab6af4989d97@news.povray.org>
In article <web.42c1137fc739b361d9bc26010@news.povray.org>, 
dra### [at] gmailcom says...
> hi...
> 
> is there any way to port POV to opengl?
> 
Or for a more complex explanation that Warps. No, because OpenGL only 
simulates raytracing using a) triangle meshes, not mathematical formula, 
b) its textures are pre-created, c) its reflection and other light 
features are mapped to objects, not generated by physical models and d) 
pretty much all of it is done using a painter type algorithm, which, 
instead of following a beam of light to see 'what' and 'if' it hit 
something, simply cuts away everything that shouldn't be 'visible' and 
ignores it. Item (d) is why you have to fake reflections, since OpenGL is 
incapable of determining 'if' let alone 'what', 'how many', or 'to what 
degree' light bounces of other objects, before being seen by the camera 
position.

Think of it this way. POVRay sets up a room, some lights and a camera, 
then snaps a photo. OpenGL and DirectX is a guy sitting in a room with an 
exacto knife, who splashes paint over several thousand sheets of paper, 
then uses the knife to 'cut out' every bit that isn't part of the final 
result, pastes them all on on top of the other, *then* takes a photo of 
the result. While this can 'look' very realistic, given a lot of patience 
and careful preparation, some things are impossible and you can't simply 
come back to the same room and stick a camera 'behind' the objects or 
move any lights. Doing so messes up any reflections or other 'effects' 
that have to be carefully 'adjusted' to still look right. I.e., you have 
to cut up entirely new bits, paint them all, then 'hope' you didn't mess 
something up which leaves the table top reflecting the floor, instead of 
the lamp over top of it and similar mistakes. Even OpenGL programs that 
'do' allow that do so by 'precalculating' where the reflections should 
be, then feeding a fake image of that reflection to the OpenGL system as 
a texture. I.e., it uses POVRay style calculations to figure out, "sort 
of", what it should look like, then glues the result to the wall, table, 
mirror, etc. that needs it.

POVRay is an complete machine show with an industrial lathe and a full 
employment of welders. OpenGL is a guy with a box of legos, a few tubes 
of paint and maybe some modelling clay to smooth the more obvious blocky 
bits. Its quite literally a complete impossibility to shoehorn POVRay 
into the later. Though, someone did work on a version that supported a 
'preview' system. It worked by taking the real math, manufacturing a 
bunch of approximate fakes, then showing a cheap imitation of the final 
result. I suspect it never worked too well, or for all objects. Some, 
like isosurfaces could take almost as long to produce a bad imitation, 
than to produce the real thing. This is why things like Moray, etc. that 
'do' use OpenGL, to give a rough idea of what the final result will be, 
don't even try to show some objects, but just stuff a big box, that is 
close to the estimated size expected, in their place.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: David Wallace
Subject: Re: OpenGL porting or support?
Date: 29 Jun 2005 02:13:32
Message: <42c23c0c@news.povray.org>
Draggy wrote:
> hi...
> 
> is there any way to port POV to opengl?
> 
> 
> Thanks
> 
> 
Actually I had something simpler in mind.  I have a powerful POV mesh builder at 
my disposal that can generate mesh2 objects, which are potentially exportable to 
other formats.  Getting a piece of software to actually carry this out is 
another matter.  I've seen lots of software for porting 3DS, DXF, etc. to POV 
meshes but not the reverse.

--------------
David Wallace
TenArbor Consulting
"Just In Time Cash"
www.tenarbor.com
1-866-572-CASH


Post a reply to this message

From: ABX
Subject: Re: OpenGL porting or support?
Date: 29 Jun 2005 02:50:37
Message: <r4h4c1546gt5l9asomrcuul43r3r288bj7@4ax.com>
On Tue, 28 Jun 2005 05:08:15 EDT, "Draggy" <dra### [at] gmailcom> wrote:
> is there any way to port POV to opengl?

If that's helpful: http://www.daylongraphics.com/other/povray/patches/

ABX


Post a reply to this message

From: Saul F  Luizaga
Subject: Re: OpenGL porting or support?
Date: 30 Jun 2005 08:59:04
Message: <42c3ec98$1@news.povray.org>
Warp wrote:
> Draggy <dra### [at] gmailcom> wrote:
> 
>>is there any way to port POV to opengl?
> 
> 
>   No.
> 
Warp and what about DirectX?


Post a reply to this message

From: Warp
Subject: Re: OpenGL porting or support?
Date: 30 Jun 2005 10:00:36
Message: <42c3fb04@news.povray.org>
Saul F. Luizaga <sau### [at] netscapenet> wrote:
> Warp and what about DirectX?

  Why would it be any easier to convert a pov scene to DirectX than it is
to OpenGL?

-- 

                                                          - Warp


Post a reply to this message

From: Saul F  Luizaga
Subject: Re: OpenGL porting or support?
Date: 30 Jun 2005 10:22:59
Message: <42c40043$1@news.povray.org>
Warp wrote:

> Saul F. Luizaga <sau### [at] netscapenet> wrote:
> 
>>Warp and what about DirectX?
> 
> 
>   Why would it be any easier to convert a pov scene to DirectX than it is
> to OpenGL?
> 


I don't know too much about programming Warp, that's why I ask you, 
since you're an exoert C/C++ programmer I think you should know. So 
isn't a esay task hah... but it will be a useful feature don't you 
think, as a preview one I mean.


Post a reply to this message

From: Patrick Elliott
Subject: Re: OpenGL porting or support?
Date: 30 Jun 2005 22:26:01
Message: <MPG.1d2e579ffdae2f70989d9f@news.povray.org>
In article <42c40043$1@news.povray.org>, sau### [at] netscapenet says...
> Warp wrote:
> 
> > Saul F. Luizaga <sau### [at] netscapenet> wrote:
> > 
> >>Warp and what about DirectX?
> > 
> > 
> >   Why would it be any easier to convert a pov scene to DirectX than it is
> > to OpenGL?
> > 
> 
> 
> I don't know too much about programming Warp, that's why I ask you, 
> since you're an exoert C/C++ programmer I think you should know. So 
> isn't a esay task hah... but it will be a useful feature don't you 
> think, as a preview one I mean.
> 
DirectX is just a different 'shell' or front end over the same triangle 
mesh technology. Its like asking someone if it would be easier to convert 
their toothbrush into a straight razor or a knife. Odds are pretty god, 
given the basic nature of both, that neither will be acceptable.

-- 
void main () {

    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Warp
Subject: Re: OpenGL porting or support?
Date: 1 Jul 2005 00:29:22
Message: <42c4c6a2@news.povray.org>
Saul F. Luizaga <sau### [at] netscapenet> wrote:
> I don't know too much about programming Warp, that's why I ask you, 
> since you're an exoert C/C++ programmer I think you should know. So 
> isn't a esay task hah... but it will be a useful feature don't you 
> think, as a preview one I mean.

  In general, converting pov-scenes to *any* other formats is a very
difficult task.
  For some explanations, see
http://tag.povray.org/povQandT/filesQandT.html#povtootherformatsdifficulty

-- 

                                                          - Warp


Post a reply to this message

Goto Latest 10 Messages Next 9 Messages >>>

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