Forum

User posts berdon
21 February 2017 17:34
Hi,I made the vertex animation and armature animation for one model and exported it in json files, but when I load it in my js web, there is a error.
"B4W EXPORT ERROR: The "TDA Miku_mesh" object has the "Armature" armature modifier and a vertex animation. Modifier removed."

And in the user manual, "The NAME object has both vertex animation and an armature modifier which is not supported. As a result, the modifier has been removed."
is telled.

Then, how to apply both the vertex and armature animation? Is there another way to make it.

Look forword to your replay.
19 January 2017 07:57
I bake the vertex animation in blend4web, but when I load the json file of the model including the vertex animation and use the js code to play it, the error posted as "B4W ERROR: No fcurves in action "lovely-mouth""occurs. Then I enable the "Apply default animation", the vertex animation play well, so maybe I miss some settings for the playing of vertex animation.
The js code is here:
_expression_rig = m_scs.get_object_by_name("TDAMiku_mesh");
				m_anim.apply(_expression_rig, "lovely-mouth");
				m_anim.play(_expression_rig);

The "lovely-mouth" is the vertex animation's name.
18 January 2017 07:34
Reply to post of user Konstantin Khomyakov
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
Maybe I can send a email to you and send the files to you, if that is convenient, dear Khomyakov.
18 January 2017 06:23
Yes, I enabled the NLA in my scene settings, and if I enable "Apply default animation", the animation will play when the webpage is open. But I cannot control the playback of the animation.
16 January 2017 19:51
Reply to post of user Konstantin Khomyakov
I can't fully understand your question.
Could you please provide more details and attach example project (how to export project)

[UPD]

I've attached an example of applying shape keys via logic nodes
Hello, I still can not realize the function, and I don't know how to solve it.
16 January 2017 19:51
Reply to post of user Konstantin Khomyakov
I can't fully understand your question.
Could you please provide more details and attach example project (how to export project)

[UPD]

I've attached an example of applying shape keys via logic nodes
Hello, I still can not realize the function, and I don't know how to solve it.
15 January 2017 09:18
wow, the exported project file is too big to upload. Maybe I can send a email to you, if that is convenient, dear Khomyakov.
15 January 2017 08:37
Thank you, dear Konstantin Khomyakov.I upload the exported files here.Make it clear, I want to Control the playback of the action clips in NLA editor. So I write the js code like this:
function main_canvas_click(e) {
    if (e.preventDefault)
        e.preventDefault();
    var x = m_mouse.get_coords_x(e);
    var y = m_mouse.get_coords_y(e);
    var obj = m_scenes.pick_object(x, y);
    if (obj) {
		if(obj.name=="a")
		{
			m_nla.set_range(0, 25);
			m_nla.play();
			//m_nla.stop();
		}
}
}
. I want to realize the function when I hit the object named "a", then the action in the NLA will be played. But now it cannot work, so I need your help, thanks.
11 January 2017 19:09
I don't know how to make it,
11 January 2017 18:58
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:
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!