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.

Author
Message
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 17th May 2012 14:36 Edited at: 19th Jun 2012 18:10
Update is complete, could not quite get through everything so some things will be looked at for the next update.

- Complete
- Making progress
- Next Update

obj-dbo converter application.
Discovered and fixed character controller bug, if deleted it could cause a crash upon program exit.
Bone animated ragdolls.
Add 'joint exists' command.
Add breakable joint commands.
Add more commands to apply forces to limbs/bones.
Add way of determining if actor is kinematic.
Improve 'timing' information.
Add advanced vehicle example.
Add categories to help file.
More CCD skeleton options(check for possible bug - fixed).
Add sleep commands.
Add direction of antistropy commands.
Look at other rendering techniques for particles/fluids - Any input welcomed. New command added with example provided, more could be added in the future.

Obb Job





This application will convert models in the OBJ format to DBO. This is useful when using the PhysX viewer to set up a soft body, it is also useful in its own right when developing with DBPro/DarkGDK.

New to v1.1


Attachments

Login to view attachments
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th May 2012 14:53
oh man I wish I was not so broke, shame DD was not released earlier...

I can not wait to play with it...

Umm if that tool is shipped with DD then why put an advert? that's just irritating...

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 17th May 2012 15:38
Quote: "Umm if that tool is shipped with DD then why put an advert? that's just irritating..."


It is a general use tool which I will probably include with the next model-2-sprite update since it could be useful there too. Maybe I should swap the add around for each

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th May 2012 15:49
Confused

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 17th May 2012 20:46
List sounds great to me. Looking forward to it.

Inflictive
14
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 18th May 2012 06:28
Three more things I didn't see in the help files, that should probably be added(unless I just didn't find them):

-More CCD skeleton options. Single vertexes, lines, and load a ccd skeleton.
-Control of dynamic rigid bodies sleeping.
-"Dir of antistropy" settings for materials.(Was in dark physics)

"This plan is so perfect... it's retarded."
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 20th May 2012 22:10
Updated top post with current progress. All commands which take a 'limb' parameter work if the actor was created from a bone too.

s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 21st May 2012 21:01
@ Matty H
1) Does Dark Dynamix works with new version of DarkGDK (i.e. DarkGDK 2.0) ?
2) Where can I see demoversion or full list of functions with description? (I need to decide: to buy or not, because I need specific functions for precount collisions of accelerated bodies.)
Thanks for answer.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st May 2012 21:07
what s_i said goes for me too, I would very much like to see the documentation to decide if it is clear enough for me to buy into

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st May 2012 22:34
1) DarkGDK 2 apparently works with all DBPro/GDK plug-ins so I would say yes but advise you ask in the GDK 2 forum section to make sure.
2) I have attached the help file. There are more commands now and even more will be added before the next update.

I'm not sure what you mean by precount collisions of accelerated bodies.

You can collect collision data and it tells you how many collisions there have been as well as letting you loop through them and get more information. Let me know if this is not what you meant.

Attachments

Login to view attachments
Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 22nd May 2012 04:12 Edited at: 22nd May 2012 04:15
Hi Matty,

That help file doesn't seem to have any html content/documentation in it. I see table of contents in it, but when I click on each one of them it's page display says "Navigation to the webpage was canceled".

I will be buying this here shortly and have deep respect for ya specially after my failed attempt of trying to put a bullet physics lib together. Well, I got tired of trying to figure out everything about it.

Looking forward to the ragdoll stuff. I have created a dbpro command set that I can create real dbo bones and add them to 3d objects as "boned limbs"/ Set vertices of the object's mesh to the bones/ and add the weights. DarkDynamics should make it a bit more fun to play with. I just got to stop procrastinating on my gui development.

Is it possible to make a ragdoll character not effected by gravity(ie: static), but able to for an example pull on it's arm and then it's body will move according to the arm's position like what Inverse kinematics can do in an animation editor like Poser or 3D Studio Max?

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 22nd May 2012 04:27
Quote: "That help file doesn't seem to have any html content/documentation in it. I see table of contents in it, but when I click on each one of them it's page display says "Navigation to the webpage was canceled"."


