Re: Saving frames in performer 2.2

New Message Reply Date view Thread view Subject view Author view

Brian Furtaw (brian++at++dingbat.clubfed.sgi.com)
Mon, 11 Jan 1999 06:43:26 -0500


Doug,

You could use pfuSaveImage in a draw callback,

man pfuSaveImage yeilds....

int pfuSaveImage(char* name, int xorg, int yorg, int xsize, int ysize,
              int alpha);

Use it in a draw callback like this....

void DrawChannel(pfChannel *channel, void *data)
{
     char fileName[64];

    sprintf(fileName, "frame%03d.rgb", pfGetFrameCount());

    /* erase framebuffer and draw Earth-Sky model */
    channel->clear();

    /* invoke Performer draw-processing for this frame */
    pfDraw();

    pfuSaveImage(fileName, 0, 0, 1024 , 1024, 0);

    /* draw Performer throughput statistics */
    if (drawStats)
        pfDrawChanStats(channel);
}

You have to setup your channel(s) to call the callback.....

    pfChannel *achan = new pfChannel;

    achan->setTravFunc(PFTRAV_DRAW, DrawChannel);

I must warn you copy back of the framebuffer is painfully slow. The best way to
do this is send it to video and save it on a video tape. If you are just
copying a frame or two it won't be to bad. Perfly has a feature which uses
pfuSaveImage() to copyback frames when you hit a key stroke.

Brian

On Jan 8, 1:18pm, DOUGLAS_MASHEK++at++udlp.com wrote:
> Subject: Saving frames in performer 2.2
>
> Hi,
>
> We're running Division, Coryphaeus, and a few Performer Demos, and we
> would like to know how to get performer to render the frames, and then
> dump them to files. Is this possible? If so, how? Will it take
> modification to the applications, or is there some hooks to performer
> 2.2 that will let me control that from another program? I want the
> capture to happen in a syncronized fassion, when each frame is fully
> rendered.
>
> If anyone has done this, I shure could use some help. I'm a novice to
> Performer programming, but I have a 3-Pipe Onyx2, and an Onyx2 IR
> deskside that we want to capture the images from.
>
> Any help would be appreciated.
>
>
> Thanks,
> Doug
>
> [ cc:Mail note part ] :
>
> Received: from portal.udlp.com ([192.169.4.225]) by ccmail.udlp.com with SMTP
> (IMA Internet Exchange 3.11) id 001DAAAB; Fri, 8 Jan 1999 13:09:55 -0600
> Received: from portal.udlp.com (root++at++localhost)
> by portal.udlp.com with ESMTP id NAA26068
> for <DOUGLAS_MASHEK++at++udlp.com>; Fri, 8 Jan 1999 13:06:52 -0600 (CST)
> Received: from deliverator.sgi.com (deliverator.sgi.com [204.94.214.10])
> by portal.udlp.com with ESMTP id NAA26061
> for <DOUGLAS_MASHEK++at++udlp.com>; Fri, 8 Jan 1999 13:06:51 -0600 (CST)
> Received: from holodeck.engr.sgi.com (holodeck.engr.sgi.com [150.166.37.78])
by
> deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via SMTP id
> KAA10867; Fri, 8 Jan 1999 10:56:31 -0800 (PST)
> mail_from (guest++at++holodeck.engr.sgi.com)
> Received: (from guest++at++localhost) by holodeck.engr.sgi.com
> (950413.SGI.8.6.12/960327.SGI.AUTOCF) id KAA09727 for
> info-performer-dist++at++holodeck.engr.sgi.com; Fri, 8 Jan 1999 10:56:37 -0800
> Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by
> holodeck.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) via ESMTP id
> KAA09696 for <info-performer++at++holodeck.engr.sgi.com>; Fri, 8 Jan 1999 10:56:36
> -0800
> Received: from odin.corp.sgi.com (odin.corp.sgi.com [192.26.51.194])
> by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
> via SMTP id KAA04806
> for <info-performer++at++engr.sgi.com>;
> Fri, 8 Jan 1999 10:56:36 -0800 (PST)
> mail_from (owner-info-performer++at++odin.corp.sgi.com)
> Received: from deliverator.sgi.com by odin.corp.sgi.com via ESMTP
> (951211.SGI.8.6.12.PATCH1502/951211.SGI)
> for <info-performer++at++sgi.com> id KAA22748; Fri, 8 Jan 1999 10:56:34
-0800
> Received: from challenge.silicon.cl (challenge.silicon.cl [209.88.202.2]) by
> deliverator.sgi.com (980309.SGI.8.8.8-aspam-6.2/980310.SGI-aspam) via ESMTP
id
> KAA08108
> for <info-performer++at++sgi.com>; Fri, 8 Jan 1999 10:47:10 -0800 (PST)
> mail_from (cano++at++krusty.silicon.cl)
> Received: from ivory.silicon.cl ([192.168.2.2]) by challenge.silicon.cl
> (Post.Office MTA v3.5.1 release 219 ID# 0-54537U100L100S0V35)
> with ESMTP id cl for <info-performer++at++sgi.com>;
> Fri, 8 Jan 1999 15:56:51 -0800
> Received: from krusty ([192.168.2.53]) by ivory.silicon.cl
> (Post.Office MTA v3.5.1 release 219 ID# 0-54537U100L100S0V35)
> with SMTP id cl for <++at++ivory.silicon.cl:info-performer++at++sgi.com>;
> Fri, 8 Jan 1999 15:57:40 -0400
> Received: (from cano++at++localhost) by krusty
(950413.SGI.8.6.12/950213.SGI.AUTOCF)
> id PAA08888 for info-performer++at++sgi.com; Fri, 8 Jan 1999 15:52:48 -0400
> From: "Alejandro Saez" <cano++at++krusty.engr.sgi.com>
> Message-Id: <9901081552.ZM8886++at++krusty>
> Date: Fri, 8 Jan 1999 15:52:48 -0600
> In-Reply-To: Tom Flynn <thomas.a.flynn++at++boeing.com>
> "Re: Visual Workstation" (Jan 8, 9:02am)
> References: <v04103c02b2bbb09bf90e++at++[137.203.137.18]>
 <3696100E.794B++at++boeing.com>
> X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail)
> To: info-performer++at++sgi.com
> Subject: Re: Visual Workstation
> Mime-Version: 1.0
> Content-Type: text/plain; charset=us-ascii
>-- End of excerpt from DOUGLAS_MASHEK++at++udlp.com

-- 
    ----oOOo----    ----oOOo----    ----oOOo----    ----oOOo----

Brian Furtaw (brian++at++sgi.com) VisSim Technical Consultant Office:(301)572-3293 Fax: (301)872-3293 12200-G Plum Orchard Drive OpenGL/Performer/OpenInventor/ImageVision Silver Spring, Maryland 20904 Optimizer/React/PCI Device Drivers


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Jan 11 1999 - 04:24:10 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.