Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Dark DynamiX - PhysX Wrapper for DBPro/GDK

Author
Message
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Aug 2011 20:40
Quote: "When I tried this beta version, I found that the character controller commands were lacking. Firstly, the character controller could not push other objects that had finite mass. Second, the character controller was unable to jump. Perhaps you like it that way, but there should be an option to switch pushing objects on or off."


I am going to add more functions to the character controller, I will also put together a good example. You can jump with the controller by moving in the y direction, as controllers are kinematic they are not affected by gravity etc. I will show how it is all done in the next update.


Quote: "
Also the raycast command does not seem to be working. The program compiles, but immediately crashes upon a raycast check. "


I will check that out, thanks.

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 21st Aug 2011 22:24
Quote: "stability of the simulation."


By stability you mean fps?

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Aug 2011 22:30
Quote: "By stability you mean fps?"


No, lets say you want to simulate a sphere that grows in size, this is not supported with rigid bodies.

A workaround could be to keep creating new sphere actors each time the size changes, but you would find that it would probably not bounce around in a realistic way as the physics solver needs the actors to be persistant in the scene to keep the simulation as realistic as possible.

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 22nd Aug 2011 00:04 Edited at: 22nd Aug 2011 00:10


If I call destroy and then init for all my objects in scene every loop (as they all change), I get 0.05 fps. So it does looses fps...

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd Aug 2011 00:37
Quote: "If I call destroy and then init for all my objects in scene every loop (as they all change), I get 0.05 fps. So it does looses fps..."


You also would not really have a physics simulation, thats what I was trying to say.

Is this for use in an editor or are you trying to simulate objects which grow/shrink in size?

If it is an editor then you should only update the size once, at the end of the operation when the final desired size has been determined.

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 22nd Aug 2011 00:40
Quote: "If it is an editor then you should only update the size once, at the end of the operation when the final desired size has been determined."


That's true. But it is a simulation of growing objects and shrinking objects.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 22nd Aug 2011 08:31
Quote: "It is a game engine."


I love to check out any game engine. Is there a WIP post or anything?

@Matty H:

Glad to see you're back and still working on this

Clonkex

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd Aug 2011 15:26
Quote: "But it is a simulation of growing objects and shrinking objects."


Ah, well thats not really supported with rigid bodies. I suppose you may need to come up with a custom solution for that.

I have started implementing soft bodies, not sure if they would help you, also soft bodies are very cpu intensive.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd Aug 2011 21:55 Edited at: 22nd Aug 2011 21:57
I have updated second post with a vehicle demo, thanks to Soharix and 'World Off Road' for the vehicle model

I can confirm that the raycast command is not currently working for DBPro, sorry about that, silly mistake.

I have fixed it and added the following commands:


I have a couple more things to do and then I will release the updated version.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 23rd Aug 2011 01:54
Quote: "I have updated second post with a vehicle demo"


Cool. Downloading now

Quote: "I have a couple more things to do and then I will release the updated version."


Will download when released.

Clonkex

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 23rd Aug 2011 02:54
hi

the car demo reminds me of a game I played some time ago
it too was a bit quick to flip cars when making a turn

but the example shows how things work

going in what I call the back door of the game I had
changed the code so that the car was a bit heaver and faster
other wise there was no way I would have progress to nearly
finishing the game

If a thought is Just a thought ~ so whats the main thought ?
Z31NA2T
13
Years of Service
User Offline
Joined: 22nd Nov 2010
Location: Upstate NY
Posted: 27th Aug 2011 18:18
I see vehicles still have waay too much grip and not enough suspension travel, causing them to flip as soon as your turn.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Aug 2011 19:17 Edited at: 27th Aug 2011 19:24
DynamiX vs Sparkys






I was wondering if there was any difference in performace between DynamiX and Sparkys.
I have attached a comparison, it's the sparkys sliding collision example put on a bigger level with more objects(200).
I then altered the demo to use a DynamiX character controller and it ran about twice as fast, the code it also a little smaller.
I guess most of the increase is due to DynamiX being multi-threaded, I think if sparkys was multi-threaded then there would not be alot of difference.

DynamiX:



Sparkys:




Anyway, I have finished the raycast, I am just adding a few more character controller commands and I will release the next version. I also have an example of a character pushing dynamic objects and jumping etc.



Quote: "it too was a bit quick to flip cars when making a turn "


