Forum

Canvas Resolution Factor & Texture blur on mobile device

06 January 2016 03:47
Hi there.

How can I set Canvas Resolution Factor when i export json to my project?

And when I upload my project on my server and view on mobile device, it looks blur.

How can I fix this issue?
07 January 2016 04:53
07 January 2016 14:55
Hi,

Blurriness is caused by low display resolution of mobile devices (in web browsers). Try setting ULTRA quality in your app using the config module and the quality attribute.

https://www.blend4web.com/api_doc/module-config.html

Nice model btw
The Founder | Twitter
08 January 2016 23:12

How can I set Canvas Resolution Factor when i export json to my project?
This is also can be done through the config module by passing the "canvas_resolution_factor" option in the m_app.init() method.

You can also call config.set() method anytime during the application work to dynamically change the resolution:
m_config.set("canvas_resolution_factor", factor);

Blend4Web Team
10 January 2016 12:15
Hi there. I'm pretty new to coding.

I tried to put code like below.



"use strict"

// register the application module
b4w.register("REAViU_Nike_Shoes", function(exports, require) {

// import modules used by the app
var m_app = require("app");
var m_data = require("data");
var m_config = require("config");

m_config.set("canvas_resolution_factor", 1010);
m_config.set("quality", 2);

….



I'm not sure that the way i use the quality module..

can you help me to check my link?

http://reaviu.com/wgl/Sample/Sample-nikeShoes/

still blurry on mobile device. I can see the texture more clearly but the whole looking is not that improved.


it looks like when I publish scene without Use Device Pixel Ratio option on goocreate.com.

10 January 2016 15:02
Hi,

Please check if the following code works for you.
m_config.set("quality", m_config.P_ULTRA);
The Founder | Twitter
10 January 2016 16:35
Wow!!! It works. Thank you very much!!!!!!!
10 January 2016 17:04
Glad we could help!
The Founder | Twitter
 
Please register or log in to leave a reply.