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

Post your completed addons to share with the community

Post » Sun Jun 19, 2016 2:27 am

Prominent wrote:
blurymind wrote:@Prominent can you reupload the example file please? The links are dead!

that link still works for me.. but here's a new link anways.
https://1drv.ms/u/s!AhHSZHEulqh_gSwz5N36ab9E-zgq


Awesome! Thank you.

Btw in my playtest the player sprite disappears when behind a railing
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Sun Jun 19, 2016 2:48 am

Has anyone found a way to attach a collision box to a bone? How does one handle colision with bones in q3d??

Edit: oh found it - you use the q3dBone object's pick condition.
Last edited by blurymind on Sun Jun 19, 2016 12:43 pm, edited 2 times in total.
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Sun Jun 19, 2016 11:01 am

when using skeleton animation, it plays but, the mesh skinning data is broken:

Image
three.js-r71\three.js-r71\examples\models\animated\monster
exported from blender as threejs skeleton animation

Is this another bug (threejs exporter or q3d) ?

The export and import of js models is SUPER FLAKY :|
This is the shittiest export/import of skinned mesh i have ever seen in a game engine. Its almost impossible to get any decent export from blender to q3d with threejs official exporter.

I managed to export it by using only e a deformation armature, with euler - it took a whole day of trial and error.
This is due to blender's exporter.
Last edited by blurymind on Mon Jun 20, 2016 11:05 am, edited 1 time in total.
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Sun Jun 19, 2016 6:54 pm

has anyone figured out a way to have the q3dsprite object communicate with 2d sprite objects? It cant collide, it cant be clicked on. Can it do anything?

Is there a way to set a 2d sprite to always overlap a 3d bone's position? What is the math to achieve that - we need to make up for the missing z axis on the 2d sprite?
Last edited by blurymind on Sun Jun 19, 2016 7:08 pm, edited 1 time in total.
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Sun Jun 19, 2016 7:05 pm

You'll have to create your own collision responses, etc.. Or use a container and have a sprite object for every q3d sprite, and position the q3dsprite to the location of the regular sprite, then reference the regular sprite for any collision stuff.
B
43
S
19
G
65
Posts: 1,098
Reputation: 37,933

Post » Sun Jun 19, 2016 7:10 pm

Prominent wrote:You'll have to create your own collision responses, etc.. Or use a container and have a sprite object for every q3d sprite, and position the q3dsprite to the location of the regular sprite, then reference the regular sprite for any collision stuff.

