Jump to content

Search the Community

Showing results for tags 'screenshot'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 6 results

  1. [SOLVED] Screenshot with transparency

    hello! is there any way to take screenshot with transparency (no background) in runtime? looks like "no" but the tracker can do it from editor
  2. [SOLVED] Capture image of a node

    Hello World ! I am asking for help to capture an image of a node. Here is what I need to do : Have the screenshot saved See the camera view in the screenshot See the node in the screenshot And here is what happens: Screenshot is saved - OK We can see the camera view - OK The node is not in the screenshot - NOT OK What I do (after checking the sample "Screenshot") : In WorldLogic.init(): Load a node in my world with World::loadnode(); Place the camera in order to see the node (player->setWorldTransform) PlayerSpectatorPtr player = PlayerSpectator::create(); Game::setPlayer(player); NodePtr node = World::loadNode("test.node"); BoundBox bb = node->getBoundBox(); player->setWorldPosition(Vec3(bb.getMax()) * 10); player->worldLookAt(node->getWorldPosition()); In WorldLogic.update(): Create my TexturePtr if it does not exist and set its size to the size of the app if(!_screenTexture){ _screenTexture = Texture::create(); _screenTexture->create2D(App::getWidth(), App::getHeight(), Texture::FORMAT_RGBA8, Texture::FILTER_POINT | Texture::USAGE_RENDER); } In WorldLogic.beforeSwap(): if (_screenTexture) _screenTexture->copy2D(); In WorldLogic.swap(): Check if the screenshot was already taken if no : Take the screenshot and save it. if(_takeScreenshot) { // Screenshot de l'objet ImagePtr image = Image::create(); _screenTexture->getImage(image); if (!Render::isFlipped()) image->flipY(); image->convertToFormat(Image::FORMAT_RGB8); image->save("Resources/Test.png"); _takeScreenshot = false; } At the moment I have tried to use World::updateSpatial(); after loading the node but it does not change anything. The next step is to load a list of nodes and take a screenshot of each one bye one, but if I can't even have the first one... My main loop looks like that : AppSystemLogic system_logic; AppWorldLogic world_logic; AppEditorLogic editor_logic; // init engine Unigine::EnginePtr engine(UNIGINE_VERSION, argc, argv); engine->addSystemLogic(&system_logic); engine->addWorldLogic(&world_logic); world_logic.init(); while (!engine->isDone()) { engine->update(); engine->render(); world_logic.beforeSwap(); engine->swap(); } How can I manage to see my node in the screenshot ? Are there steps that I missed ? And if I want to do that for a list of 10 nodes. Is there something else to do like waiting for the nodes to render ? Tell me if you need any more information. Thanks for your time, Best regards. Antoine
  3. Hello, I am trying to add and remove fbx imported models from my scene but it doesn't work. I have a vector of NodePtr called "models" containing the models I want toe handle in my scene. I am simply calling this code every AppWorldLogic::update() : int idx = update_ctr % models.size(); int prev_idx = (update_ctr - 1) % models.size(); models[prev_idx].getNode()->setEnabled(false); models[idx].getNode()->setEnabled(true); models[idx].setPosition(targetCenter); The goal of this code is to simply test if I can add one model and remove the previous one each frame. With this code there is 0 model that gets added in the image in the first X frames (X value varies). After that, it sometimes work in the render display but models are not rendered in the screenshots I save using viewport->addCallback(Render::CALLBACK_END, MakeCallback(this, &AppWorldLogic::image_ready_callback)); // In the AppWorldLogic::Init viewport->renderTexture2D(camera, texture); // In AppWorldLogic::update void AppWorldLogic::image_ready_callback(Renderer *renderer) { ImagePtr screenshot_image = Image::create(); texture->getImage(screenshot_image); if (!Render::isFlipped()) screenshot_image->flipY(); screenshot_image->convertToFormat(Image::FORMAT_RGB8); if(saveImage) { std::string path = imageDir + "_" + std::to_string(ctr) + ".png"; screenshot_image->save(path.c_str()); } } The render seems extremely inconsistent : In this saved screenshot an Helicopter should appear on the heliport (it is displayed on UNIGINE Engine window). Also, in the first rendered frames after launch the image is not fully rendered (no sun light) and heliport is blurred (heliport is a decal). Do you have any suggestion to improve my results and consistency of the saved screenshots ? Let me know if it is not clear.
  4. I'm trying to get a screenshot using the function "Viewport::renderImage2D". But the result of the picture is not like the truth. Can I see an example of getting a screenshot in C ++, and that the result is the same as using the console command "video_grab"? Thank you in advance.
  5. 360 Degree Screenshot

    Hi there, I'm wondering if there's a way to use the "grabber" to take 360 degree screenshots like the Kite and Lightning plugin for UE4? I'm looking to render a scene quickly in real-time using Unigine then export 360 degree screenshots to be used in WebVR sites. How would I go about enabling this? Thanks so much!
  6. I want to save a sequence of screenshots to a RAM disk for performance reasons. However I cannot set an absolute path i.e. Q:\screenshots\ - instead the only argument I can pass is a relative path to $APP\bin\screenshots\ Or at leasts if there is a way I can't see it.
×
×
  • Create New...