Search the Community
Showing results for tags 'state'.
-
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!
-
Enabled / Disable auxiliary state performance.
sebastian.vesenmayer posted a topic in C++ Programming
Hello, we did observe that when we are changing the material of an ObjectMeshStatic, it will lose its auxiliary state information during runtime. We are using the aux buffer for outlining objects, but changing the material will disable the outlining. We did a workarround for this and did restoring the auxiliary state when the material changes. We did a profile run and did observe: restoring the auxiliary state takes always a lot of time until the function will return. So every time a material changes on an object the application halts for a noticeable time. Do you have a simple solution for that, that does not cost any extra ressources and time on CPU/GPU side? We are on 2.8 Unigine version using opengl. Thanks a lot. -
Is there a mechanism for saving the parameters input into an editor window? Seems trivial and I looked into how it was done for the Materials and Properties dialogs but those only save engine values directly.