Форум

Сообщения, созданные пользователем Константин Хомяков
18 марта 2016 11:48
Здравствуйте!
Добро пожаловать на форум!

Для контроля анимации можно использовать:
1) Нодовый редактор логики в Blender (ноды Play/Stop Timeline с возможностью указания начального и конечного кадров, ноды Play/Stop Animation для конкретных объектов)
https://www.blend4web.com/doc/ru/logic_editor.html#animation
2) API движка в js коде (методы модулей animation и nla)
https://www.blend4web.com/api_doc/module-nla.html
https://www.blend4web.com/api_doc/module-animation.html

Здравствуйте! У меня вопрос по анимации. Можно ли как нибудь воспроизвести анимацию с 10 по 20 кадр, а потом с 20 по 1? Как то делается с помощью скрипта?

1) В случае обычной (не nla) анимации есть возможность установить начальный кадр для анимации объекта методом set_frame. Для проигрывания анимации в обратном направлении можно использовать метод set_speed со значением -1. Встроенного метода для выставления кадра, на котором остановить анимацию на данный момент нет

2) При работе с NLA подойдет логическая нода Play Timeline с указанием маркеров начала и конца проигрывания либо метод set_range из модуля nla API движка. Для разворота анимация необходимо будет задать свойство Reverse соответсвующему nla стрипу в блендере

Команда Blend4Web - разработчик
Twitter
LinkedIn
17 марта 2016 15:58

the link that I tested in this video

reaviu.com/wgl/sl/REAViU_sunglass_02/
Hello!

We can't reproduce your issue on Huawei x1 with similar mali-450 gpu in chrome.
Does this error appears in all browsers?
Команда Blend4Web - разработчик
Twitter
LinkedIn
15 марта 2016 17:57

How do I calculate a single step only for z -axis based on the TSR of an armature bone?
As far as i can see from screenshots you need to rotate your armature object around global vertical axis, which is Y axis in webgl space.
You can try:
var rig = m_scenes.get_object_by_name("Armature");
    var temptsr = base_tsr;
    var qtemp = m_quat.fromValues(base_tsr[4],base_tsr[5],base_tsr[6],base_tsr[7]);

    // axis to rotate around
    var glob_Y = m_util.AXIS_Y;

    // global rotation quaternion
    var glob_quat = m_quat.create();
    m_quat.setAxisAngle(glob_Y, Math.PI/180, glob_quat)

    // getting result rotation into qtemp
    m_quat.multiply(y_quat, qtemp, qtemp);

    m_armat.set_bone_tsr_rel(rig, "Bone.Base",temptsr);
Команда Blend4Web - разработчик
Twitter
LinkedIn
15 марта 2016 17:45

how get sec.json > 3Dobjects or thi.json > 3Dobjects

if load multiple json file in same canvas_container , what is the best way?
Hello!
You should use the second parameter in get_object_by_name method:
https://www.blend4web.com/api_doc/module-scenes.html#.get_object_by_name.
m_data.load method will return you data_id of loaded scene which you can use to get object.

sec_data_id = m_data.load("assets/obj/sec.json", secload_cb);
...
m_scs.get_object_by_name("sec.json > 3Dobjects name ", sec_data_id);
Команда Blend4Web - разработчик
Twitter
LinkedIn
15 марта 2016 17:28

Is there a way to output a single rendered frame to a jpg rather than to the web browser?
I suppose that it is possible using for example node.js but you should take into account that you still will need a browser on your server to render a scene etc. There are likely some pitfalls, I can't say exactly, because we haven't worked with such projects before
Команда Blend4Web - разработчик
Twitter
LinkedIn
15 марта 2016 16:49

Can anyone tell me if the lighting in blen4web is Differed or Forward rendered?
Lighting in blend4web is Forward Rendered. It gives opportunity to use the full Blender power for example in creating really complex materials

Rather than rendering client side I want to render server side and send the result to the users browser.

Is it possible to use accelerated GPU rendering on a headless server?
Our product is fully client side aimed. We plan to add options for some server side pre calculations (physics etc) but main rendering will be still on the client.
So as far as i can see server side GPU rendered blend4web application is possible in theory but it will be rather tricky and complex project to implement.
Команда Blend4Web - разработчик
Twitter
LinkedIn
15 марта 2016 16:33

I've noticed when using the SDK viewer there is an option to 'pause' the visualization. When paused my GPU usage goes back down to idle instead of 100%.

Is this possible?
Hello!
Yes, it is possible. "Website" project example (logo_3d) from our SDK is exactly what you need
Команда Blend4Web - разработчик
Twitter
LinkedIn
11 марта 2016 10:07

I realized that when I do File > Export > Blend4Web (.html) that it displays as expected. So maybe it is just that the Viewer's settings for outlining are independent from those of the .blend?
You are absolutely right!
It is viewer debugging tool that explicitly sets Object Outlining property to ON if enabled
Команда Blend4Web - разработчик
Twitter
LinkedIn
10 марта 2016 10:38
Hello!

In case you test your scene in viewer (for example with Fast Preview button) please check if "Overview Outlining Mode" property is set to No
Команда Blend4Web - разработчик
Twitter
LinkedIn
08 марта 2016 14:59

Можно перейти из одной сцены в другую при помощи нод логики? (имею в виду сцены внутри одного бленд файла)
Такой возможности на данный момент не предусмотрено
Команда Blend4Web - разработчик
Twitter
LinkedIn