The help file works fine for me, please try downloading it again.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.60 + PureGDK 2.0
Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 22nd May 2012 04:49 Edited at: 22nd May 2012 05:11
Ok I got it to work. For some reason my Vista machine had it blocked as it said it was from another machine. So I unblocked it from it's properties page and it works now. Wierd, after all these years having Vista, I never experienced that before.

Edit: * Just bought it - I must have it

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd May 2012 15:37 Edited at: 22nd May 2012 15:38
Quote: "Is it possible to make a ragdoll character not effected by gravity(ie: static), but able to for an example pull on it's arm and then it's body will move according to the arm's position like what Inverse kinematics can do in an animation editor like Poser or 3D Studio Max?"


You can turn off gravity for any object and if you pull on the arm the body will follow, but I don't think this is what you mean.

Using PhysX it is possible to have the character always controlled by the physics simulation and 'drive' the bones to the key frames of the animation, but I have not looked into this.

I think you end up with a character which walks along according to animation but will also bump off objects etc. I think this may be a similar process as what you describe or have seen in modelling programs?

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 22nd May 2012 19:03
I don't want to pick holes, and this isn't really an issue, but since you're doing some documentation tweaks, I just found this and thought I might as well flag it up :


void dynJointDescSetGlobalAxis (int jointDescID, float angleX, float angleY, float angleZ)

Parameters:
jointDescID ID number of the descriptor.
posX Orientation about the global x-axis.
posY Orientation about the global y-axis.
posZ Orientation about the global z-axis.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd May 2012 19:08
Thanks, that's the dark side of 'copy and paste' for you

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 22nd May 2012 19:22 Edited at: 22nd May 2012 19:29
I always fall foul of that one too.

Btw, these commands are in the doc but not in the header files:

dynKinematicMovePos( )
dynKinematicMoveRot( )
dynKinematicOff( )
dynKinematicOn( )


Edit: They compile when I add them in though. I'll tell you if they work in a minute!

Edit2: Yep!

Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 22nd May 2012 19:48
The idea I'm having has nothing to do when a 3d character is playing an animation like walking for example, but rather in a non-animated mode where I can just pose it like a puppet. I guess that's what I'm after is indeed inverse kinematics through a physics system which may not be possible.

I guess with a physics system mabie it needs some kind of force like gravity.

Here's a newton physics ragdoll example. Now imagine if you could move the ragdolls around like that (ie: select a body part with the mouse ) but there was no gravity. So when you let go of the mouse the ragdoll would immediately stop.



I keep imagining ragdolls not effected by gravity would be inverse kinematics like this:



I was just curious if that's possible. Like if I simply created a ragdoll and not have gravity on for it, it would give it an effect like posing.

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd May 2012 19:49
They must have been late additions before release

You would have made a great beta tester Fallout

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 22nd May 2012 19:58
I think this highlights the difference between beta testing and actually using the product. I'm finding solutions to real problems rather than just trying to find problems. I think that's when these things tend to bubble to the surface ..... speaking of which, I'm about to post another Dark Dynamix thread ...

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd May 2012 20:09
@Todd Riggins

I think that should be possible.

Firstly, if you look at the soft body example I think there are some 'pick' commands which show you how you can easily drag physics bodies around with the mouse.

The next part is theory but might just work. To replicate that second video you could create the ragdoll as normal, don't have any gravity or external forces. You could then fix certain bones to the world with fixed joints, like he did with the foot. You can also put the ragdoll to sleep when you are not touching it to stop any after movements.

You may also need to add lots of angular/linear damping to stop everything getting moved about too much when you are moving one bone only.

That said I still feel you may need 'drive' to get it as good as in that video, this way you might try to 'drive' the wrist but the physics simulation only allows it to go as far as the joint limit allows before something else has to give, perhaps the arm turning to compensate. This is the bit that is similar to the ragdoll using key-frame animation I mentioned earlier. I have not looked at this in too much detail so I am still a little hazy on what effects it can achieve.

Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 22nd May 2012 20:30
Thanks Matty for giving me ideas to go on. I just finally got DarkDynamics registered so I'll see if I can knock out a basic example out here after a while.

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd May 2012 20:52
Cool, although bone animated ragdolls will be in the next update. You may be able to put the same theory to test with limb animated ragdolls.

