This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes screen of simple universe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "screen of simple universe" Watch "screen of simple universe" New topic
Author

screen of simple universe

Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Hi,
I want to save an image of 3d scene to .png file. Is there a wayto do it programatically? PrintScreen is not a solution .


SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
eve agostini
Ranch Hand

Joined: Nov 01, 2005
Posts: 43
You can create an offscreen Canvas3D and use the renderOffScreenBuffer() method:

Canvas3D
August Lammersdorf
Greenhorn

Joined: Dec 15, 2010
Posts: 7
Hi, also check out following Java 3D example programs

- org.jdesktop.j3d.examples.offscreen_canvas3d.OffScreenTest
- org.jdesktop.j3d.examples.print_canvas3d.PrintCanvas3D

j3d-examples-1_5_2-src.zip : https://java3d.dev.java.net/binary-builds.html

August, InteractiveMesh
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Thanks, that works just fine
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: screen of simple universe