Q3D V-2.4 [3D Physics + Skeletal Animation UPDATE]

Post your completed addons to share with the community

Post » Fri Apr 03, 2015 3:31 pm

Id still recommend using morph animation if you can. Its implemented in hardware so instead of getting slowdown with 14 skeletons, you can have a hundred animated objects. The cost of skeletal animation is much higher since its got to search for the next position of each object.
B
75
S
13
G
8
Posts: 1,973
Reputation: 9,841

Post » Fri Apr 03, 2015 3:40 pm

Perhaps morph animation in obj?
B
10
S
1
Posts: 19
Reputation: 540

Post » Fri Apr 03, 2015 5:56 pm

QuaziGNRLnose wrote:Id still recommend using morph animation if you can.

If it's really that much of a difference performance-wise, I guess morph animations would be fine, too. I finally figured out how to get them to work, too.
I do have two more questions on morph animations though:
1) If we want to export a blender object with more than one animation, do we have to put all the animations in a row in blender's dope sheet? Because the exporter doesn't seem to understand blender's convenient "actions" system. (Unity does. :cry: )
2) No matter what I do, the blender three.js exporter names the animation frames animation_0000001, animation_000002 and so on. Do we really have to rename them by hand afterwards in the json file? Is there no way to let the exporter know which frame belongs to which animation?

PS: Are skeletal animations really as useless as you're making them sound? Will they even visibly slow down the game if you're playing on PC via NW.js, or just on weaker mobile systems?
B
19
S
5
Posts: 24
Reputation: 2,800

Post » Sat Apr 04, 2015 5:30 am

@wiimote

As things stand it's been pretty difficult to get them optimized, and this has been delaying their release. The way they're implemented currently in three.js is less than ideal for some purposes and it's not trivial to change it. They're not useless, just the number being used at once should be limited, the number of bones kept to a minimum, etc. I leave this up to the developer but it makes skeletal animation more difficult to apply than morph animations, the game programmer has to control when and where to use them carefully, and when to initialize/deinitialize models. The reason they're expensive is that one "skeleton" is actually made of many hierarchic objects, say 30 bones, so it's as if you have 30 extra objects per skeleton. On top of that animation incurs an overhead and search structure to find how and where to tween, and to calculate the quaternion interpolations. Right now i have it so that it also creates construct object "bones" so that you can manipulate those with events/pick them/test for collisions etc. again this makes using the system easy, but also makes it slower. Morph animations are just static frames shoved into the gpu. It can render them incredibly fast so they're a bit more appropriate for a Javascript game where CPU use should be kept for doing game logic.

I really do try to optimize things as much as possible but sometimes it's a very difficult trade off between doing that and making the system easy to use. I do my best to try and optimize things.

The exporter is really dumb, I didn't write it. Eventually i hope to make some pull requests and add useful functionality. For now you'll have to manually rename. These things tend to change with time since three.js is an open source project, and I try to stay within a version or two of the releases.

@smebor

obj format dont support anything like that, they're pretty much model data only.
B
75
S
13
G
8
Posts: 1,973
Reputation: 9,841

Post » Sat Apr 04, 2015 11:18 am

@QuaziGNRLnose
I see. I'll try and stick with morph animation for now then. It does sound a lot more attractive now.
QuaziGNRLnose wrote:The exporter is really dumb
I didn't want to put it like that, but yeah... ;)
QuaziGNRLnose wrote:I didn't write it.
Yes, I was aware of that. I did some googling and noticed that other people have already been trying to apply fixes to the exporter regarding its ability to recognize blender actions. If I find an interesting inofficial build somewhere, I'll be sure to post it here.
EDIT: Nope, there's one multi action exporter and it didn't seem to work with blender 2.74. Too bad.
B
19
S
5
Posts: 24
Reputation: 2,800

Post » Mon Apr 06, 2015 8:27 am

@QuaziGNRLnose, If you get the skeletal animation-option working I will surely be very interested in this plugin.
The object-manipulation I have in mind is far too complicated to achieve with morphs and speed is far less important than precision.
Being able to manipulate each bone separately would be very important.
Although I have been fooling around with other options (Unreal, babylon.js) I would love to be able to create my project in Construct2.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Apr 06, 2015 4:51 pm

LittleStain wrote:@QuaziGNRLnose, If you get the skeletal animation-option working I will surely be very interested in this plugin.
The object-manipulation I have in mind is far too complicated to achieve with morphs and speed is far less important than precision.
Being able to manipulate each bone separately would be very important.
Although I have been fooling around with other options (Unreal, babylon.js) I would love to be able to create my project in Construct2.


Yes as i have it the bones can be controlled / picked individually, as well as with exported keyframe animation. I've designed the system around the fact one would want to use skeletal animations where dynamic animation is important. I almost have it working but sadly exam periods are rolling around in university so it's difficult to find time to put in working on Q3D atm.
B
75
S
13
G
8
Posts: 1,973
Reputation: 9,841

Post » Mon Apr 06, 2015 6:44 pm

Last edited by smebor on Tue Apr 07, 2015 3:10 pm, edited 4 times in total.
B
10
S
1
Posts: 19
Reputation: 540

Post » Tue Apr 07, 2015 2:49 am

smebor wrote:http://googledrive.com/host/0B-Rseo5BvYB1flc4aDFyVkt0S3JZWlJzZngxbjMzeFVNYkY0SVVhNGNINVQ3bWJXaXc3aUE/index.html
Animation without morphing and bones. *.obj
https://drive.google.com/file/d/0B-Rseo ... sp=sharing


I don't recommend doing animation that way. Change model is a slow and expensive function, even though it's optimized with recycling which speeds it up somewhat, actual morph animations is much much much faster and implemented entirely on the gpu.
B
75
S
13
G
8
Posts: 1,973
Reputation: 9,841

Post » Wed Apr 08, 2015 2:01 pm

QuaziGNRLnose wrote:exam periods are rolling around in university so it's difficult to find time to put in working on Q3D atm.
So that's what's slowing down development so much. What a shame. I hope the export will at least be fixed soon, so we can show our projects around (which may also increase plug-in sales *wink*).

On a side note, let's say I wanted to develop a 3D first person game for a mobile VR system such as the Google Cardboard or Samsung GearVR. I believe that setting up two Q3D viewports next to each other and applying Construct's spherical distortion filter to each of them to get the necessary screen bulge should do the trick.
So I was wondering if there was a way to apply Construct's distortion filter effects to layers with Q3D objects on them, or to viewport objects directly. And even if I can't do it now with v2.3, could it be done at all in the future?
B
19
S
5
Posts: 24
Reputation: 2,800

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: ezgaming420 and 1 guest