Hello. I am trying to capture my canvas3d as an image. My problem is that my capture attempt fails if the frame containing the canvas is minimized. Is there any way of taking a snapshot of the canvas while it is minimized?
Nice topic. You'll need to go offscreen. Then you'll face some problems (ie delayed scene updates, alpha channel, speed, incompatibilities, etc). well, it's a start anyway.
Try to use my OffScreenCanvas3D class http://www.javadesktop.org/forums/thread.jspa?threadID=4811&tstart=0
Hey Mik. Thanks for your help. What you suggested doesn't work for me. Actually, what you suggested is what I am doing. Let me try to put the question some other way. Is it possible to generate an image from anything other than the Canvas3d? I generate an image when I load a 3d model into my canvas, if the canvas is minimized when the application starts, the image is blank. I want the image to be generated nonetheless. Thanks again.
Well, I had exactly the same problem and the code above works for me. Infact I do not even open a single jframe in order to take pic of the scene.
AFAIK I don't think you can take pictures of your 3d scene with Java3D in any other way than using a Canvas3D.
Thanks a lot Mik. I was already using the exact same code, but my problem was that I was basing my snapshopt dimensions on the onscreen size. Meaning, if the frame containing the canvas was minimized, the offscreen renderer would have wrong dimensions to work with.
Anyway, thanks for your help.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.