s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 22nd May 2012 21:29 Edited at: 22nd May 2012 21:31
@ Matty H
Please, answer the questions (and excuse me for bad english, please).
1) Does DD works correctly with Dark AI ?
2) In Help (on the page about Joints) I see image with right-handed system of coordinates. But DirectX & DarkGDK use left-handed system. I am confused...
3) For example, I have system with unknown or unstable (100...300) FPS.
Does this piece of pseudocode correct? Does it gives me stable movement despite unstable FPS?

4) See attached picture. Turn based game: in 2D space I have my 3D-starship and many other dynamic objects (asteroids, pirates, etc). Ship has mass, vectors of speed and acceleration, and every turn (1 time in 3 seconds) I can apply new constant force (in some range) to it. Then I press button "Turn" and 3 seconds all objects moves and collides.
Problem: every turn I need to draw new map of possible future (after 3 seconds) positions after movements (without collisions!!!) of my ship according to possible applied new constant force.
I.e. every turn I need to know four extreme (and one planned) positions & angles of my ship in the future (after 3 seconds, i.e. in next turn) without collisions and without moving other objects. How to do this using DarkDynamix ?.....

Attachments

Login to view attachments
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 22nd May 2012 21:49 Edited at: 22nd May 2012 21:51
@s_i

I've made a game almost exactly like that on Android. It didn't use a physics engine, but you do need to simulate into the future to calculate where the ship would be. I think your two options are:

1. Guess at the simulation using your own maths. So iterate along 100 loops (for example), moving the ship with simple vector maths, to arrive at the rotation and final location, and also create the path line at the same time. Then draw it. This won't be accurate and will require you to understand what the physics simulation will do, but it's easy.

2. Or the physics solution: Create a second parallel simulation in Dark Dynamix. So you have simulation 1 which is the full game, and simulation 2 which just has your ship in it. Run this simulation (fetch, simulate, fetch) for as long as you like, creating your path and final ship position. This won't affect the other world objects because it's on another simulation. Then when you 'End turn' you can just apply this to simulation 1.

I haven't tried this, so not sure how it'd work, but I'm pretty sure it'd work fine! Hope that helps.

Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 23rd May 2012 01:40 Edited at: 23rd May 2012 07:13
Edit
How to make an actor sleep?

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd May 2012 09:59
@Matty

Having a dynIsKinematic() function would be very handy, since they interact differently and will likely cause the code to go down a different path to handle them.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd May 2012 12:11 Edited at: 23rd May 2012 12:38
Hi Matty. More nagging from me! I'm looking at how I'll implement things like bullets and grenades. The obvious thing is simply sphere actors flying about. However, when they collide with walls, I'll want to destroy them. So I would have to setup contact flags using these commands ...

dynContactGetActorA( )
dynContactGetActorB( )
dynContactGetData( )
dynContactGetFlag( )


However, upon collision I would need to know things like collision locations and normals. When a bullet strikes a wall for example, I will need to be able to place bullet hole decals at the exact position of impact and facing the right way. Is it possible to add this data with commands like?

dynContactGetWorldPos(int Vector3)
dynContactGetActorAContactNormal(int Vector3)
dynContactGetActorBContactNormal(int Vector3) (which is just the inverse of the ActorA normal)


It's possible for me to just use a raycast after collision is detected, starting at the last bullet position, moving to and beyond it's current position, and where it hits will be approximately where the bullet contacted the world. This would be a bit cumbersome though and a bit of a waste if the collision data is already available in PhysX after a contact was generated.

Hope that request makes sense. Thanks Matty.

Edit: Thinking about this, this might be even more important. I've played around with the kinematic actor hitting the player. If the player is moving (such that the character controller physically crosses the bounds of the kinematic actor) then collision is found and returned. If the character controller doesn't move and the kinematic actor moves through the player (i.e. the wall pushing a stationary player), no collision is returned for the character controller commands. So it appears to be impossible for a kinematic actor to push a character controller.

The solution I think would be for me to implement my own character controller. As a normal physics entity, it'll be pushed by the kinematic actors automatically. However, to get that to work properly, I'd need to be able to get normals and collision points for two normal actors colliding.

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd May 2012 16:02
Quote: "If the player is moving (such that the character controller physically crosses the bounds of the kinematic actor) then collision is found and returned. If the character controller doesn't move and the kinematic actor moves through the player (i.e. the wall pushing a stationary player), no collision is returned for the character controller commands. So it appears to be impossible for a kinematic actor to push a character controller.
"


