How can convert the node to jpg ,like Screen capture,

how can convert the node to jpg ,like Screen capture,

1 Like

https://javadoc.jmonkeyengine.org/v3.3.0-stable/com/jme3/app/state/ScreenshotAppState.html

1 Like

i just want convert my model node to jpg for preview!how can do this?

1 Like

Another option is to just attach a copy of the 3D model to the GUI node. I use Lemur to create a new 3D Viewport in my custom scene editor for previewing 3d models in the interface. This also allows the model to be rotated and zoomed in/out for 360 degree previewing.

But if you absolutely do need a .jpg image then that won’t work. Personally, I like to take screenshots of my weapon models manually in the scene editor. This way I can customize the lighting and angle for each unique model, and the final images of the model turn out better than if I were to write code to automatically generate the screenshots.

1 Like

I second what Paul posted. It isn’t much work to rewrite the ScreenshotAppState to automatically process whatever Spatials one throws at it instead of waiting for user input and screenshotting the entire window.

1 Like