KOVIAHN Posted June 8, 2021 Share Posted June 8, 2021 (edited) The function to change the Texture of the Environment at runtime is being implemented. The file format is HDR extension. If it is loaded from the existing Editor, it can be changed by setting the corresponding path, but setting the path of the HDR file in an arbitrary folder outside the DATA folder does not produce the desired result. Unigine::RenderEnvironmentPresetPtr preset = Unigine::Render::getEnvironmentPreset(0); //fail preset->setTextureName("C:/Users/Michael/Documents/UNIGINE Projects/AddOn_Sample/data/christmas_photo_studio_07.hdr"); Various methods were tried, such as saving using the Unigine file system and Image, but failed. It would be very helpful if you give a hint on which part to look at. Thank you. Edited June 8, 2021 by KOVIAHN Link to comment
bmyagkov Posted June 8, 2021 Share Posted June 8, 2021 Hello! Sad to say but currently those feature does not available - that means in runtime you couldn't change environment texture which is located out of data folder This is well know feature request and it is already in our internal task board, so we hope to add it in one of the next releases Thanks! Link to comment
KOVIAHN Posted June 9, 2021 Author Share Posted June 9, 2021 Thank you for reply. And thank you for unigine's active support. :) 1 Link to comment
andrea.padovani Posted September 22, 2021 Share Posted September 22, 2021 Not sure it can be "similar" to the same that we're discussing right there, but to me it will be also extremely important to have the ability to import streaming to texture. In other engine there are some plug-in able to take streaming url, video and stuff like that, and render it to texture. So basically you can put live content inside the game, that is something that I really looking for. Link to comment
silent Posted September 23, 2021 Share Posted September 23, 2021 andrea.padovani Starting with 2.15 SDK you should be able to set the DX11 / GL Texture directly to the environment (right now it's possible only to set from the file). In theory you should be able to write a custom code that will stream your video to the texture on GPU and read it back and convert to cubemap from inside the Engine. You can convert equirectangular image to cubemap quite easily in realtime: https://learnopengl.com/PBR/IBL/Diffuse-irradiance. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts