Off-screen rendering with vr.canvas to capture images
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I need to generate lots of images of a scene in VRML. I'm using vr.canvas and capture functions to generate images. I'm running my scripts on a remote CPU cluster which doesn't have graphics cards. How can I use the matlab off-screen rendering capabilities to capture VRML scene images using canvas and capture command (I understand that it will be significantly slower)? I tried creating an invisible figure using the following command
fighandle = figure('Position',[100 100 500 500],'Visible','off');
However, the use of the canvas and capture command resulted in the following error. Is there any other way to render off-screen that is compatible with canvas and capture command?
Regards,
Priyanshu
PS: Error Message ------------------------------------------------------------------------ _??? Java exception occurred: javax.media.opengl.GLException: Context not current at com.sun.opengl.impl.x11.X11GLContext.getPlatformExtensionsString(X11GLContext.java:236) at com.sun.opengl.impl.FunctionAvailabilityCache.initAvailableExtensions(FunctionAvailabilityCache.java:116) at com.sun.opengl.impl.FunctionAvailabilityCache.isExtensionAvailable(FunctionAvailabilityCache.java:104) at com.sun.opengl.impl.GLContextImpl.isExtensionAvailable(GLContextImpl.java:351) at com.sun.opengl.impl.x11.X11GLContext.isExtensionAvailable(X11GLContext.java:280) at com.sun.opengl.impl.GLImpl.isExtensionAvailable(GLImpl.java:30493) at com.sun.opengl.impl.GLImpl.initBufferObjectExtensionChecks(GLImpl.java:30638) at com.sun.opengl.impl.GLImpl.checkPackPBODisabled(GLImpl.java:30693) at com.sun.opengl.impl.GLImpl.glReadPixels(GLImpl.java:17458) at com.mathworks.toolbox.sl3d.vrcanvas.VRGLCanvas.capture(VRGLCanvas.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.mathworks.jmi.AWTUtilities$Invoker$3.runWithOutput(AWTUtilities.java:443) at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:397) at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:360) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
Error in ==> canvas.capture at 15 value = typecast(obj.JCanvas.capture(vr.canvas.getNavPanelReservedHeight(obj.NavPanel)), 'uint8');
Error in ==> sample at 18 Ivrml = capture(c);
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Animation finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!