Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, EternallyCurious, howardR, 1 invisible), 623 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
CCT PhysX 2.0 #457618
01/24/16 20:24
01/24/16 20:24
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
UPDATE!

Simple cct (character controller) made with PhysX (SDK 2.8.4) plugin.
I've modified ackphysx.dll community version plugin, to get more PH_CHAR features.
Tested on several machines, it should work out of the box!
This template works only with CAPSULE hull! I don't recommend using BOX hull!

It currently supports:
Quote
It currently supports:
- collision masks (GROUP_NON_COLLIDABLE, GROUP_COLLIDABLE_NON_PUSHABLE, GROUP_COLLIDABLE_PUSHABLE)
- pXent_updateCharacterExtents for crawling/standing
- pXent_setCharacterSettings for changing skinWidth, stepOffset and slopeLimit for all ccts
- gravity + jumping
- inertia
- sliding on slopes
- 3d camera with collision detection and zooming
- kinematic platform (following the path) + elevator (moving to target position and back)
- added helper functions to check, if props have smashed the cct
- terrain support

Known issues:
Quote
- cct can (rarely) fall through kinematic elevator, if it's moving upwards and cct is falling on it
- problems with normal detection (can be seen in the video), on polygon edges normal.z can't glitch... this causes some weird movement on slopes if sliding is enabled, to void this problem, disable sliding also in screenshot folder you can see that 'Use Tesselation' flag in Map Compiler makes even more polygons/edges thus that will cause a lot of jittering on slope movement (cause on edges normal.z goes beyond the slope limit - can be seen in video)


You can see cct in motion on my youtube channel:
https://youtu.be/mfTzt57JoAw

HOW TO USE ?

There are lots of limitations to this movement template, mainly caused by physX itself (old SDK).
But by learning how the demo scene is made and setup you'll be able to get (more or less) suitable results.
Quote
- Mainly I would advice to keep the same size and don't increase/decrease world scale! Currently 40quants = 1 meter, NPC is 64 quant height.
- To make sure that correct .dll was loaded, there is a function called ackphysxHelloWorld();
- To make slope slidable, set it's FLAG8 in WED