I would also love to see improved character controller, one that can interact with the world and also receive collision data as discussed in this thread. If we start implementing our own character controllers it will kind of beat the purpose of the ones that are already available in DD.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.60 + PureGDK 2.0
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd May 2012 16:12
Sleep commands have been added and I will look into isKinematic, should be possible.

Here is the info on contact reports from the PhysX sdk docs:
Quote: "
Contact Reports
The NxUserContactReport class has functions for passing information to the user about collisions that occur. This information can be used for playing 3D sounds or other effects in response to simulated collisions. An example is demonstrated within this section.

NOTE: Do not rely on the exact positioning or geometry of contacts. The SDK is free to re-organize or merge contact points to improve efficiency as long as the simulation is not affected.

First, subclass NxUserContactReport:

class MyContactReport : public NxUserContactReport { void onContactNotify(NxContactPair& pair, NxU32 events) { //You can read the contact information out of the //contact pair data here. } } myReport;
Then register this object with the SDK as before:

scene->setUserContactReport(&myReport);
The MyContactReport::onContactNotify() function receives the contact information for each pair of actors that request notifications. The following options to set contact notifications are available:

Request notification for a specific actor pair using NxScene::setActorPairFlags().
Request notification for actor pairs of two specific actor groups using NxScene::setActorGroupPairFlags().
Request notification for the pairs of a specific actor using NxActor::setContactReportFlags().
Suppress notification for actor pairs which only involve a specific shape pair using NxScene::setShapePairFlags() and the NX_IGNORE_PAIR flag.
Suppress notification for actor pairs where the contact normal force is below a certain threshold using the options above, NxActor::setContactReportThreshold() and the flags NX_NOTIFY_ON_START_TOUCH_FORCE_THRESHOLD, NX_NOTIFY_ON_END_TOUCH_FORCE_THRESHOLD or NX_NOTIFY_ON_TOUCH_FORCE_THRESHOLD.
The possible contact notify flags are NX_NOTIFY_ON_START_TOUCH, NX_NOTIFY_ON_END_TOUCH, NX_NOTIFY_ON_TOUCH, NX_NOTIFY_ON_START_TOUCH_FORCE_THRESHOLD, NX_NOTIFY_ON_END_TOUCH_FORCE_THRESHOLD, NX_NOTIFY_ON_TOUCH_FORCE_THRESHOLD, and NX_NOTIFY_FORCES, besides the NX_IGNORE_PAIR flag previously mentioned on the Broad Phase Collision Detection page.

In our example we request contact notification for a specific pair of actors.

scene->setActorPairFlags(actor0, actor1, NX_NOTIFY_ON_START_TOUCH | NX_NOTIFY_ON_END_TOUCH | NX_NOTIFY_ON_TOUCH);
Passing a combination of the notify flags, as shown above, creates a behavior similar to triggers. However, when using a trigger, an event is received when a shape passes into or leaves the volume of another shape. Whereas in this situation, shapes start or stop touching each other's surface. More contact status flags will be added in the future to better support sounds for simulation.

Instead of requesting contact notification for a specific pair of actors, we could focus on all the pairs of an actor. Additionally, notifications for contacts with a normal force below a certain threshold shall be suppressed. This would look as follows:

actor->setContactReportFlags(NX_NOTIFY_ON_START_TOUCH_FORCE_THRESHOLD | NX_NOTIFY_ON_END_TOUCH_FORCE_THRESHOLD); actor->setContactReportThreshold(100);
The contact information provided to onContactNotify() is in the form of the NxContactPair structure, and the event's argument is the type of event that has happened. This is a combination of one or more of the flags that have been set with setActorPairFlags(). The most interesting member of NxContactPair is the contact stream (NxConstContactStream). This is a compressed data structure that contains detailed information about the contacts between a pair, including the contact normal and friction forces acting between the pair. You can use the NxContactStreamIterator class to read it. Please refer to the API documentation and code for the sample SampleContactStreamIterator for details on these classes.

Caveats
Kinematics that move into contact with statics or with other kinematics will not generate contact reports.
When enabling contact reporting using setActorPairFlags() the shapes for the actor must be created prior to the call since actor pair flags are in fact applied to the shapes belonging to the actor. If setActorPairFlags() is called for an actor with no shapes, the call will be ignored.
The state of the SDK should not be modified from within the onContactNotify() routine. In particular, objects should not be created or destroyed. If it is necessary to modify state, then the updates should be stored to a buffer and performed after the simulation step.
"


It seems that there is no way to get contact positions or normals, this is a little strange since you can get the debugger to visualise collision positions.

I will look into this further.

Another option you have is to use dynamic(non kinematic) compound actors for your closing walls, these should generate contacts with the controllers I'm pretty sure. You would restrain the movement using joints.

@s_i - I will get back to you soon.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd May 2012 16:36
Hi s_i

Trial version

Not sure about DarkAI, I hope it works but can't say for certain yet.

For your problem I would not think you would need a physics engine as your calculations are 2D without collisions, I think you can probably get help with the maths if needed from the DBPro section of the forum.
Fallouts first approach seems pretty good I think.

You might be best trying the trial version(link above) to be sure there are no conflicts with DarkAI and you can also test out that code snippet.

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 23rd May 2012 17:16
I just realised that DarkDynamix uses PhysX version 2.8.4 why not 3.1 which is the latest one and is a complete rewrite (so I suppose improved upon older version).

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.60 + PureGDK 2.0
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd May 2012 17:30
I would probably need to start from scratch to update to 3.1 since as you mention it is a complete rewrite.

When I last looked PhysX 3 still never had all the features of 2.8.4 and they still support 2.8.4 as well as 3 so I stuck with it.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 23rd May 2012 19:11
Quote: "It seems that there is no way to get contact positions or normals, this is a little strange since you can get the debugger to visualise collision positions.

I will look into this further.

Another option you have is to use dynamic(non kinematic) compound actors for your closing walls, these should generate contacts with the controllers I'm pretty sure. You would restrain the movement using joints."


I think you're right. I'll try and implement my walls as a dynamic actor with joints again. I tried it once before but had positional issues since the two parts of the wall pistons actually intersect, forcing the objects to separate, even defeating the joint. Is there as way to define two objects as not being able to collide with each other? I remember there is a collision flag for joint descriptors, but wasn't sure if that would do the job. I couldn't see a global command to say "object 1 never collides with object 2".

As for the contact data, that's a bit strange. I wonder what would be the best way to simulate a moving object and get its collision point/normal then. If a character controller can hit something and generate a collision point + normal, two normal actor must be able to do the same somehow. Any ideas?

s_i
14
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 23rd May 2012 19:32
1) Does users with AMD videocards can play game, made with DarkDynamix?
With same speed like on NVidia cards or only with software accelleration?..
I keep in mind : what means "dynHardwarePresent ()" and "dynStart (bool enableHardware)" ?
2) My game has many collisions and I need good physics, but I need preliminary counting of future position of ship without collisions. So I'll use second scene for this. In Help I have find dynSetCurrentScene(), but in Examples folder I can not find any example of using this function. Please, give me some advise.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd May 2012 21:06
@Fallout
Here is how you define whether the two actors involved in the joint should collide or not, I just did a quick test and it works here.


