Forum

Animate Statistics in 3D (please help)

07 March 2016 14:06
Hi there!

First i want to thank the devs for blend4web. It is by far the best tool for blender users in terms of WebGL! Keep up the good Work!

For my new application as a Web Dev i want to use B4W to create a statistic of my abilities, but im not good with programming to manage all the aspects. In fact im a real noob in terms of programming and i hope to find a helping hand here.

My idea was to have a round 3D Button and if you click and hold, a ring selection pops out. Then you hover the mouse over one of the selections and if you release the statistics under the menu change. It would be really great if this is possible! Im sure it is, but the problem is the lack of my programming skill, wich i hope to raise because the company i try to get in would teach me programming.

If the statistics could be animateable too it would be superb! (Im thinking of a simple change (raise/lower) from one diagram value to the new choosen value within a second or so.)

I would be really glad if someone could support me with this. Thank you for taking your time!
08 March 2016 13:29
Maybe this file helps to clarify my request. There is also some kind of bug or maybe i got something wrong.
The Skillbutton doesnt work anymore, but it did before. Also there are no warnings or error messages in the browser console, so i dont even know whats wrong.

One of the bugs is, that the ringmenu beneath the button starts its animation for a matter of seconds without being triggered by the button. I also noticed several crahses of the browser even with no warnings or errors. Is there a memory leak or a loop causing this?

Any help would be really appreciated as i need to finish my application as fast as possible.
09 March 2016 10:48
The behavior described above is not achievable with logic nodes at the moment because they do not have mouse release event. Switch Select node requires mouse to be pressed when the cursor is above the object.

As of Skillbutton. You use "ringextend" animation, but there is no such in your file. I assume, you renamed it to "ringmenuAction". If you press F12 when in browser, you will see a warning about this.

So for you task a bit of JS-programming is required.
09 March 2016 11:12
Thank you for your reply!

I know about the mouserelease event, but thats rather unimportant as long as i get the menu itself working somehow.

I opened the file and instantly found the "ringextend" Action in the NLA editor. Also i cant remember to name something "ringmenuAction". It seems blend4web was doing that.

When pressing F12 i found this:
B4W ERROR: Unsupported object: "ringmenu" or animation name: "ringextend"

Where can i find this "ringmenuAction" thing you are talking about?
Are there code snippets for b4w javascript to implement?

Edit: now that i opened the Outliner i found it! I didn't know that the Action Clip is used for that. I assumed it is the Name of the Action Strip that is used.

I think its suspicious that the animation worked before, because i was always using the name of the Action Strip.

Edit2: Please correct me if im wrong, but in this case the "Play Animation" Node is rendered useless because i dont have enough influence through the logic nodes.
09 March 2016 11:32
I opened the file and instantly found the "ringextend" Action in the NLA editor. Also i cant remember to name something "ringmenuAction". It seems blend4web was doing that.
It is a name of the NLA strip, not an action. If you press N while in the NLA editing window and go to the Action Clip section you will notice that under the Action field there is a "CylinderAction". It can be changed to "ringmenuAction" with a dropdown menu. I don't know which one is required.

If you want to check which action is currently active for a specific object you need to open Dope Sheet and go to the Action Editor. For the ringmenu object it is a "ringmenuAction".
09 March 2016 11:39
I was editing my post as i found out. I was a bit too slow for you to notice.

After changing it to the correct name, the animation starts but it doesnt finish. I expected it to play until the last frame (38) but it stops at about frame 5 and runs backwards then.

Edit: Also it ignores the first swich select node and starts without any action from the user right after loading. If you look close to the button you can see it. I uploaded the actual file.
09 March 2016 13:21
I opened the file and instantly found the "ringextend" Action in the NLA editor. Also i cant remember to name something "ringmenuAction". It seems blend4web was doing that
Actually, it is a default Blender behaviour to name actions after objects they are attached to.

After changing it to the correct name, the animation starts but it doesnt finish. I expected it to play until the last frame (38) but it stops at about frame 5 and runs backwards then.

Edit: Also it ignores the first swich select node and starts without any action from the user right after loading. If you look close to the button you can see it. I uploaded the actual file.
1) NLA needs to be disabled in the Scene settings so that only Logic nodes control animations. And it is better to avoid using NLA animation at all in such application.
2) Apply Scale and Modifiers flag should be replaced with the Apply Modifiers flag for the ringmenu object, because now the resulting object size depends on the active frame.
3) Again, correct animation names should be used in "Play Animation" nodes.

I corrected and attached the blend file.
09 March 2016 18:08
Thank you. Now i understand
 
Please register or log in to leave a reply.