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

Post your completed addons to share with the community

Post » Tue Dec 22, 2015 8:53 pm

Polygallon wrote: * The expression in "Q3D Master: set background color" flips the R and the B values. So if you assign the RGB value to be rgb(255,0,0), the result will be pure blue.

Heh, I noticed this too.. I must admit it took a few bewildered head scratches before I realized it!
B
40
S
21
G
18
Posts: 153
Reputation: 12,308

Post » Wed Dec 23, 2015 2:33 am

@polygallon

Collision support is about as developed as it will get, I don't see any extra primitives being implemented for performance reasons. Collision "meshes" are too computationally expensive in JS, and wouldn't really be viable in a game. Already the collision system is difficult to get good performance out of, and it's pretty highly optimized with spatial hashing.

You can get away with compound objects if you need more complicated collision structures, but you'll have to set it up in construct for the regular colliders. The oimo behaviour however does support compound structures you can setup through events, although it can be pretty tricky to work out positioning the pieces at first. I've gotten chairs and tables and stuff to be built this way, and the capsule collider is actually a compound object as well!

In my latest build i've made small additions to the oimo behaviour so that you can check and retrieve information about the contacts / collisions, they should help if you need to retrieve things like penetration depth and normal etc.

Thanks for pointing out the color thing! must have slipped past me. three.js and construct use inverted RGB hex representations or something so this can annoyingly happen if i haven't explicitly fixed it. It used to be that ALL color setting actions had that issue.
B
75
S
13
G
8
Posts: 1,973
Reputation: 9,841

Post » Wed Dec 23, 2015 8:48 pm

QuaziGNRLnose wrote:Collision "meshes" are too computationally expensive in JS, and wouldn't really be viable in a game. Already the collision system is difficult to get good performance out of, and it's pretty highly optimized with spatial hashing.

Alright, well, I guess that makes sense.

QuaziGNRLnose wrote:The oimo behaviour however does support compound structures you can setup through events, although it can be pretty tricky to work out positioning the pieces at first.

I'd say. This is where I am having most trouble atm and where mesh colliders would help immensely. Making complex collision structures would be a whole lot easier if the model didn't keep offsetting itself, trying to center into the middle between every collision shape added - even when the model's fit and center settings are at "unaltered". I don't want to be stuck nudging fractions, and adding unnecessary collision shapes to offset every other collision shape, just to make a complex model work. Is this easily fixed? Is there a viable work-around? Is there already a setting for this to stop? I'm asking since I am essentially stuck because of this.

Additionally, being able to access information about the collision shapes themselves would also be nice. Expressions such as " Get shape X size of 'DefaultShape0' " and the like. Maybe even loops like "For every collision shape" although that's not as necessary.

QuaziGNRLnose wrote:(...) and the capsule collider is actually a compound object as well!

Interesting. I was wondering why I couldn't assign the height of the capsule collider, turns out it's probably because it's a hardcoded cylinder with two spheres. Aight'.

And no worries about the color thing ;)
I await the next update with high hopes!
B
7
S
1
Posts: 21
Reputation: 475

Post » Sat Dec 26, 2015 1:51 pm

Okay! I got layout-switching and all that working without any graphical issues. I guess the only weird bug I am experiencing now is that the gravity keeps changing every time I try to restart a layout in-game. Here's a prototype I've been working on if anyone wants to check it out (use a gamepad or arrows+z/x/c).
B
40
S
21
G
18
Posts: 153
Reputation: 12,308

Post » Sun Dec 27, 2015 8:01 pm

Hey @QuaziGNRLnose or who can help and really knows what i might gotten wrong.... so ... im doing a new game to bust some time off.... ehm... got a few problems... 2 of them actually... so i have this low poly models.... exported as json and obj ... but for some reason when i use Phong material to be able to show the diffusemap and other textures... it just loads a empty object... is there the collision box adjusted everything loads perfect... just its invisible... however if i switch to normal material... then it shows but its pink green etc all sorts of colors did i missed something to export in the blender? or is it a object issue? il add the models link bellow

2nd issue i have... when i restart layout... the game doesn't load anymore... the progress bar appears but q3dmaster seems to be frozen or it takes to long to load... im using same logic used on the morph animation example... it should load perfect... not sure why is getting stuck...


Link for 3d models that shows only with normal :

https://drive.google.com/folderview?id= ... sp=sharing