@s_i
1) AMD cards will perform exactly the same, most of the speed comes from good physics calculations behind the scenes and the fact it is multi-threaded.

You can test for hardware acceleration and then add extra stuff in your game if it's detected, only works on cloth/soft bodies and I think particles. But you would probably not create a game that needs hardware, just a few extras if it's detected perhaps.

2) You create and set to a new scene, all commands then use that scene instead until you switch back.

I would recommend trying the trial version for this aspect as it's a little different from the normal process, hopefully it will work fine.

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd May 2012 21:21
Quote: "@s_i
1) AMD cards will perform exactly the same, most of the speed comes from good physics calculations behind the scenes and the fact it is multi-threaded.

You can test for hardware acceleration and then add extra stuff in your game if it's detected, only works on cloth/soft bodies and I think particles. But you would probably not create a game that needs hardware, just a few extras if it's detected perhaps."


I don't follow this... AMD does not feature PHYSX and I suppose by multithread you mean cpu but the bit after that is confusing I think he said he does not have an NVIDIA card... so how can he test hardware accelleration?

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 23rd May 2012 21:29
Quote: "I think he said he does not have an NVIDIA card... so how can he test hardware accelleration?"


Obviously it's better developing a game with hardware acceleration on a machine with hardware acceleration but theoretically you do not need to.

