Форум

Сообщения, созданные пользователем Евгений Родыгин
26 апреля 2015 12:59
Hi, and thanks for kind words.

Of course, it is possible with Blend4Web. Actually, there are several approaches for this task. As for me, the best solution is to use vertex animation. This choice will give you a good performance. (at the cost of file-size)

Also, in the upcoming release we add Shape Keys support, which can be a much more flexible solution.
26 апреля 2015 12:40
Hi,

…it is not working on iphone 4 or iphone 6. Do you have any simple solution?

Can you open https://get.webgl.org/ with iphones?

Note that Apple turned on WebGL support by default only starting from IOS8. If you use earlier version, you won't be able to watch any WebGL content.
24 апреля 2015 13:02
Ответ на сообщение пользователя laishi
Thank you our developer Evgeny Rodygin:
Through my efforts, but failed, because I was too stupid!

I present my error code

I want to by clicking on the above color change the color of the cube
I didn't have know JS friends, I ask you my teacher, PLZ fix the error code.
Thanks+

It is a bad practice to put JS code to your index.html. Better to move it to cube.js script. main_canvas_click should look like this:
function main_canvas_click(e) {
    if (e.preventDefault)
        e.preventDefault();

    var cube = m_scenes.get_object_by_name("Cube");
    m_objs.set_nodemat_rgb(cube, ["Cube-Mat", "My_rgb_node"], 1, 0, 0);
}


Getting proper color from html elements is a different story. And it is not directly related to Blend4Web. One of solutions is to register onclick event on your "<div>" elements and process cube in their callback instead of main_canvas_click function.

P.S. In order to change colors, object must have Force Dynamic Object flag on it.
24 апреля 2015 10:35
Hi, Iaishi,

With API you can change only "Value" and "RGB" nodes. This is made as an optimization. If you construct material properly, this would be always enough. For example, put "RGB" node to the input of your "Mix" node.

You can do this with the recently introduced API from the object module.

Say, you have and object cube with some material named "Material". You can change the color of "My_rgb_node" node to red with the following code:
var m_scs = require("scenes");
var m_objs = require("objects");

var cube = m_scs.get_object_by_name("Cube");
m_objs.set_nodemat_rgb(cube, ["Material", "My_rgb_node"], 1, 0, 0);
20 апреля 2015 14:43
Hi Nik,

Something about nodes and no mention in the manual that the cubic mapping is just fixing the bright sky to the top of the model permanently.
Probably, here you speak about the image-based lighting and not about cubemap reflections. Blend4Web supports this kind of reflections as you can see in many of our demos, for example, here.

If we talk about dynamic cubemaps like in the three.js example above, then - yes, Blend4Web doesn't support it yet. One of the main reasons is the errors which were present both in Chrome and Firefox.
Here are bug reports:
https://code.google.com/p/chromium/issues/detail?id=298435
https://code.google.com/p/angleproject/issues/detail?id=849
As you can see, three.js demo is used as an example there.

In recent version, we believe, they fixed it.
So, now we consider supporting this too.

I can't get a real piece of jewelry to reflect light delightfully at all using the Blender HTML export feature
Are you sure you need realtime reflections of surrounding objects? Jewelery in realtime often uses just prerendered cubemaps. Dynamic cubemaps are not very fast technique, and they are helpfull only when your object is moving around the scene. (Not only rotating) Or when you have some moving objects that are reflected in your jewelery.

[EDIT]
This demo is using cubemap reflections as well and I think it looks okay. Is this quality enough for your needs?
20 апреля 2015 12:46
Hello,

This error is really pretty serious. Some users have already reported this issue, but we were not able to reproduce it on our Windows machines. It would be great if you pack your Program Files/Blender Foundation/Blender/ directory and your_user/App Data/Roaming/Blender Foundation/Blender and send to my email: evgeny-ar@blend4web.com. This way, we will be able to understand what stands behind this bug.
20 апреля 2015 12:19
Hello friends!

We want to introduce to you a new tutorial from the series of articles on creating the "Pyatigor's Tale". This time, we'll speak about the intelligence of our character's opponents.

How can we make the golems react on surrounding environment? How can we make them move realistic? In this article we'll tell about how we have managed with these tasks.

Link to the article
20 апреля 2015 12:11
Здравствуйте, друзья!

Мы хотим представить вам новый урок из серии статей по созданию игры "Сказ о Пятигоре". В этот раз мы будем говорить об интеллекте противников нашего героя.

Как заставить големов думать и реагировать на окружающую обстановку, как придать их движению реализм? О том, как этого добились мы и будет рассказано в этой статье.

Ссылка на статью
17 апреля 2015 11:29
Здравствуйте и добро пожаловать на форум!
Поддерживает ли B4W переключение текстур и материалов?
Да, поддерживает.
Для материалов есть модуль material
В нём есть функция inherit_material позволяющая перетянуть материал с другого объекта (например, заранее подготовленная плоскость)

Если нужно заменять текстуру, то следует использовать специальные canvas - текстуры. Как их применять можно увидеть в приложении из бесплатного дистрибутива с примерами работы различных API. Его можно найти в папке: blend4web_sdk/apps_dev/code_snippets/code_snippets_dev.html (Не забудьте правильно настроить браузер, если будете локально грузить ресурсы)
17 апреля 2015 10:51
edit-I just checked and cannot find a single object that has not had the scale applied. Point out which are the offenders. I have scaled some objects with the .JS file using set_scale.

It can be seen with the developer's console. The first 5 lines are:
B4W WARN: non-uniform scale for object 展示架000
B4W WARN: non-uniform scale for object deng2008
B4W WARN: non-uniform scale for object deng2007
B4W WARN: non-uniform scale for object deng1001
B4W WARN: non-uniform scale for object batai-0011


Some notes about the code part. You are using such construction:
canvas_elem.addEventListener("mousedown", main_canvas_click, false);

When the user clicks the canvas he will be immediately transferred to the other page, which can be pretty frustrating if he just wanted to rotate the scene. I suggest you to replace mousedown with mouseup. This will also help to avoid auto-rotation bug when the user is back to the store's page.

One more thing - you are calling lots of such stuff when canvas is clicked:
var hr494ScaryEyeBalloons = m_scenes.get_object_by_name("hr494ScaryEyeBalloons");

It is not a very fast operation but you don't use hr494ScaryEyeBalloons later in your code. Probably, this can be removed?