@Prominent
I tried setting up the 2d sprite to track the position of the 3d sprite and it did not work :(

Can you share an example?
I actually want to do the opposite- position the 2d sprite to the position of the 3d sprite!
Is there a way to extract the screen coordinate of a 3d coordinate?

unity and most other game engines have this:
http://answers.unity3d.com/questions/17 ... bject.html

it is pretty important
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Thu Jun 23, 2016 6:35 am

@blurymind

I didn't write the three.js animation export/import, only the code which links it to Q3Ds various systems, and some modifications to the way skeletal animations are loaded. The exporter/importer code is open source and wasn't made by me, but I've done what I can, and have gotten it working with . A lot of animation features that you can use in blender wont export / are missing, and you'll need to figure out what does/doesn't work. Make sure you use the r69 exporter, from the source package in this link (https://github.com/mrdoob/three.js/releases/tag/r69). If you want a working example of animated models try/look at the files in examples/models/skinned, these load properly. the marine_anims.js file has a few animations. I was unaware of the underscore causing issues with morph anims, I'm not entirely sure why its messing things up but ill investigate.

for the 2D/3D projection thing, there's no built-in method to get the view-space coordinates or projection matrix. Generally that's supposed to be what you use Q3D sprite for.

If you know javascript/sdk you can modify Q3D easily enough to give you what you need, just look at the tick2 function for Q3D bone where the debug text is displayed and you can add some new expressions that use a similar process. I'll look into adding it for the final update i'll do, but no word on how long that'll be.

Q3D isn't going to be undergoing any updates for a long time though, it's already grown way larger than I had intended it to when i made it 2+ years ago. There's a build I've yet to release that moves to a slightly newer version of three.js and fixes some bugs but that's incomplete, and after that there wont really be any more updates. It was never meant to be a full-blown game engine with all the features and UX of something like Unity, and frankly it can't become much better because of the edit-time SDK limitations of construct 2. Originally it was just meant as a simple way of getting 3D graphics to display with WebGL in a construct 2 project, and now it's got features like physics, collision checking, animation etc which I literally spent a whole year and a half researching/optimizing/refactoring. There isn't much more I can do to improve it which is worth my time, You shouldn't be using Q3D for a large scale 3D game where an engine like unity would be much better suited and have improved workflow, you should use it if you need some 3D touches to your C2 game, or want to make a simple 3D game like the tiny tank demo.
B
77
S
13
G
8
Posts: 1,973
Reputation: 9,891

Post » Thu Jun 23, 2016 4:18 pm

cool @QuaziGNRLnose thanks for the updates on Q3D.
B
80
S
29
G
112
Posts: 195
Reputation: 62,035

Post » Thu Jun 23, 2016 6:17 pm

QuaziGNRLnose wrote:@blurymind

I didn't write the three.js animation export/import, only the code which links it to Q3Ds various systems, and some modifications to the way skeletal animations are loaded. The exporter/importer code is open source and wasn't made by me, but I've done what I can, and have gotten it working with . A lot of animation features that you can use in blender wont export / are missing, and you'll need to figure out what does/doesn't work. Make sure you use the r69 exporter, from the source package in this link (https://github.com/mrdoob/three.js/releases/tag/r69). If you want a working example of animated models try/look at the files in examples/models/skinned, these load properly. the marine_anims.js file has a few animations. I was unaware of the underscore causing issues with morph anims, I'm not entirely sure why its messing things up but ill investigate.

for the 2D/3D projection thing, there's no built-in method to get the view-space coordinates or projection matrix. Generally that's supposed to be what you use Q3D sprite for.

If you know javascript/sdk you can modify Q3D easily enough to give you what you need, just look at the tick2 function for Q3D bone where the debug text is displayed and you can add some new expressions that use a similar process. I'll look into adding it for the final update i'll do, but no word on how long that'll be.

Q3D isn't going to be undergoing any updates for a long time though, it's already grown way larger than I had intended it to when i made it 2+ years ago. There's a build I've yet to release that moves to a slightly newer version of three.js and fixes some bugs but that's incomplete, and after that there wont really be any more updates. It was never meant to be a full-blown game engine with all the features and UX of something like Unity, and frankly it can't become much better because of the edit-time SDK limitations of construct 2. Originally it was just meant as a simple way of getting 3D graphics to display with WebGL in a construct 2 project, and now it's got features like physics, collision checking, animation etc which I literally spent a whole year and a half researching/optimizing/refactoring. There isn't much more I can do to improve it which is worth my time, You shouldn't be using Q3D for a large scale 3D game where an engine like unity would be much better suited and have improved workflow, you should use it if you need some 3D touches to your C2 game, or want to make a simple 3D game like the tiny tank demo.


Thats the thing though - without being able to have objects from q3d collide with objects from c2- you are quite limited as the two engines cant communicate fully. The q3d sprite has no collisions. Sounds like a basic thing that anyone can do by editing your java files- but i dot have the knowledge of your api or java experience.

I wanted to use 3d graphics for my 2d rhytm game, and this pretty much killed it. You cant even get the 2d coordinate of a 3d object
B
40
S
15
G
4
Posts: 426
Reputation: 5,843

Post » Thu Jun 23, 2016 9:32 pm

Is there a right way to get a 3dsprite moving around a crocotile 3d environment? I have a test model and a set camera i'll adjust later, I'm just struggling to get the 3dsprite(set up to represent an 8 dir sprite relative to it's angle and camera angle to it) moving around with collision and i guess gravity?

I can post some pics if this is too rough.

Thanks in advance!
B
9
S
3
G
5
Posts: 14
Reputation: 4,682

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 6 guests