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

Post your completed addons to share with the community

Post » Tue Jul 14, 2015 4:58 pm

@brent_hamel ,
Are there sprites behind the model? Sprites won't show up behind models with transparent bits.
If they are models behind the models, are their position further away from the camera? If they are the same position as the model with transparent bits, the model without transparent bits might not show(because the camera may not know which one to render first based on distance from camera)..
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Tue Jul 14, 2015 9:49 pm

Prominent wrote:@brent_hamel ,
Are there sprites behind the model? Sprites won't show up behind models with transparent bits.
If they are models behind the models, are their position further away from the camera? If they are the same position as the model with transparent bits, the model without transparent bits might not show(because the camera may not know which one to render first based on distance from camera)..


Probably just easier to show you what I mean...

http://tinyurl.com/nftbsk3

There's a starfield sprite on a 2D layer underneath the Q3D viewport layer in C2, and regardless of models in the viewport, if the materials have transparency (as these do) they show through the entire viewport.

(also if no "slimes" appear in the game world, just refresh until they do, they're the transparency culprits, but have a very low chance of not spawning)
B
70
S
10
G
9
Posts: 300
Reputation: 8,962

Post » Tue Jul 14, 2015 11:03 pm

@brent_hamel , hmm I don't know how to fix that. Maybe @QuaziGNRLnose knows how? I'd be interested too since that seems like an important thing to get working correctly.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Tue Jul 14, 2015 11:52 pm

@brent_hamel , @QuaziGNRLnose
I found this link that talks about the issue: https://github.com/mrdoob/three.js/issues/4724
It mentions disabling Alpha blending and using Alpha Testing, which I think may be a solution, but I'm not sure how it applies in Q3D. Maybe Quazi can let us know how to disable alpha blending and adjust the alpha testing to solve the issue? I saw there is an action to adjust it, but it requires a material name- and I'm not sure what name to use (how to get material name a model is using).
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Wed Jul 15, 2015 4:47 am

@brent_hamel


Not a bug, its an important feature for performance. To get proper transparency you need to change the material property for "transparency" to "on/enabled" so that q3d knows it must do special sorting. You can set this in the properties or by using the set opacity action.

Most objects lack transparency so itd be slow for this to be the default.
B
78
S
13
G
8
Posts: 1,975
Reputation: 9,920

Post » Wed Jul 15, 2015 4:58 am

@QuaziGNRLnose , what if all your objects use transparency? Is there a way to use the alpha test?
also, setting transparency on doesn't fix the issue.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Wed Jul 15, 2015 5:32 am

Agreed, the effect as seen in my link has transparencies enabled for the material
B
70
S
10
G
9
Posts: 300
Reputation: 8,962

Post » Wed Jul 15, 2015 7:36 am

@brent_hamel , @QuaziGNRLnose
Okay I found a fix.
In the runtime.js of the Q3D Model, on line 3796 there is a typo;

this.mat.alphatest = alphatest;

It should be a capital T, like so;

this.mat.alphaTest = alphatest;

I also re-enabled the action in edittime.js on line 244;
changed
af_deprecated
to
af_none

Then I used the action to set the alphatest value to 0.5 on the model
I also set the transparency OFF as well on the model.

This should fix your issue @brent_hamel

Apparently judging by this comment in the edittime on line 241;
// these two weren't really having any effect in webgl renderer, so they're deprecated
You must have overlooked a typo, @QuaziGNRLnose , which is why it appeared not to be having any effect.
So if you fix the typo it will work again.
B
45
S
21
G
65
Posts: 1,118
Reputation: 38,227

Post » Wed Jul 15, 2015 8:21 am

I wonder: is there any documentation explaining what all the variables of a 3D object stand for (Rz, Sx etc.)?
B
7
S
2
Posts: 24
Reputation: 567

Post » Wed Jul 15, 2015 4:31 pm

Prominent wrote:@brent_hamel , @QuaziGNRLnose
Okay I found a fix.
In the runtime.js of the Q3D Model, on line 3796 there is a typo;

this.mat.alphatest = alphatest;

It should be a capital T, like so;

this.mat.alphaTest = alphatest;

I also re-enabled the action in edittime.js on line 244;
changed
af_deprecated
to
af_none

Then I used the action to set the alphatest value to 0.5 on the model
I also set the transparency OFF as well on the model.

This should fix your issue @brent_hamel

Apparently judging by this comment in the edittime on line 241;
// these two weren't really having any effect in webgl renderer, so they're deprecated
You must have overlooked a typo, @QuaziGNRLnose , which is why it appeared not to be having any effect.
So if you fix the typo it will work again.


That definitely solved it!!! Awesome job, and thanks so much!! That should be a quick fix for Quazi! The C2 community is kinda the best imo :)
B
70
S
10
G
9
Posts: 300
Reputation: 8,962

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: luvleggs and 0 guests