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

Post your completed addons to share with the community

Post » Thu May 07, 2015 2:23 pm

@blurmind

Things are layed out in orthographic topdown/sideview. Documentation is currently being written but there are capx examples that demonstrate basics for users. As for the naming im not aware of anything else but someone may have picked the same name after me since i get some vr thing released around fall 2014 if i search q3d.

@juicy

As stated, im working on docs now since development on core features has only recently finished. Because this plugin invariably has many features i waited till this point since earlier on docs would have needed a significant rewrite multiple times. Documentation im working now i substantial and covers all features.
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

Post » Fri May 08, 2015 4:25 am

Is there any way that I could link a sprite from C2 to a diffuse texture?

I want to have some animated textures on planes and would be so convenient if I could use C2's animation system instead of eventing my own.
I'm also planning to reuse the sprites for a more precise collision system, so if I could link those it would be perfect.
Scirra Employee
B
153
S
53
G
17
Posts: 710
Reputation: 17,825

Post » Fri May 08, 2015 5:20 am

@Animaniac

I knew that'd be convenient so the Q3D object already supports an almost exact clone of the C2 animation system for all map types, so there's no reason for a workaround to do that (it would be really slow to have to pass the data like that so it's not doable any easy other way than being integrated really)!

it's a bit tricky in one little way to get initialization to work properly, but it's not hard:

Just name an animation "DiffuseMap" and have that as your "default" (it can be empty and 1x1 if you REALLY hate the name "DiffuseMap", but it needs it for a workaround a construct limitation with properties). This will give your object diffusemaps and you can use it like a sprites animation (add more frames, set the speed/looping/etc.)

If you want additional "diffuse maps" for animations afterwards you can name them anything basically, and then theres a "set map animation" action (it's called something like that i'm not in a place i can check for sure now). You choose "Diffuse" for the "Map type" you ant to affect and then you can change the anim to any name from there. There's a lot of actions like that which are the "same" as what sprite has with the addition of a drop down that has an option for the map type to change the animation of (since you can have animated diffuse/light/spec/env/bump/normal maps, so you need to specify which you want to refer to). There's even all the conditions etc.

I hope that's good enough!

So basically:

create an animation called "DiffuseMap" to say "hey my model has diffusemaps!"

then create additional animations like you would for a sprite "Run", "Jump" etc. whatever you want

then proceed like you would with a sprite, except always choose "Diffuse" for the "Map" so you can tell Q3D "the animation is for this specific map" since the different maps can all be animated.
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

Post » Fri May 08, 2015 8:10 am

Hmm, I was trying to avoid having duplicate textures for the C2 Sprite (for polygon collision testing) and again for Q3D rendering. But if it's not possible to pass a sprite texture I guess there's no way around that. The idea is to detect a rough 3D collision with Q3D and then get a more accurate test by positioning equivalent C2 Sprites outside the screen and use the 2d polygons for precision. *Imagine a tree placed on a quad and detecting only where the trunk and branches are as solid.

So if I understand correctly you are suggesting to use a Q3D Model that has support for animation, right?
I was previously creating planes by using just the master. So is there a way to set a Q3D Model to a plane primitive or the only way is to create and load a plane model?
Also it seems the Q3D Sprite would be more appropriate for what I'm trying to achieve, but it always face the camera. Is there a possibility to add an option to make it render in it's 3D orientation?
Scirra Employee
B
153
S
53
G
17
Posts: 710
Reputation: 17,825

Post » Sat May 09, 2015 2:58 am

@animaniac

Yea i can see duplicating being annoying but i sadly can't make the sharing work quickly because of the way C2 and my plugin use different canvas contexts, doubly prevented by the fact the sdk doesn't make these types of things too easy (theres no convenient way to share it). I'll look into ways to hack around it if possible but i don't have too much time to make big changes atm.

Even if you have duplicate textures, i think (you'd have to ask Ashley to make sure) that on export C2 detects duplicates and doesn't make copies, so file size would be the same, the only disadvantage is the annoyance of importing twice while working.

you don't need to do anything extra for q3d model to have animated textures as i explained, it just animates it if there are multiple frames / animation speed etc.. you can even change animation for the map types like you would sprites.

I could add a Q3D sprite option for a plane, but the issue is it becomes kind of redundant since it can be done with Q3D Model already, and it can interact with lights and have normal maps on top of that so it's just all around better to use, if you dont want lighting you could just select "basic" as the material type.

If you don't want to create a plane model (although you could just do this once anyway), theres a "advanced" feature i talk about in the recent changelog that you can use to create a plane geometry internally to use. Just make an action for q3d master that creates a plane using the "plane" action in the 'geometry' section, choose a name like "MyPlane" for the geometry, then on a q3d model using it's property for "model filename", the same way you'd load a model write "MyPlane.geom" and it'll load a plane (or whatever type of geometry you have) the ".geom" tells it the name is an internally created geometry. you can use this to load any of the stuff you can create using the actions in the section, which can come in handy for mocking stuff up quickly without opening > exporting etc.

If im not clear enough please let me know! i'll do my best to help.

A lot of these features aren't obvious but im trying to work on documentation that covers everything :)
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

Post » Sat May 09, 2015 3:59 am

It's great to know that it's possible to load a geometry from the master. I guess I missed it from the changelog.

Thanks for the support, it was very useful!
Scirra Employee
B
153
S
53
G
17
Posts: 710
Reputation: 17,825

Post » Sat May 09, 2015 8:25 pm

So I tried to follow your suggestions and had a hard time making it work with a plane. A cube worked flawlessly but not a plane.
In the end I was able to solve it and discovered a bug. Technically is not a bug, but it's an unexpected behavior that could be improved.

Here's a capx that demonstrates the problem: q3d-fit-bug-A01.capx

- Try to run the preview. You will see the cube textured rotating as expected.
- Then enable the create plane event, disable the create cube and preview again. The plane will not show up.

To make it work you need to change the Model Fit to Fit X or Y. Apparently it tries to fit the Z of the plane that technically has no Z dimension.
It would be better if the Model Fit "Fit" ignored the Z of flat geometries like planes and circles, so it doesn't disappear unexpectedly.
Scirra Employee
B
153
S
53
G
17
Posts: 710
Reputation: 17,825

Post » Sun May 10, 2015 9:37 am

QuaziGNRLnose wrote:@kmsravindra
i'll upload a minor update at the end of the week or something that fixes this and some other little bugs i've found


Any luck with this so that I can prepare to release my version. Thanks a lot!
For game development / IT services contact - [email protected]

List of published iOS apps -
https://itunes.apple.com/us/artist/ravi ... d693234511
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Sun May 10, 2015 12:26 pm

@QuaziGNRLnose

Are you planning to make a support for mobile devices??
B
33
S
11
G
2
Posts: 197
Reputation: 3,587

Post » Sun May 10, 2015 4:16 pm

@kmsravindra

Should be soon but im still busy with personal matters

@norman74

Q3d should work on mobile browsers already. Cordova breaks model loading, but the plugin otherwise works (oddly enough) and ive been unable to find out a way to fix it, but ill try to take another look.
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: gonzdevour and 2 guests