Changing quality at runtime
22 June 2015 12:38
Hello,
I'd like to know if it's possible to change quality at runtime, and how if it is.
Actually the setting buttons in the html-export layout is really good enough, but as I export in JSON format, I'm not able to retrieve these.
Actually, if someone have a short and efficient way to make just two buttons "Low" and "High" quality (I just need the API-side code, since buttons will be in the html anyway), I would be very grateful.
I already saw how to setup quality upon engine init (with app.init).
I unfortunately didn't find any topic on this subject so far, but I might have missed something important.
Please feel free to redirect me in this case :D.
Thanks in advance !
Shikatsu.
I'd like to know if it's possible to change quality at runtime, and how if it is.
Actually the setting buttons in the html-export layout is really good enough, but as I export in JSON format, I'm not able to retrieve these.
Actually, if someone have a short and efficient way to make just two buttons "Low" and "High" quality (I just need the API-side code, since buttons will be in the html anyway), I would be very grateful.
I already saw how to setup quality upon engine init (with app.init).
I unfortunately didn't find any topic on this subject so far, but I might have missed something important.
Please feel free to redirect me in this case :D.
Thanks in advance !
Shikatsu.
22 June 2015 17:38
Hello and welcome to the forum.
The engine specifics requires reloading after quality changes.
The easiest way to check quality for .json-export is to open it with the Viewer application.
If you are writing your own app, you can set the quality level before the scene loading. In this case, you just need to add quality level to the init options.
You can take the quality level from URL. For parsing URL there is the "get_url_params" function in the "app.js" addon.
URL = "http://192.168.88.114/your_app/your_app.html?quality=ULTRA"
If you want to change quality you should change the "quality" URL param and reload your page.
The engine specifics requires reloading after quality changes.
The easiest way to check quality for .json-export is to open it with the Viewer application.
If you are writing your own app, you can set the quality level before the scene loading. In this case, you just need to add quality level to the init options.
You can take the quality level from URL. For parsing URL there is the "get_url_params" function in the "app.js" addon.
URL = "http://192.168.88.114/your_app/your_app.html?quality=ULTRA"
var url_params = m_app.get_url_params();
var level = "LOW";
if (url_params && "quality" in url_params)
level = url_params["quality"];
m_app.init({
// . . .
quality: level, // "LOW", ""HIGH"" or "ULTRA"
// . . .
If you want to change quality you should change the "quality" URL param and reload your page.
22 June 2015 17:51