At the start of your program you test if hardware is present on your or the end users machine. If present you can add some hanging dynamic cloths as curtains perhaps, if not present then you might just have static curtains

The point is you have a game that runs without and a game that runs with, with extra physics interactions.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 24th May 2012 16:30
Quote: "Here is how you define whether the two actors involved in the joint should collide or not, I just did a quick test and it works here."


Hi Matty. This may be a silly question, but did you test your example with a flag of 0. I have tried all combinations, but the two actors in my joint still collide. One of the actors is static btw, in case you think that may make a difference. I will continue to experiment, but that command seems to be having no effect.

If I can't resolve it, I'll try and create an example.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th May 2012 17:11
Yes, they all worked. Either the static actor is making a difference or I have changed/fixed something without realising as I am using what will be v1.1. I have been doing more work on joints.

A quick example using primitive shapes might be easy to test out, if we get different results then I know I must have fixed something.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 24th May 2012 17:24
I'm having loads of problems now actually. Current list:

- Tried setting up collision groups and successfully stopped crusher moving walls (group 1) colliding with static walls (group 2). However, the character controller cannot collide with anything other than group 0. (I think this will be a real bug/problem)

- Apparently the joint had never worked between my static walls and moving walls, because as soon as I disabled collision between the two, the moving walls fell through the floor. I could be doing something wrong here, so will set up an example, but I can't see a problem in my code at the moment. My sneaking suspicion is the joint between static and dynamic isn't working, but I'll confirm with an example.

I let you know in a bit if it's me being a fool, or there's an issue, or a bit of both.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th May 2012 17:53
Now that you mention it, I don't think you can set up a joint between static and dynamic actors although I will have to double check.

What you do is join the dynamic actor to the world by passing 0 as the other actor(instead of a static actor), perhaps this is why collision is not disabled in your case.

As for the controller, that does sound like a problem, I will need to test that out when I get the chance.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th May 2012 18:41
Looked at the character controller and the problem is easily fixed, there is a parameter for the 'move' command which takes the groups you wish to collide against, I will add an overload in a minute.

I will do my best to get this update out asap as I know you are depending on a few things now. I may need to put a couple of things off to the update after this one, I will try to prioritise as best I can.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 24th May 2012 19:01
Awesome Matty. Thanks for the continued support. I think with me hammering Dynamix to death with how I'm using it and you around to update it, we'll probably have it really stable before anyone else gets a chance to find bugs.

Btw, am currently playing with attaching the joint to the world by using 0. Looks like it may be working better, but attaching to 0 does cause Dynamix to pop up a "No actor with index 0" or whatever the message is. It still seems to create the joint. Will confirm when I have it all working.

If you were to suppress that pop-up for an actor number 0, you may not catch user error when people pass the wrong value. Perhaps an option would be to provide your own constant like JOINT_WORLD_ACTOR or whatever, which could be -1 maybe, then substitute that for 0 in the wrapper. Just a random thought!

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 24th May 2012 19:41 Edited at: 24th May 2012 19:42
Just to confirm, attaching the joint to the dynamic actor and non-existant actor 0 has worked. My walls are now moving correctly, ignoring collision with the static walls and the joint is holding firm. But I do get the pop-up "Object: 0 does not have an associated actor." for every joint made.

I also still need to assign static scenery and the walls to groups and define them as not colliding:
dynGroupSetCollision(COLLISIONGROUP_MOVING_SCENERY,COLLISIONGROUP_STATIC_SCENERY,false);

Perhaps the collision flag in joint descriptors only applies when both actors are dynamic.

Sorry to keep throwing all this at you btw mate! Either way, this joint to world problem is solved for me at least.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th May 2012 19:47
Glad it's working, I have fixed it so those command accept 0 as an actor.

You will get a maximum of 3 messages at any one time, man that's gonna get annoying, sorry

You could link to the release lib but then you won't catch other potential mistakes.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 24th May 2012 19:55
Quote: "You will get a maximum of 3 messages at any one time, man that's gonna get annoying, sorry"


If I put my fist through the enter key, I'll bill you.

Quote: "You could link to the release lib but then you won't catch other potential mistakes."


Good shout. If I move on from physics tweaks I'll do that.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 25th May 2012 11:19 Edited at: 25th May 2012 11:26
Morning Matty. Today I continue to harass you within and inch of your sanity.