CREDITS:
Quote
- original physX plugin was made by Chris Kahler
- based on ackphysX community plugin by Christian Behrenberg aka (HeelX) https://sourceforge.net/p/a8physx/home/Home/
- prototype.wad by Damocles (can be also found in AUM 100)
- elevator and platform sounds are taken from Freedoom project https://freedoom.github.io/ https://github.com/freedoom/freedoom
- crate model from old Newton plugin demo which was made by thomas oppl in 2007 (unfortunately I don't know who made the model itself)


Download link:
https://github.com/3RUN/Acknex-CCT

Screenshots:
[Linked Image]
[Linked Image]
[Linked Image]

If any bugs will be found, report them. I'll try to fix them in my spare time. Any feedback is (as always) welcome.

Best regards.

Last edited by 3run; 05/31/20 10:24.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CCT PhysX 1.0 [Re: 3run] #457623
01/24/16 22:06
01/24/16 22:06
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
To make you understand why I'm having difficulties with implementing crawling... CCT doesn't change it's hull like usual entities in Acknex do, first of all I need to unregister and register CCT back in physX everytime I change it's size (when I go crawling and back to standing, with physX 3.x you don't need to do this, but native Acknex physX is only 2.x), plus when I lower 'max_z' to decrease the size of the bbox, CCT instead of lowering the upper 'max_z' only, makes the whole hull smaller, take a look at this screens:
Quote:
Standing (max_x, y, z = 16, 16, 32):

Crawling (max_x, y, z = 16, 16, 5):
So the thing is, that I need to update the Z position of the CCT shape, but it's different to the one we see in the Acknex (model's position with it's bbox size). I found out that with the CCT setting that I have in my demo, I need to lower bbox model with 10.8 quants when I go to crawling (so it actually looks like only the upper side of the bbox goes down). In 3dgs_snakes plugin there was that nice function called 'pX3ent_getfootposition' which used to return the foot position of the CCT hull (independent to it's size, cause foot position did not change!), native Acknex physX misses such useful function... (maybe cause it's outdated, and 2.x SDK did not support things like this? hard to believe, but it might be the answer). Even after changing the Z position manually 'by hand', I found out that it ruined the whole gravity movement that I have... CCT just falls through the ground after going to crawling state and then back to standing. So currently I'm having some difficulties with all this crap (this is why I hate Acknex native physX! it's too outdated and not flexable, and I don't really want to mention all the bugs it has). Anyway I'll try to sort things out and handle this situation, then I'll realise updated version with crawling and some tweaks.

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CCT PhysX 1.0 [Re: 3run] #457691
01/26/16 17:38
01/26/16 17:38
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
That addition is pretty cool! I don't know crap about what you are coding, so to me it is pretty outstanding. Good luck with the workarounds.

Re: CCT PhysX 1.0 [Re: Steempipe] #457693
01/26/16 18:14
01/26/16 18:14
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Steempipe
That addition is pretty cool! I don't know crap about what you are coding, so to me it is pretty outstanding. Good luck with the workarounds.
Thank you very much, for your kind words and wishes! I have an idea for crawling, let's see how it's turns out. laugh


Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CCT PhysX 1.0 [Re: 3run] #457695
01/26/16 21:20
01/26/16 21:20
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
GREAT NEWS! I GOT CRAWLING TO WORK! grin

I used two different shapes (two different models, one for standing hull and one for crawling! it's almost same as pXent_addshape, but CCT!), and I switch between them while moving (each of those shapes have pointers and I have one main pointer, that 'points' to the current hull, this way I can handle movement, camera, animations and whatever!). Maybe tomorrow I'll upload a new demo, which will show all results!

Edit: my happines did not last for too long, cause somehow this little fuc*er doesn't fit this little whole... lubricant/vaseline didn't help here...

I guess most of community users who used to ask me "why don't I just use physX instead of OBB" now can see a materialized answer to their question. Problem is, that as far I as understood I need to keep stand and crawl hulls symmetrical somehow (32x32x64 and 32x32x32), other ways it will result falling trough ground crawl hull (maybe I could make some dirty workaround, but I'm really pissed off right now... and I don't really want to publish something dirty and too tricky to use at the end). Tomorrow I'll continue on copulating with lovely Ackenex and it's lustful physX...


Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CCT PhysX 1.0 [Re: 3run] #457703
01/27/16 11:57
01/27/16 11:57
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Keep up the good work!


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: CCT PhysX 1.0 [Re: alibaba] #457704
01/27/16 12:25
01/27/16 12:25
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Thank you! I already have an idea for workaround, let's hope it will work grin

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CCT PhysX 1.0 [Re: 3run] #457705
01/27/16 13:27
01/27/16 13:27
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
AND IT WORKS! grin

Here is a little demo (I'm still working on it, but the fact that I got swaping hulls correctly made me happy!):
Download link
Quote:
Press C or CTRL to toggle CRAWLING!
When everything will work correctly, I'll upload a source code.

Edit: shit... I faced another trouble, now with c_trace detecting the celling above the CCT. All troubles caused by the position of CCT hulls, cause I need to move crawling hull down (it's centered in MED) to match standing hull's lowest point, but when I switch to crawling hull (actually when crawling), then I need to update standing hull's positions, I do exactly the same but with positive value (for crawling hull offset from standing hull is -24, for standing hull offet from crawling hull is 24). This causes some shit for 'c_trace', even it actually looks correct (I debug from to positions of the trace via 'draw_point3d', and they are always the same, as it should be). Trace detects the celling at first when CCT only starts penetrating the hole in the wall (where CCT crawls in), then it doesn't see celling till CCT fully enters the hole. I don't know what to do with this right now. physX plugin from 3dgs_snake had very useful function called 'pX3ent_getfootposition' or something like this, I really miss that one now...

Edit2: I'm opened for ideas.

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CCT PhysX 1.0 [Re: 3run] #457718
01/28/16 10:22
01/28/16 10:22
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
I've got my problem solved. Now I need to add ladder climbing, platforms and some tweaks before releasing the source code (it will be dirty but yet useful).

Edit: added ladder! it's still not finished yet, so no source code, just a demo for you guys to give it a try. If you'll find any issues, please let me know.
Here it is:
Download link


Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CCT PhysX 1.0 [Re: 3run] #457720
01/28/16 11:11
01/28/16 11:11
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
It works very well, well done! I could only detect 1 tiny problem is that when you jump while crawling through something, the camera goes through the roof. But perhaps this is a pain to solve and a simple c-trace could fix this I quess.

Also would be cool if you could implement that if you are on the ladder and jump, you can jump towards a certain direction a bit with by holding down a move key while jumping. (hope that makes sense grin )

Anyway, I look forward to the code. My current move code is still a pain with certain ramps and keeping a smooth camera/view.

Last edited by Reconnoiter; 01/28/16 11:11.
Page 1 of 4 1 2 3 4

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1