Hi,

I too get blank images using this approach but I have successfully captured
using the standard methods.

I think the problem might be that you are keeping the buffered images until
the IOThread writes them out. I seem to remember someone posting that
buffered images retrieved in this way still get updated by the renderer. If
that is the case then your IOThread is simply writing out the current frame
at whatever stage it's at. Since your IOThread is independent of the
rendering loop it's not surprising that you very rarely get a complete
image - since it's rather unlikely that your writing of the image will
correspond to the postSwap() part of the rendering loop every time.

The approach I've used(which seems to work for me) is either to write out
the image in the postSwap() method or to extract the data from the buffered
image and store it somewhere else until you're ready to write it out (again
this is done in the postSwap() method).

Hope I've been some help,

Ewan


----------------------------------------------------------------------------
-----

    Ewan Borland
    BSc(hons) Computing Science and Mathematics
    University of Glasgow

    [EMAIL PROTECTED]
    [EMAIL PROTECTED]

----------------------------------------------------------------------------
-----

----- Original Message -----
From: "Kasparian, Raffi J." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 6:10 PM
Subject: Re: [JAVA3D] Capturing the Canvas3D Image


> I should follow this up by saying that I'm using Java 1.4.1b, Java3D 1.3,
> NT4, Pentium III, 800 mhz processor, 384G RAM.
>
> -----Original Message-----
> From: Kasparian, Raffi J. [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 11:38 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Capturing the Canvas3D Image
>
>
> I am not having great success with the tried and true image capture
> routines. Sometimes images are captured correctly and other times only
> partial images are generated. When capturing every frame drawn,
performance
> is severely degraded and many times the Canvas3D itself only shows partial
> or blank images. I tried putting the IO routines in a separate thread to
> which I simply pass the postSwap-captured images but performance remains
bad
> and the captured images are no better. I changed HelloUniverse to capture
> every frame to disk and am attaching my two source files. Two buttons
"Start
> Capturing" and "Stop Capturing"  control the capture process. (Images are
> saved to the folder "C:/CaptureHelloUniverse". Please, someone, let me
know
> if I am doing something wrong or try the program out on your computers to
> see if it works better on your systems. The boolean variable useIOThread
in
> CaptureCanvas3D can be changed and the program recompiled to change from
> handling the IO in the same thread as postSwap or in a different thread.
>
> Thanks,
>
>
> Raffi
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to