I could have added more downforce to alter this so the car sticks to the road a bit more

Attachments

Login to view attachments
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Aug 2011 20:57
You're on a roll Matty H, this is the second program this week that I want to buy from you!

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Aug 2011 03:32
Quote: "I also have an example of a character pushing dynamic objects and jumping etc"


The character controller can push objects and jump??? YIPPEE!! As far as I know, in previous versions of PhysX, the character controller was a bit useless. It couldn't jump or push objects around.

This is looking better and better, Matty H, but I have one request:

DO NOT STOP WORKING ON THIS PLUGIN!

It's just so cool!

Clonkex

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 29th Aug 2011 04:15
yes Matty H please do not stop

Dark Physics was only 80 percent complete
and with bugs as we have seen

and there was no plans fix the problems
or add what was needed so basically it was dead

If a thought is Just a thought ~ so whats the main thought ?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 29th Aug 2011 15:46 Edited at: 29th Aug 2011 15:57
[center]Character Controller
[/center]



Thanks for the comments, I have just completed the character controller commands. I am just putting it all together for the next release, should be done tonight

Character Controller Commands(GDK version)


* = S
Could not post a swear word

EDIT: Forgot to add a command to re-position the controller, will add it in before I release.

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 30th Aug 2011 00:01
Quote: "Could not post a swear word"


Lol, I'd never thought of that.

Quote: "Forgot to add a command to re-position the controller, will add it in before I release."


As annoying as that is, it is really important to be able to re-position the character controller. Really important.

Clonkex

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 30th Aug 2011 02:39
I have updated the first post with the latest version 1.11
Let me know if you have any issues, thanks.

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 30th Aug 2011 03:15 Edited at: 30th Aug 2011 03:29
umm 1 issues

no .dbpro

as for not understood
the example worked like the video showed

If a thought is Just a thought ~ so whats the main thought ?
Bluespark
13
Years of Service
User Offline
Joined: 18th Mar 2011
Location:
Posted: 30th Aug 2011 05:00 Edited at: 30th Aug 2011 05:00
As I was the one that requested the pushing of dynamic objects, jumping, and a working raycast, I thought I'd be one of the first to try out your new additions. I've thoroughly tested your examples and found that they work very well, and very fast.
No doubt that your project is an invaluable asset for many DBPro programmers.
Just don't make the final product too expensive, although likely it would be well worth it.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 30th Aug 2011 05:11
Quote: "I have updated the first post with the latest version 1.11"


Great! Downloading...

Quote: "Let me know if you have any issues, thanks."


Will do

Quote: "Just don't make the final product too expensive, although likely it would be well worth it."


I'll be buying it whatever the price!

Clonkex

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 30th Aug 2011 05:19
so far every thing is far superior

if my 2 needs get met then I will buy 'o)

I look forward to further updates

If a thought is Just a thought ~ so whats the main thought ?
Bluespark
13
Years of Service
User Offline
Joined: 18th Mar 2011
Location:
Posted: 1st Sep 2011 05:15 Edited at: 1st Sep 2011 05:16
It seems that the PHY COOK TRIANGLE MESH command is broken.
Try this simple code to see the error.

This code will immediately crash with an error.
Strangely, there are undocumented buggy version of the same command as well:
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 1st Sep 2011 06:02
I try to compile even ever pulling out
Dark Physics and I get told

"physics not installed"

yet dark physics example compile and run

I just did a fresh install of windows xp sp3 and the latest driver

I'm using DBP 7.61 with many free and pay addon's

If a thought is Just a thought ~ so whats the main thought ?
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 1st Sep 2011 08:39 Edited at: 1st Sep 2011 08:41
Quote: "I try to compile even ever pulling out
Dark Physics"


Maybe you didn't remove the DP plugin and actually removed the DarkDynamiX plugin? Try removing all physics plugins and just installing the DarkDynamicX plugin. Tell me if that fixes it.

Quote: "I just did a fresh install of windows xp sp3 and the latest driver"


You should NEVER need to re-install Windows to fix DBPro-related problem. However, installing or re-installing the latest graphics and PhysX drivers is a good idea.

Clonkex

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 1st Sep 2011 14:40
I had to no choice one about the reinstall of windows
I picked up a bug from anther program i got

I removed the correct one

I must be missing some misalliances driver
for "Dark DynamiX - PhysX Wrapper" to work

