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

Post your completed addons to share with the community

Post » Tue Mar 21, 2017 10:46 am

@tunepunk

Nice! :)

I'm using both .obj and three.js .json files in my project. I found that .json worked better for terrain because I could import materials and textures as part of the .json file, but I had a little easier time with .obj files for anything that I needed to reskin (i.e. same wheel, different color).

Also, the .json files were coming in with lighting information prebaked, which looked weird as the sunlight shifted in the scene. I'm sure there is a solution to this problem, but I eventually ended up just leaving the sunlight where it was and living with it.

Do you know if Maya LT has a three.js exporter available? Are you finding that it does what you need it to do (as opposed to the full version of Maya)? I'm considering looking at it because our students are trained in Maya and I was hoping to at least be familiar with the program.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
50
S
15
G
25
Posts: 424
Reputation: 17,296

Post » Tue Mar 21, 2017 11:11 am

@cjbruce Yes I've been using Full Maya for 15+ years, but when it comes to game development Maya LT is enough. The only thing Maya LT lacks is renderer, (which you probably only need if you're doing cutscenes, or movies and stuff like that). It has a built in shader builder as well, that supports PBS etc.

Maya LT is pretty much just a bit slimmed down version of Full Maya, and targeted for indie game developers so it should be fine.
I'm pretty sure there is a three.js exporter for Maya LT but i havn't tried it.

Found this link though, so it seems three provides exporter.
http://stackoverflow.com/questions/15117186/maya-export-to-three-js-json

Currently my next step will be to clean up some meshes to use my current models with Q3D, and as I'm not using any advanced shaders, the only thing i will bake is Ambient occlusion in the textures, as I'm going for a flat shaded look.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345

Post » Fri Mar 31, 2017 4:08 pm

@QuaziGNRLnose Every time I try to use a json model file with animations I get this error message. Do you have any guide on how to import animations? I'm using clara.io to generate the json file. Is you plugin using an old deprecated version of Three? Any help appreciated.

Need help on how to import animations.

This is the error message I get.
Image
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345

Post » Sat Apr 01, 2017 1:02 am

@Tunepunk

It uses version 71.

I'm pretty sure they made some change to the file format, you'll have to use the old blender exporter in the 71 .zip file until I update.

https://github.com/mrdoob/three.js/releases?after=r72

There should be the relevant exporters in "three.js-master\utils\exporters"

Because of the way three.js is maintained, it makes it very difficult to continually update the version because of massive breaking changes each revision introduces that require large amounts of code to be rewritten.
B
79
S
13
G
8
Posts: 1,976
Reputation: 9,947

Post » Sat Apr 01, 2017 2:11 am

@QuaziGNRLnose Thanks, I managed to get the animations working with the maya exporter. Now I only need to figure out how to have multiple animations in one json file, for tweening/animation blending. could you provide new links to examples as dropbox links are broken? I want to check out mobile morph demo, and get some more insight how to optimize for mobile.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345

Post » Sat Apr 01, 2017 1:12 pm

I managed to solve it. It was pretty easy. I exported a json file with all the animations in one long animation. Then I just opened edited the json file and renamed the frames. frame1-4 idle, frame 5-9 walk, frame 10-13 death etc etc.

"morphTargets": [{
"name": "frame_1", < this was the only thing I hade to rename in the json file to have multiple animations. frame_1 was renamed to walk_1 etc etc.

Might be useful for anyone who is using an exporter that doesn't support multiple animations. Renaming the different frames is enough.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345

Post » Sat Apr 01, 2017 3:24 pm

@tunepunk

Nice!

3D is pretty taxing for mobile, but the best way to get increased performance is to avoid bone based animations and use morph targets (these run almost entirely in shaders so they can be quite fast), and to cap the resolution to something lower than the native screen resolution (in Q3D Master) since mobile GPUs lack the performance to keep up.
B
79
S
13
G
8
Posts: 1,976
Reputation: 9,947

Post » Sat Apr 01, 2017 10:01 pm

I managed to get about 40-60 fps now on pretty old midrange phone. with shadows on. with a bit lower resolution. A bit of tricks and optimizations I can probably get it a bit higher. A have a quistion about the raycaster, I can't direct it in any angle? or do i have to parent it to another object?
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345

Post » Sun Apr 02, 2017 4:45 pm

@tunepunk

You can't direct it using euler angles, however you can set a direction with an XYZ vector which is essentially the same thing. You can use a dummy Q3D point, or the Q3D model you want it to rotate with it, e.g. if you want to specify euler angles set the raycasters direction to x,y,z=Q3Dpoint.nTx,Q3Dpoint.nTy,Q3Dpoint.nTz. and it's position to the object position. Just make sure its on an objects that isn't a child of other objects.
B
79
S
13
G
8
Posts: 1,976
Reputation: 9,947

Post » Mon Apr 10, 2017 1:39 pm

tunepunk wrote:I managed to solve it. It was pretty easy. I exported a json file with all the animations in one long animation. Then I just opened edited the json file and renamed the frames. frame1-4 idle, frame 5-9 walk, frame 10-13 death etc etc.

"morphTargets": [{
"name": "frame_1", < this was the only thing I hade to rename in the json file to have multiple animations. frame_1 was renamed to walk_1 etc etc.

Might be useful for anyone who is using an exporter that doesn't support multiple animations. Renaming the different frames is enough.


@tunepunk

Would you mind posting a quick breakdown of your workflow from Maya to Q3D for morph animations? I'm working with an artist now, and we need to go from Maya bone animation to Q3D morph animation for midrange mobile devices.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
50
S
15
G
25
Posts: 424
Reputation: 17,296

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest