POV-Ray : Newsgroups : povray.unix : Problems sending image to a fifo : Re: Problems sending image to a fifo Server Time
28 Sep 2024 18:05:21 EDT (-0400)
  Re: Problems sending image to a fifo  
From: Christoph Hormann
Date: 23 Jul 2005 09:40:02
Message: <dbthah$gbt$1@chho.imagico.de>
Cesar wrote:
> Hi,
> 
> I've asked this before, but for some reason my old solution does not work in
> my new linux box, don know why.
> 
> I made a c++ program that changes the scene files several times and each
> time, it renders an image using povray. The image must go to a buffer for
> posterior processing.
> 
> So I create a fifo and in my render function i fork. The child process calls
> povray sending the image to the fifo (+Omyfifo.ppm, myfifo.ppm being the
> named fifo I create with mkfifo()). In the parent process, the function
> reads from  the fifo to the buffer.
> 
> But I'm having serius synchronization issues. I've tried so many things I'm
> lost. I'm sure someone have done
> this before. Could you help me, maybe post some code? I would really
> appreciate it.

To me this sounds like a problem not related to POV-Ray - still if you 
have the impression POV-Ray does not correctly output to the fifo you 
should try writing the image to stdout (using '-o-' like described in 
the docs) and pipe that to the fifo (you can also duplicate the output 
for debugging purposes using 'tee' this way).

In general using fifos is not so easy so you might start by testing your 
program operation with a different program before using it with POV-Ray. 
  A fairly nice example for a simple tool using a fifo can be found on:

http://www.deez.info/sengelha/projects/sigrandd/doc/

Also note you probably don't need to use a fifo to do what you are 
trying to do - for an example how you can process the output of POV-Ray 
directly in a program see KIO-POV:

http://www.tu-bs.de/%7Ey0013390/kiopov/index.html

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.tu-bs.de/~y0013390/ (Last updated 01 Jul. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

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