the example for this worked when windows was messed up in places
and now they do not compile

If a thought is Just a thought ~ so whats the main thought ?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 1st Sep 2011 15:17
@Bluespark
It's Because the mesh data is held in the limbs, you can make a mesh for each limb if you like but this is easier:

That creates a new object which all mesh data is held by the root object, or limb 0.

@Resourceful
I'm not sure why its stopped working for you, be sure it can find the PhysX dll's I provided.

Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 1st Sep 2011 23:34
Quote: "I try to compile even ever pulling out
Dark Physics and I get told

"physics not installed"

yet dark physics example compile and run

I just did a fresh install of windows xp sp3 and the latest driver

I'm using DBP 7.61 with many free and pay addon's"


Are you putting the bin dll's in the Example folders?

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 2nd Sep 2011 00:31
Matty H


PhysX dll's are all in the folder of the project
other wise it will not work

when I reinstalled windows xp

I updated the driver for my video card
and directx 9.0c was put in even though the install cd did not
seam to do it .. then again

I just coped over the missing dll's from the other windows
so if the code for the registry is missing that would say a lot
but the 3d games I got work fine ....

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 2nd Sep 2011 00:35
yes I am putting the bin dll's in the Example folders

I even renamed the exe that I had created with the other windows
just to see if would compile

If a thought is Just a thought ~ so whats the main thought ?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Sep 2011 18:38
I'm not sure, it's a PhysX issue as the PHY START command is failing, this is just the basic PhysX initialisation code.

Try downloading the system software, see if it works then. The end user no longer needs it but perhaps we developers do? I will try to get some more info on that.

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 4th Sep 2011 09:38
ok it seams the problem with the example


it comes up with an error which was point out
so every thing works fine

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 4th Sep 2011 10:19
Matty H

every thing works

now that's it been updated

I got a tiny quirk

I double click on either a " .dbpro or dba" file
to load it in the EditorNew.exe and the following window
error message pops up

"the procedure entry point _except_handler4_common could not be located in the dynamic link libary msvcrt.dll."

I click ok and every thing is fine

I just coped the full dbp over to the new windows and skipped
the install process it works fine other wise

that's the only program that I got that is coming up with that message

I can live with it

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Sep 2011 08:35 Edited at: 21st Sep 2011 08:35
umm Matty H

I was looking for some else 3d related when I found

NVIDIA announces the release of PhysX SDK V3

http://developer.nvidia.com/physx-sdk-v30

any possibility that update will make it's way
into Dark DynamiX - PhysX Wrapper for DBPro/GDK ?

if the code has been improved then what you did should
be even faster

If a thought is Just a thought ~ so whats the main thought ?
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd Sep 2011 16:00
I looked into PhysX 3 but it turns out they have restructured the whole code base. So updating to PhysX3 would be alot of work, luckily they put the main PhysX 3 advantage(no system software requirement) into PhysX 2.8.4

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 23rd Sep 2011 00:51
ya I new there would be changes as they posted the had rewrote

Matty H

at lest with them doing there thing
and with you doing yours there is a possibility
for a better version with a smoother integration

I know rebuilding that was a lot of work and you making
a working version for "TGCP" will make my job easier



If a thought is Just a thought ~ so whats the main thought ?
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 2nd Oct 2011 22:34 Edited at: 2nd Oct 2011 22:46
Excelent job !!! Thank you very very very much ! the character controller works nice and finally can jump and return some additional collision info ! Maybe i will be able to finish my game thanks to your plugin!

I have just one question :
1. are actors automatically deleted if the owned objects are deleted? or do i need to delete the actor manually if the object is deleted ?

and a suggestion (or an idea)
Commands that returns vectors would be easier to use if could return x y z components instead of a dbpro vector

like :


could be :



But like is said its just an idea

Keep up the good work ! I think this will be the best/most useful plugin on the site !!!

EDIT :
hahaha LOL

i can't post the real name of the command because it says :
" your post contains bad language"

phyControllerS_HitGetWorldNormalY

try removing the " _ " character

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Oct 2011 00:33
Thanks for your comments Hotline.

You should release the actors yourself.

I may add the commands like you suggest in the future, I use vectors because it's one command instead of three which speeds up developing the plugin, it is also probably faster too as you only need to call one command to gain access to the three variables.

Lol, I had the bad language problem too when I posted the command list.

