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

Post your completed addons to share with the community

Post » Wed Jan 04, 2017 4:48 am

Badmiracle wrote:@QuaziGNRLnose
Is there a simple demo on how to get a 3D character model (w/ walking animations) to work in a 2D environment?

I couldn't find anything like this in the tutorials.

So in a 2D environment the camera angle on the 3D character model would be locked to a diagonal view, the actual Player object will be a 2D invisible sprite that moves, and the 3D model will just position itself on top of this invisible sprite at all times - so 3D character model would be for appearance only.


There's no tutorial, you'll have to create a Q3Dmodel, bones/animations etc. and position it in a location with a transparent Q3D master using "inside mode", then move a camera to the proper location to line up all the views. This is also limited in that you'll have to have all 3D elements on the same "layer" in the 2D environment. It'd be better to build the game using Q3D models/sprites etc and make Q3D handle the rendering, if you wanted more control and simpler set up. If it's too late to do this, you can only go for the "single 3D layer".
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

Post » Wed Jan 04, 2017 2:10 pm

fuego96 wrote:
The only problem is that, it works if your Q3DMaster camera position is static. You'll have to account/calculate the new screen space manually when the camera moves, which I guess you're probably already aware of :-)


@fuego96, thanks for looking into this! I do have a camera that pans around, changes direction, and moves in and out to follow the characters, so I was having a tough time determining what the .xw and .yw expressions were actually giving me. Maybe when I'm done with this project I'll take another crack at the math.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
48
S
14
G
24
Posts: 409
Reputation: 16,666

Post » Wed Jan 04, 2017 6:27 pm

Badmiracle wrote:@QuaziGNRLnose
Is there a simple demo on how to get a 3D character model (w/ walking animations) to work in a 2D environment?

I couldn't find anything like this in the tutorials.

So in a 2D environment the camera angle on the 3D character model would be locked to a diagonal view, the actual Player object will be a 2D invisible sprite that moves, and the 3D model will just position itself on top of this invisible sprite at all times - so 3D character model would be for appearance only.


@Badmiracle,

Since you are just using the 3D model for appearance only, could you pre-render your 3D animations, then import them into a 2D sprite strip in Construct 2? There are a number of good tutorials on this, and you will save a lot of CPU time (at the expense of download time and memory).
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
48
S
14
G
24
Posts: 409
Reputation: 16,666

Post » Thu Jan 19, 2017 8:14 pm

Hi,

has anyone figured out the following yet:

Objects involved:

Image

Q3DModel applied 0.5 (or any) opacity, Q3DSprite is behind the model, desired render:

Image

Render outcome instead:

Image

Long story short, the sprite doesn't blend well with the model in front, actually it's more like destination over or something.
Note that alphaTest = 0.5 works fine, but I need to blend both object types with this z-order correctly. Think of particle sprites spawned behind a glass wall, for example.

Thanks & cheers!
Image
B
18
S
6
G
1
Posts: 122
Reputation: 2,055

Post » Sat Jan 21, 2017 6:49 am

Colonel Justice wrote:Hi,

has anyone figured out the following yet:

Objects involved:

Image

Q3DModel applied 0.5 (or any) opacity, Q3DSprite is behind the model, desired render:

Image

Render outcome instead:

Image

Long story short, the sprite doesn't blend well with the model in front, actually it's more like destination over or something.
Note that alphaTest = 0.5 works fine, but I need to blend both object types with this z-order correctly. Think of particle sprites spawned behind a glass wall, for example.

Thanks & cheers!


This is a standard problem with alpha in 3D rendering. you can get around it by playing with the depth settings (depthTest and depthWrite).
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

Post » Sun Jan 22, 2017 7:03 pm

QuaziGNRLnose wrote:
Colonel Justice wrote:Hi,

has anyone figured out the following yet:

Objects involved:

Image

Q3DModel applied 0.5 (or any) opacity, Q3DSprite is behind the model, desired render:

Image

Render outcome instead:

Image

Long story short, the sprite doesn't blend well with the model in front, actually it's more like destination over or something.
Note that alphaTest = 0.5 works fine, but I need to blend both object types with this z-order correctly. Think of particle sprites spawned behind a glass wall, for example.

Thanks & cheers!


This is a standard problem with alpha in 3D rendering. you can get around it by playing with the depth settings (depthTest and depthWrite).


Thanks. I was hoping that there was an out-of-the box approach. Disabling depth writing helps, but still renders the sprites on top of the geometry. I probably will have to render 2 passes, first sprites, then geometry.

Talking geometry, is there a quick way to access ExtrudeGeometry? I'd like to use this to draw a 2D polygon, then feed the vertices to the function and create a 3D shape. Right now there's only primitive shapes for creation in Q3DMaster.

Cheers!
Image
B
18
S
6
G
1
Posts: 122
Reputation: 2,055

Post » Sun Jan 29, 2017 12:42 pm

Just thought I'd post this thing here since it uses Q3D.
https://www.scirra.com/arcade/other-gam ... gain-15356

Image


Long story short, I found a rather simple way to mod the Scirra audio plugin to play MP3's from another site. For folks who are interested, the long story is in this forum thread.
https://www.scirra.com/forum/viewtopic.php?f=146&t=80373&start=10

Enojy.
Last edited by fuego96 on Sun Feb 12, 2017 8:03 pm, edited 3 times in total.
I don't need a better iPhone, I need to be better.
B
26
S
10
G
20
Posts: 68
Reputation: 11,913

Post » Fri Feb 03, 2017 6:55 pm

@QuaziGNRLnose One question,

Q3D imports .JS and the textures are added in the C2 object as animations like diffuse, normal,etc... working also the frames for texture animations, but they also will works for .OBJ/.Mtl? Played the OGRE and the FPS thing and they use .js.

And if an OBJ-JS use multiples textures for the diffuse, etc... , How i can set it to the model? I not found any .doc or example that how do it.
B
24
S
10
G
3
Posts: 558
Reputation: 4,493

Post » Sat Feb 04, 2017 7:16 am

@matriax

Loading materials regardless of model filetype is done the same way: using specially named animations.

You can find a list of the animation naming that is supported in the (incomplete) documentation : https://www.dropbox.com/s/vpn0mbh4m7lo9 ... .docx?dl=0

.mtl files aren't really supported, and material info in .js files is poorly supported as well. This is because of poor standardization, there's no "useful" way to support them since material properties generally don't operate under some standard shader model across all platforms, so they're not very useful in Q3D / three.js.
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

Post » Tue Feb 14, 2017 9:42 am

QuaziGNRLnose wrote:@matriax

Loading materials regardless of model filetype is done the same way: using specially named animations.

You can find a list of the animation naming that is supported in the (incomplete) documentation : https://www.dropbox.com/s/vpn0mbh4m7lo9 ... .docx?dl=0

.mtl files aren't really supported, and material info in .js files is poorly supported as well. This is because of poor standardization, there's no "useful" way to support them since material properties generally don't operate under some standard shader model across all platforms, so they're not very useful in Q3D / three.js.


@QuaziGNRLnose,

This documentation is fantastic! Yes, it has sections that are not finished, but everything is extremely clear and well-written! I recommend including it on the first post of the thread.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
48
S
14
G
24
Posts: 409
Reputation: 16,666

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests