Сообщения, созданные пользователем Константин Хомяков
06 февраля 2017 18:34
Sure, no problem.Got it!
In the .blend file, I have packed a simple checkerboard pattern (black/white) and you can render it in Cycles what's the result and then make a faster preview.
Let me know if you need something else.
We haven't yet supported auto-linked UVs for texture nodes in Cycles. So for now to make your texture work in b4w you need to link UV manually:
06 февраля 2017 18:12
Hello B4W team!Hello!
Just wanted to say that I have tried to mix to different colors with a black and white image and it did not work. Entering a value in the mix shader does work but plugging in a texture does not.
Perhaps, this will be solved in next release.
Thank you for the feedback!
Could you please attach simple blend file or screenshot with your node setup so that we could reproduce exactly your issue
31 января 2017 12:20
Here I have a question about PBR shaders. I would like to know if PBR is going to be supported by blend4web in the future. I see someone asked about PBR before in the forum but here I will be more specific about the concept: I mean the "Metal/Roughness" workflow which typically involves using 4 or more maps:Hello!
Diffuse map (or called albedo map)
Metallic map
Roughness map
Normal map
We are hard working on supporting Cycles render workflow which is in fact similar to modern PBR workflow but in some aspects it is even deeper and more customizable. This work will probably affect many aspects of blend4web pipeline (reflections system, environment lighting etc) and produce graphic enhancements in b4w projects as well as simplify engine users life. I can't give precise dates because supporting tones of Blender's features and options is often harder then just creating your own pipeline but we'll try to introduce these features as soon as possible.
I know Sketchfab supports PBR so what is exported from substance painter can be used directly in Sketchfab. But I want more customization than what Sketchfab can offer so blend4web is my best choice. I wonder if blend4web can somehow support PBR textures usage so that the realism of the model in blend4web projects can be even better.I think that we will support some simplified pipeline based on Cycles render to allow users to easily import projects from modern PBR-oriented environments like Substance Painter.
Blend 2.8 is said to support PBR in its viewport (link). Is this something that will influence blend4web's roadmap?Yeah, of course! We closely monitor Blender development and try to stay in tune. As you may know we even affect it! Our blender sensei Alexander Romanov has commit rights in Blender code. So one thing's for sure, blend4web won't stuck and will take into account upcoming Blender changes
27 января 2017 10:39
What is the javascript code behind the Stop All animations button in the Scene Viewer and how do I implement it as a function in my web viewer app?Hello!
You can find Scene Viewer source code in the SDK folder apps_dev/viewer/.
The function you are looking for is anim_stop_all_clicked in the viewer.js file
18 января 2017 11:36
Hello once again!
Sorry for the delay
Unfortunately shape key animations via keyframes (NLA or just object actions) are not yet supported in blend4web.
But you can animate shape keys procedurally:
1) code snippet for shape keys API methods
2) API module time docs
P.S.
Sorry for the delay
Unfortunately shape key animations via keyframes (NLA or just object actions) are not yet supported in blend4web.
But you can animate shape keys procedurally:
1) code snippet for shape keys API methods
2) API module time docs
P.S.
Maybe I can send a email to you and send the files to you, if that is convenient, dear Khomyakov.We prefer to answer questions and upload resourses here on the forum so that other users can also use our discussions and answers to solve their issues. Private technical support is provided for licensed users if needed
16 января 2017 23:37
Hello, I still can not realize the function, and I don't know how to solve it.Hello!
Have you enabled NLA in your scene settings (https://www.blend4web.com/doc/en/scene_settings.html?highlight=nla#nla) ?
Also can be checked in code directly: https://www.blend4web.com/api_doc/module-nla.html#.check_nla
13 января 2017 20:58
s there a way to copy the rotation of camera to an object?Hello!
if is possible, can copy only the z axis?
There are several ways to do this via API. One of them:
...
var cam = m_scenes.get_active_camera();
var cam_rot = m_transform.get_rotation(cam);
m_util.cam_quat_to_mesh_quat(cam_rot, cam_rot); // camera coordinate system differs from object in blender
var cam_dir = new Float32Array(3);
m_util.quat_to_dir(cam_rot, m_util.AXIS_MY, cam_dir);
//--
var cube = m_scenes.get_object_by_name("Cube");
var cube_rot = m_transform.get_rotation(cube);
var cube_dir = new Float32Array(3);
m_util.quat_to_dir(cube_rot, m_util.AXIS_MY, cube_dir);
// to copy full rotation just m_transform.set_rotation_v(cube, cam_rot);
//--
var cube_dir_new = new Float32Array(3);
var r1 = Math.max(cube_dir[0]*cube_dir[0] + cube_dir[1]*cube_dir[1], 0.0000001);
var r2 = Math.max(cam_dir[0]*cam_dir[0] + cam_dir[1]*cam_dir[1], 0.0000001);
var k = Math.sqrt(r1 / r2);
cube_dir_new[0] = cam_dir[0] * k;
cube_dir_new[1] = cam_dir[1] * k;
cube_dir_new[2] = cube_dir[2];
//--
var new_quat = new Float32Array(4);
m_quat.rotationTo(cube_dir, cube_dir_new, new_quat);
m_quat.multiply(new_quat, cube_rot, new_quat);
m_transform.set_rotation_v(cube, new_quat);
You can also play around cylindrical billboards settings if you need these effect constantly (https://www.blend4web.com/doc/en/objects.html?highlight=billboards#billboard-panel)
12 января 2017 16:54
Hello, I want to use the shape keys to make expressions, so I use the key frame in animation to make the expression action clips editor and add the action clips in NLA editor. Then I export it to json file and use the js to control the play of the action, the code is shown below:I can't fully understand your question.
if (obj) {
if(obj.name=="a")
{
m_nla.set_range(0, 100);
m_nla.play();
}
But It can not work, in addition, I have not check the logic editor.
Look forwards to your reply, thanks!
Could you please provide more details and attach example project (how to export project)
[UPD]
I have not check the logic editor.I've attached an example of applying shape keys via logic nodes
12 января 2017 14:16
А есть ли нода которая реагирует не на нажатие как Switch SelectПока что нет. Для пользовательского ввода только Switch Select (https://www.blend4web.com/ru/forums/post/7985/ ).
И нода которая отвечает за ссылку по какому либо URL?Такая имеется
Нода Page Redirect из категории Network
09 января 2017 10:53
Добавлял уже много раз. Не получаетсяЕсли в ноде Play Animation не включена опция Do Not Wait, то следующая нода не обрабатывается до тех пор, пока анимация не проиграется до конца. Т.е. в случае анимации с типом проигрывания Loop - никогда ))
Вам достаточно включить данную опцию, чтобы все заработало как надо
Возможно, мы пересмотрим релизацую данной опции, чтобы таких затыков не происходило.
P.S.
При отладке нодовой логики можно пользоваться нодой Console Print из категории дебаг. Через нее можно выводить значения переменных в консоль браузера для отладки и заодно смотреть в каком порядке отрабатывают ноды. Может сильно облегчить жизнь при работе со сложными нодовыми деревьями