POV-Ray : Newsgroups : povray.programming : beginner Server Time
25 Dec 2024 10:37:45 EST (-0500)
  beginner (Message 1 to 6 of 6)  
From: Riccardo Cohen
Subject: beginner
Date: 23 Mar 2000 16:31:22
Message: <38DA8E62.A64E7A4F@dial.oleane.com>
hi,
I wander if anyone could give me a piece of code C++ to call povray and submit a
program, then get the image.
(should I download povray source or only the executable is enough?)

plateforme : Win98/PowerMac Os8.5


Thanks

-- 
Riccardo Cohen

Articque
Les Roches
37230 Fondettes
France
email = rco### [at] dialoleanecom
web = http://www.articque.com
tel: +33 02 47 49 90 49
fax: +33 02 47 49 91 49


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: beginner
Date: 23 Mar 2000 17:19:54
Message: <38da988a$1@news.povray.org>
In article <38DA8E62.A64E7A4F@dial.oleane.com> , Riccardo Cohen 
<rco### [at] dialoleanecom>  wrote:

> hi,
> I wander if anyone could give me a piece of code C++ to call povray and
> submit a program, then get the image.
> (should I download povray source or only the executable is enough?)
>
> plateforme : Win98/PowerMac Os8.5

I am not sure what your question is.  Do you just want to create an image
with POV-Ray?  In that case you just start the application and load or write
a scene file, as described in the tutorial(s).  You do not need to write a
program or know how to program in order to get images, all you need to do is
to supply the scene description to POV-Ray and it will generate the image
for you.


     Thorsten


Post a reply to this message

From: Riccardo Cohen
Subject: Re: beginner
Date: 23 Mar 2000 20:43:59
Message: <38DAC995.1872DBF6@dial.oleane.com>
It is the opposite : I would like not to lauch povray manually, nor loading a file on
disk.
I would like my C++ program to "send" as tranparantly as possible a pov file to
povray, and "receive" the image automatically, without any manual manipulation.
(mac+win)

Thanks
-- 
Riccardo Cohen

Articque
Les Roches
37230 Fondettes
France
email = rco### [at] dialoleanecom
web = http://www.articque.com
tel: +33 02 47 49 90 49
fax: +33 02 47 49 91 49


Post a reply to this message

From: Ken
Subject: Re: beginner
Date: 23 Mar 2000 21:03:03
Message: <38DACCF1.538AA44A@pacbell.net>
Riccardo Cohen wrote:
> 
> It is the opposite : I would like not to lauch povray manually, nor loading a file
on disk.
> I would like my C++ program to "send" as tranparantly as possible a pov file to
povray, and "receive" the image automatically, without any manual manipulation.
> (mac+win)

So what you are saying is that you would like to render an image within
a window from your own program. Which I believe the API hooks in POV-Ray
are supposed to provide this service. I don't know how to do it.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: beginner
Date: 23 Mar 2000 22:24:53
Message: <38dae005@news.povray.org>
In article <38DAC995.1872DBF6@dial.oleane.com> , Riccardo Cohen 
<rco### [at] dialoleanecom>  wrote:

> It is the opposite : I would like not to lauch povray manually, nor loading a
> file on disk. I would like my C++ program to "send" as tranparantly as
> possible a pov file to povray, and "receive" the image automatically, without
> any manual manipulation. (mac+win)

The following, while never tested, should work with the Mac version. In
order to start rendering, you can use AppleScript with a few tricks to
actually start the render automatically.  To do so, you can send a "print"
event with the file to render.  The render will auto-start with the settings
of that file or if none exists, the default settings (you can find the prefs
resource format in the official source code if you want to create/change
prefs in your application).
Now comes the catch: You won't get an event back when rendering is done.
There are several ways to solve this. I would suggest the following trick.
As output format select an uncompressed Targa image. Now, you can
pre-calculate the size of the Targa image in advance, it is a fixed header
size plus width * height * bytes per pixel (usually three or four). You can
look it either up in the POV-Ray source code or just render a few images and
do the math based on that.
Now, just make your application check every few seconds if the image file in
questions already exists (remember to delete it before starting the render
if it exists), and if it exists, check its size. If the size matches the
size you expect, the render is done. As Targa images are written on a line
by line bases, you can theoretically even get a line by line preview.

Good luck,


    Thorsten


____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Riccardo Cohen
Subject: Re: beginner
Date: 24 Mar 2000 04:23:37
Message: <38DB3553.7612DDC7@dial.oleane.com>
well thats very kind of you, I'll try it.
-- 
Riccardo Cohen

Articque
Les Roches
37230 Fondettes
France
email = rco### [at] dialoleanecom
web = http://www.articque.com
tel: +33 02 47 49 90 49
fax: +33 02 47 49 91 49


Post a reply to this message

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