Jump to content

Search the Community

Showing results for tags 'render'.

  • 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 21 results

  1. Работаю над собственным рендерингом UI. У меня есть вектор структур, которые содержат вершины, индексы и TexturePtr. И рендерю я всё это, как в примере ImGui (как в ImGuiImpl::draw_callback) - та же идея задавать RenderState, залить всё в меш, затем внутри render_target->enable/disable в цикле задавать текстуру для материала и рендерить меш с оффсетом по вершинам и индексам, а затем идёт точно такой же код, как и в примере, ни капельки не изменнёный. Я понимаю, что этого может быть мало, поэтому если надо, могу подробнее показать. У меня после одного такого прохода функции перестают работать текстуры. Поэтому я снарядился дебаггером и выяснил, что с умным указателем всё в порядке - рефкаунт в порядке, с указателем внутри тоже действий не было, под ним осталась Texture/APIInterface. А вот с объектом внутри APIInterface, в моём случае, с D3D11Texture произошло нехорошее - оно удалилось и стало NULL. Дальше дебаггером я выяснил, что при вызове Engine::swap(), данная текстура/данный объект очищается и вызывается деструктор. Когда я начал отслеживать текстуру внутри ImGui, то там такой подставы не произошло. В чём причина и как это пофиксить?
  2. Было очень сложно разбираться в том, как написать простой шейдер (вершинный + фрагментный) на UUSL, в базовом материале и как туда передавать данные из C++. К примеру я очень долго искал, как передать матрицу в шейдер. Я сначала нашёл про Material::setParameter но там не было матриц. Затем нашёл Shader::setParameter, но в шейдере матрица всё равно не задавалась. Только потом, я каким-то образом (уже не помню каким) узнал, что в шейдере эту самую матрицу нужно указать внутри `CBUFFER(parameters)`. Очень сильно не хватает документации и примеров, соединяющих всё воедино. Потому что пока что ориентиром является только имплементация ImGui, в которой покрываются далеко не все аспекты.
  3. I'm making a first-person shooter and I want two cameras to work for me. The first - rendered the environment, and the second - hands with weapons. But I ran into a problem - Unigine shows the render only from the camera that has the Main Player check mark and ignores all other cameras. An attempt to set the Main Player check mark on two or more cameras only led to the fact that Unigine took the render of the lowest camera in the hierarchy, also ignoring all the others. How can I combine a render from two cameras?
  4. I think these two options do not work in 2.15.0, I think they have bugs!
  5. [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
  6. Hi All, I'm currently implementing a custom fisheye viewport since the panoramic rendering is not open enough for our needs. As described in other posts I'm disabling various screen space effects. However, there might be other viewports that still can have the SS effekts enabled. So in in my FisheyeViewport::render() I want to disable and later reenable the render settings. Currently the Code looks like this: void FisheyeViewport::render() { // ... // save current render settings // Unigine::BlobPtr render_settings_blob = Unigine::Blob::create(); // Unigine::Render::saveState(render_settings_blob); Unigine::XmlPtr render_settings = Unigine::Xml::create(); Unigine::Render::saveWorld(render_settings); Unigine::Render::setTAA(false); Unigine::Render::setSSAO(false); Unigine::Render::setSSR(false); Unigine::Render::setWhiteBalance(false); Unigine::Render::setExposureMode(Unigine::Render::EXPOSURE_DISABLED); Unigine::Render::setExposure(2); Unigine::Render::setBloom(false); Unigine::Render::setFilmic(false); Unigine::Render::setLightsLensFlares(false); // do the fisheye rendering // ... // restore render settings // Unigine::Render::restoreState(render_settings_blob); Unigine::Render::loadWorld(render_settings); } The Render::restoreState() function is marked as deprecated (although it still exists in 2.12). The Render::saveState() function is not marked as deprecated which irritates me as I don't see how to use it without Render::restoreState(). Also using Render::restoreState() as described above results in an Exception: terminate called after throwing an instance of 'char const*' Signal: SIGABRT (Aborted) which is why I switched to using an XML node. This works, but feels more like a workaround. Whats the intended workflow for saving and restoring the state? Thanks and greetings!
  7. Hello, I have some questions about a solution to render many projected lights and perhaps there is an alternative approach. Right now, our general approach for lighting is divided into: Point Lights (created as Billboards) Spot Lights (currently as Projected Lights) For the Point Lights, we tend to have quite high numbers in the visualized scenes (up to 60.000), and we have solved that pretty well so far, thanks to your support. For the Spot Lights, we decided for an approach where we use Projected Lights and render them in to a light map, which is used by a single Projected Light. This new projected light is placed 25.000 units above ground and has the light map assigned. While this gives us the performance boost we want to see with the high number of projected lights we have, it comes with a disadvantage: We lose the information about the original source position of the projected lights used, thus everything is illuminated, even though it would be physically above the light source (of the original projected light used to create the light map). Please note that we also need to update that light map dynamically, as we need to support switching some of the light points off and on dynamically, based on user input. I have created some sample data (image and video) to visualize the problem, see : problem.mp4 overview: Do you have suggestions of how to encode the source position (height) of the projected light into the light map to avoid illuminating objects that shouldn’t be? Or do you have other possible solutions? Looking forward to your feedback! Regards, Sascha
  8. Hello! How do I export the sena to png or jpg format, so that I can do post productions in Photoshop? It's possible?
  9. Hello. Physics of ObjectTerrainGlobal without render (using surfaces - rendering viewportmask 00000000 in Engine or Unigine::Render::get()->setEnabled(0) in code for example) didn't work. My object falls through the bottom. With using render it works, but i need without render. Is it bug? Or is it normal logic of ObjectTerrainGlobal? P. S. i work in version 2.7.2 and i can't updgrade to the new version.
  10. Hello, I made one camera motion using trakcer in scene and i wanted to take render sequences for video of scene within camera motion. I used video grabber but didn't get good quality sequences. waiting for your suggestions, ideas, methods to take render quality sequences.... i hope to hear from you soon....... Mayur patel
  11. Clouds Render Order

    I have some troubles with a Cloud Layer Object. It doesnt render in the background, instead over my objects. What can I do in terms of order? Thank you. Werner
  12. 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.
  13. Disable Global Illumination

    We are creating an interior scene, the problem is that global lighting acts generating an unwanted effect. Is there any way to turn off global lighting, without the need to remove the sun? In the screenshots can be seen the change of lighting at different times of the day.
  14. Hi, I need to render to a texture. How do I set that up? Thanks
  15. Truble in Win 8, 10

    Hi. Our application has some errors on windows 8 and windows 10 OS. Here screenshot from it. There must be colored models, but, how you can see, its black. What can I do to correct it. ~
  16. Hi, I have a Unigine::Widgets::Window with a virtual monitor that it's displaying the same image as main viewport. I already done using a WidgetSpriteViewport and the engine.game player. I suspect I'm rendering the same image twice. I wonder if there is another way more efficent to do this. Something similar to image_00 sample but instead of calling engine.render.renderImage2D(), using the already rendered image created by main viewport. Thanks in advance, Iván.
  17. I have C++ code which is dynamically creating meshes with 1000s of vertices. I have created a plugin which will output these meshes to the engine. I would like to be able to render these without creating ObjectMeshs and adding each vertex individually. Is this possible?
  18. [SOLVED] Sprite - Color - Render Problem

    Hello together, I attached an example project. If you start the batch, you'll see a TabBox, with a given sprite, that loads a white PNG file and renders it with a given color. If you swap now fast the tab's you'll see, that the color of the sprite swaps to blue/green/yellow and so on, and always render the widget complete from right to left, or left to right whatever, that looks not really "cute" and fine for the consumer. Is there any possibility to manage this problem(s)? Best regards Lars
  19. [SOLVED] WidgetEditText not rendering text

    When WidgetEditText is put inside a vbox and the WidgetEditText's text crosses the vbox's bottom boundary, the rendering of the text stops. Below is the complete code to reproduce the issue. Gui gui; WidgetVBox vbox; WidgetButton button; WidgetEditText text; int init() { gui = engine.getGui(); vbox = new WidgetVBox(gui); vbox.setBackground(1); vbox.setWidth( 300 ); vbox.setHeight( 200 ); gui.addChild(vbox,GUI_ALIGN_OVERLAP | GUI_ALIGN_CENTER); text = new WidgetEditText(gui, "WidgetEditText..." ); text.setPosition( 150, 0 ); vbox.addChild(text, GUI_ALIGN_OVERLAP | GUI_ALIGN_FIXED ); button = new WidgetButton(gui, "Drag Me" ); button.setCallback( GUI_PRESSED, "OnPressed" ); button.setCallback( GUI_RELEASED, "OnReleased" ); vbox.addChild(button, GUI_ALIGN_OVERLAP | GUI_ALIGN_FIXED); return 1; } void OnPressed() { text.setPosition( text.getPositionX() + gui.getMouseDX(), text.getPositionY() + gui.getMouseDY() ); } int nCount = 0; void OnReleased() { text.addLine( format( "%d", nCount ) ); nCount++; } int update() { return 1; } int shutdown() { return 1; }
  20. I think it would be nice for Unigine to implement its own user extendable class for users who need to create scripts that update automatically. Right now, I achieve this with a custom UpdateObject and a manager that runs from the world script. This feature is equivalent to Unity3d 's Monobehaviour. http://unity3d.com/support/documentation/ScriptReference/MonoBehaviour Thanks! :(
  21. Is it possible to create custom classes that have their own update(), flush(), and render() functions that are automatically called by the engine without having to explicitly calling them from the world script?
×
×
  • Create New...