have to mention... the Rocks 1 2 and 3 json do have the right size as MB specifically on a normal phong material supporting model.... but the ship.obj/json.... for some reason exports to small... im guessing is not exporting the right vertices? not sure how they are called however got an other model and that one works... but i need the ship and the rocks... its kinda pointless having the pretty graphics but those being weird debug looking...

im using c2 219 beta 64 bit version ...


OFF TOPIC : @QuaziGNRLnose sry for asking so many times directly on u... the support u have given so far is way more then was supposed to be... but im only asking cause i feel your plugin is part of my "familly" and with it u 2 :D c2 +q3d wouldn't have it one without another ... :D


Edited : i solved the problem with the material not being visible ... however the other issue where on restart of layout or even if i go to menu after game over or something like that and then come to load the game ... nothing loads ... am i missing something ?
Last edited by gamecorpstudio on Tue Dec 29, 2015 8:19 pm, edited 1 time in total.
B
70
S
20
G
67
Posts: 1,314
Reputation: 42,301

Post » Tue Dec 29, 2015 3:11 am

Polygallon wrote:*Unnecessary comments about struggles regarding the apparent unavoidable instability and finickiness of multiple collider shapes*

Pardon, I've worked on my project now over the holidays and constructed a semi-reliable work-around.

In past posts I may have asked for redundant features to this plugin that could be achieved otherwise or weren't exactly necessary for the scope of Q3D. However, despite my forthcomings, there is yet one more thing I urge you to consider adding in regards to Oimo collision shapes - while still respecting your previous statements about it.

In terms of Oimo colliders - we've already got cubes, spheres, cylinders and (composite) capsules. I would also like to see slopes on that list. They'd scale much like cubes - and in theory they should also be less expensive than cubes, correct? Should be less expensive than cylinders anyhow. Slopes would be greatly useful for developing platformers, racers, the "physics ball" type games, some far-fetched abstract low-poly fps ... anything really that could benefit from ramps. So, may there be slopes in the future?

Lastly, happy holidays (or happy continuation as we say it where I live) to everyone here! :)
B
7
S
1
Posts: 21
Reputation: 475

Post » Tue Dec 29, 2015 8:16 pm

Polygallon wrote:....... I would also like to see slopes on that list. They'd scale much like cubes - and in theory they should also be less expensive than cubes, correct? Should be less expensive than cylinders anyhow. Slopes would be greatly useful for developing platformers, racers, the "physics ball" type games, some far-fetched abstract low-poly fps ... anything really that could benefit from ramps. So, may there be slopes in the future?

Lastly, happy holidays (or happy continuation as we say it where I live) to everyone here! :)


slopes there is no need for them ... u can take a cube resize it and change its angle .. and thats a slope :) if im not talking of a different thing
B
70
S
20
G
67
Posts: 1,314
Reputation: 42,301

Post » Tue Dec 29, 2015 11:50 pm

gamecorpstudio wrote:slopes there is no need for them ... u can take a cube resize it and change its angle .. and thats a slope :) if im not talking of a different thing


Yeah, I thought so too, turns out there's a lot of fidelity to a slope made like that - especially if you're trying to make something tile-able. It's not enough to turn a Q3D Model with a box collision shape 45 degrees on the X or Z axis and call it a day. Overall, it's just a nice and helpful thing to have as a collision shape. I wish I knew javascript so I could add it into the Oimo behavior myself or something, but sadly that's not the case. If it is overlooked, well, then I guess the next development stage for me is filling out tables of rotation and position offsets for ca 40 differently scaled feign-slopes through trial and error... Which kinda reminds me about the concept of eating sand.
B
7
S
1
Posts: 21
Reputation: 475

Post » Wed Dec 30, 2015 2:02 am

anybody got huge json files when exports from blender animations? im talking above 20 mb files .... if not can u give me a hint how to export them properly? or is a possibility of adding .dae files? seems their pretty compressed on a 100 frame animation
Last edited by gamecorpstudio on Wed Dec 30, 2015 6:30 pm, edited 2 times in total.
B
70
S
20
G
67
Posts: 1,314
Reputation: 42,301

Post » Wed Dec 30, 2015 6:49 am

@polygallon

slopes aren't a bad idea, but adding a collision shape to the physics engine is actually *VERY* complicated and something I'm not sure I could figure out anytime soon (adding cylinders was a huge pain, and they're actually a simple shape compared to a ramp) Its not something you could do just by knowing javascript. You could just create sprite dummies in the layout that create the proper sloped boxes when they're created, and then get destroyed, instead of filling out tables(?).

Image

Something like this?
B
75
S
13
G
8
Posts: 1,973
Reputation: 9,841

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests