Change the Environment Texture in runtime.


photo

Recommended Posts

Posted (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.

image.png

Edited by KOVIAHN
Link to post

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 post

Thank you for reply. 

 

And thank you for unigine's active support. :) 

  • Like 1
Link to post