ChozoMuffin
12
Years of Service
User Offline
Joined: 17th Oct 2011
Location:
Posted: 17th Oct 2011 20:01
Hi, love the work you've done; been lurking for a while. Tiny request... and I doubt you've forgotten, but I'm just making sure. In Fulcrum Physics you had some commands to restrict the movement and rotation of dynamic objects along each axis. From what I read, these seemed pretty easy for you to create.

Well, I need those commands fairly desperately for my application... they worked beautifully in Fulcrum Physics, but I had to switch to Dark Dynamix for certain reasons and those commands aren't there yet. If you had a plan to get to them, or are really busy, I can of course wait.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 17th Oct 2011 20:57
@ MattyH,

How far along is Dark DynamiX? What more aspects do you need to impliment now before pushing for a release?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 17th Oct 2011 21:06
@ChozoMuffin - Yeah, those commands are really easy, I will add them in for the next update.

@Duffer - I have a couple of projects on the go, that's why progress is a little slow. It's probably 85% complete but to be honest that 85% was a ton of work so 15% is probably more than it sounds.

I recently added triggers, there is only a couple more things before the free version is complete, that should happen within weeks.

The paid version may still be a couple of months off yet

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 17th Oct 2011 21:12
@ MattyH,

Thanks for the update. Really looking forward to both releases.

Remind me about raycasting, can it id limbs within objects? vertices?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
ChozoMuffin
12
Years of Service
User Offline
Joined: 17th Oct 2011
Location:
Posted: 17th Oct 2011 21:44 Edited at: 18th Oct 2011 03:41
Excellent, thank you.

EDIT: Just found another missing function. "Get group." I imagine this is another easy one.
ChozoMuffin
12
Years of Service
User Offline
Joined: 17th Oct 2011
Location:
Posted: 18th Oct 2011 03:14
I have another concern; I believe it's a bug.

In my game, my characters need to be able to run along the ground as well as jump and be acted upon by forces, and neither dynamic objects or character controllers allow both. I ended up having two objects per character, one dynamic and one controller, and switching between them depending on the character's state. (If there is a better way please tell me, but that's not my question.)

This works well for a while, and everything switches cleanly. The unused object is set aside and suspended. However, at random times, when switching between the two, the dynamic object will end up with some absurd values for its position and velocity and go flying away.

There's nothing that I can find in my code that could cause such a thing, so I believe it's a bug. Here are my switching functions:

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 19th Oct 2011 17:28
@ChozoMuffin - I feel the problem may be that there may be times the dynamic actor is being placed inside(slightly) another actor, this usually causes the effect you explain.

There could also be a chance that the dynamic actor is hitting the controller somehow, perhaps internally the controller is not being removed in time. You might be able to test this by separating the switch over by a frame or two, if it still happens then you can rule that out.

I will look at the group command.

@Duffer - Can't remember now I will be sure this is possible before it's finished, I think you can get limb now.

ChozoMuffin
12
Years of Service
User Offline
Joined: 17th Oct 2011
Location:
Posted: 19th Oct 2011 23:08
Yeah, looks like that was exactly the problem.... I added in

phySimulate();
phyFetchResults();
phyUpdate();

in between the zeroing of the character controller and the positioning of the dynamic object, and I have not seen the error occur since. There's no real noticeable performance lurch, either, so I'll call this a solution. Thank you for your insight.
ChozoMuffin
12
Years of Service
User Offline
Joined: 17th Oct 2011
Location:
Posted: 24th Oct 2011 18:05
Also needed, that was in Fulcrum Physics: Enable / Disable gravity for individual dynamic actors.
David iz cool
18
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 31st Oct 2011 17:33
hey your physics does not work with windows 7,just letting u know.

1 question is this just dp but u changed a few things in the dll or something?? seems like it
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 31st Oct 2011 22:16
Quote: "hey your physics does not work with windows 7,just letting u know.
"


What happens? How do you know the problem is related to windows 7? Any information on errors etc would be welcomed.

Has anyone else had this working on windows 7, or had problems?

Quote: "1 question is this just dp but u changed a few things in the dll or something?? seems like it"


No, it's completely different, it's works on a later version of PhysX too. I suppose there is similarities to the command names etc and how certain things work but this has nothing to do with dark physics.

Login to post a reply

Server time is: 2024-04-19 15:26:15
Your offset time is: 2024-04-19 15:26:15