User posts Kirill Osipov
19 July 2016 16:18
06 June 2016 12:01
Hello hsab! And welcome to the our forum.
There is a bug, we are going to fix it. But it is better to use HMDParams object (it was changed in 16.03). Sorry for that.
For example,
You need to change 194 line of eluded.js.
Right now, the Blend4Web engine doesn't support WebVR 1.0, but it support WebVR (old). We are going to support new specification.
You can see m_hmd_conf object in viewer.js and webplayer.js.
After replacing blend4web and uranium scripts with the latest 16.05 version my screen becomes black after the scene loads whenever HMD is set to stereo. However on 16.04 it works as expected.
There is a bug, we are going to fix it. But it is better to use HMDParams object (it was changed in 16.03). Sorry for that.
For example,
m_scene.set_hmd_params({
enable_hmd_stereo: true,
// Inter-lens distance / mobile screen width,
// For example: 0.064 / 0.128
inter_lens_factor: 0.5,
// Tray to lens-center distance / (mobile screen height - mobile bevel size),
// For example: 0.032 / (0.067 - 0.003)
base_line_factor: 0.5,
distortion_coefs : [0.22, 0.28],
chromatic_aberration_coefs : [-0.015, 0.02, 0.025, 0.02]
});
You need to change 194 line of eluded.js.
For some reason navigator.getVRDevices is undefined in Chromium on May 21st build. Thus hmd_conf.check() always returns false. Possibly a bug? navigator.getVRDisplays is however defined.
Right now, the Blend4Web engine doesn't support WebVR 1.0, but it support WebVR (old). We are going to support new specification.
I was wondering if someone could be kind enough to provide an example of using the configurator.
You can see m_hmd_conf object in viewer.js and webplayer.js.
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
06 June 2016 10:31
It is activated only on the phone? Or you can test the cardboard mode even from PC (UNITY style?)
I think using Mobile Emulation mode is one of the many ways emulating the phone on PC. Just change device mode and refresh a page.
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
30 May 2016 18:15
26 May 2016 17:43
04 May 2016 11:26
As I can see you need to set "gyro_use" flag to true. See here.
Sorry for this. We are going to remove the flag in next release.
exports.init = function() {
// . . .
m_cfg.set("gyro_use", true);
// . . .
});
}
Sorry for this. We are going to remove the flag in next release.
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
18 April 2016 11:07
Я попробовал экспортировать с этой поддержкой и просмотреть сцену в "ночной" сборке firefox, но переключения не получилось, т.е. сцена так и осталась "на один глаз" (хотя переключатель "стерео" появился).
А в консоле было написано следующее: "WebVR devices are not found."?
Вы можете самостоятельно включить раздвоение экрана, используя конструкции отсюда.
Как поставить "ночную" сборку на андроид - тоже вопрос.
Это не обязательно, раздвоение экрана будет происходить, если у вас просто мобильное устройство (ориентация камеры определяется гироскопом).
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
20 March 2016 17:45
Hello ranj9119. Welcome to our forum!
I think this will help you.
Ответ на сообщение пользователя ranj9119
Hi all.
Is it possible to activate HMD display in developed apps? Possibly in load callback?
Best
I think this will help you.
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
28 February 2016 17:05
Ответ на сообщение пользователя Кирилл
А можно будет разделить экран для google cardboard на андройд устройстве?
Экран можно разделять, начиная с версии 15.12. Для этого необходимо произвести вызов
m_scenes.set_hmd_params({
enable_hmd_stereo: true,
distortion_scale: 1
})
Пример кода:
b4w.register("myAwesomeVRapp", function(exports, require) {
// …
var m_cfg = require("config");
var m_scenes = require("scenes");
// …
exports.init = function() {
// …
m_cfg.set("stereo", "HMD");
// …
}
// …
function load_cb(data_id) {
// …
m_scenes.set_hmd_params({enable_hmd_stereo: true, distortion_scale: 1})
// …
}
}
window.addEventListener("load", function() {b4w.require("myAwesomeVRapp").init();});
UPD: в ближайшем релизе будет полноценная (на сколько это только возможно в рамках браузера) поддержка Google Cardboard.
UPD: теперь не надо устанавливать свойство "distortion_scale". Т.е. можно использовать следующую конструкцию.
m_scenes.set_hmd_params({
enable_hmd_stereo: true
})
Blend4Web Team
kirill@blend4web.com
kirill@blend4web.com
23 February 2016 20:02