So I am continuing to experiment with joints and having the following interesting results. Here's my joint setup code, based on your example:



This works great for a nice sliding prismatic joint. BUT, this allows movement only on the global z-axis! I move my walls using this command:


This gives a nice constant movement speed. If I add any x or y speeds, it doesn't move in those directions, so I know the joint is correctly restricted to one axis. For some reason though, it's the z-axis, despite the joint setup.

So I thought, maybe it's the global axis orientation command. Maybe I need to reset that, or change it. So I started playing with it. I struggled to figure out what was going on with it.

If I use it like this: dynJointDescSetGlobalAxis(1,0,0,0);
I assumed it'd be the default setting and the joint would continue to behave normally. Actually, it just completely breaks the joint. Putting that anywhere in the joint descriptor (early on or after actors are defined) causes all the motion definitions to break and the various items on the joint just move around without any constraints at all.

What I discovered is, when I use these parameters dynJointDescSetGlobalAxis(1,0,0,1); the joint appears to behave as it did before (i.e. velocity on the z-axis moving correctly so long as XMotion is enabled on the joint). So perhaps this command is actually an up vector defining the up axis for the joint, and not load of euler angles? I can only assume that since 0,0,0 seems to break it, and that WOULD be valid as a set of angles, but NOT as a vector.

The problem with that is, if it is an up vector, I don't really understand how the motion commands would work with it. Any help in this area is appreciated mate. I can continue for now with my z-velocity on an x-motion joint, but I'd like to get to the bottom of how it works for future problems.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 25th May 2012 15:49
The global axis is a vector and as I found out recently you should always set it, and make sure you do it after you assign the 2 actors.

I always have it set to 0,1,0 and so far have not really had to change it.

Setting the global axis and anchor is a convenience function for making sure the two actors share the same global axis and position for the joint they are sharing, which is recommended. It is actually possible to have both actors set up so they act like the same joint is in a different position/orientation, this really complicates things and I'm not sure it's stable if the difference it too large. You will be able to do this after the next update but I don't think it's what you need here.

So I think this is how it works, you lock certain axis but this is local to the joint, you then set the global orientation of the joint with dynSetGlobalAxis(), therefore either will change the direction the joint is acting in, I think.

Try setting the global axis to 0,1,0 and see if locking either X,Y or Z then aligns up with dark basics global coordinate system, making it easier to predict what will happen.

If this works then restricting a joint globally will be really easy on the brain, the problems start if your sliding walls are at an angle (45 degrees perhaps), I presume you would then need to rotate the global axis but since it's a vector it would need to be normalised I think. To be honest, I just don't know for sure as I have only set up joints on the global axis, I'm pretty sure that's how it works though

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 25th May 2012 17:53
Thanks Matty. I started experimenting with 0,1,0 and saw some patterns. That got me thinking, so I bit the bullet and did some research into this myself, and I think I have an idea how to use it now.

The vector doesn't fully describe and axis in the X,Y,Z fashion we're used to. It describes a vector in which everything can rotate around. In the case of a revolute joint for a door, you'd set it to 0,1,0. For a trap door in the floor, you'd set it to x,0,z where x and z point in the required direction ... 1,0,0 if you want it to rotate around the x-axis. The twist motion will then be around this axis, I believe. The two swing motions would be on the other two perpendicular axis.

In the case of my prismatic joint, the easiest way to set it up is to point the axis in the direction you want to move. So along the z-axis for z movement, or maybe 0.5,0,0.5 (normalized!) to have the joint move 45 degrees along the X and Z axis. With it configured like this XMotion on the joint is always along the defined axis vector. So that makes that easy to configure.

The directions in which Y and Z motion move are a mystery to me. I can't see how they would be defined with the vector axis method, but perhaps they're not supposed to alone. It looks like there may be a few other properties which need to be set to fully define more complex joints. The small document I stumbled upon mentioned about defining planes as limitations for prismatic joints, but it didnt say whether that was done with a joint specific command, or whether they just made two physics actor planes which got in the way of it's movement.

Are you looking at an online doc source or are you using one you downloaded with an SDK?

Login to post a reply

Server time is: 2024-04-16 10:19:18
Your offset time is: 2024-04-16 10:19:18