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.

Dark Physics & Dark A.I. & Dark Dynamix / Phy Start Parameters Questions

Author
Message
Habatar
20
Years of Service
User Offline
Joined: 9th Aug 2004
Location: Madrid (Spain)
Posted: 2nd Aug 2006 02:42
Looking to the Reference of Phy Start I see thre optional parameters.

-The first is for use the hardware mode or not.
-The second is for the SceneType.
-Th last is to enable multithreating.

According to the second parameter:
-0 represents a rigid body scene
-1 represents a fluid scene
-2 represents a fluid scene in software
-3 represents a cloth scene

And my question is. If you want to make a scene that have rigid bodies and cloth what number you must put?

And, how works the multithreating?

Thanks.

Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 2nd Aug 2006 02:50
The extra parameters only come into play when you use the AGEIA PhysX accelerator. For example, you may decide to start the simulation with a hardware rigid body scene which will allow you to have rigid bodies simulated on the hardware. At the same time you may also want to utilise cloth in your game but perhaps keep this on software only. This kind of situation can be handled with this code:



By doing this we have 1 scene running on hardware and one in software. Deciding which objects go in which scene is covered by the command phy set current scene. So you can add certain objects into each scene. There is further information covering how this works in the documentation.

I'd recommend always enabling the multi threading flag if you use the extra parameters. You will see a good speed up in most cases.
Habatar
20
Years of Service
User Offline
Joined: 9th Aug 2004
Location: Madrid (Spain)
Posted: 2nd Aug 2006 02:53
Ok.
Thanks for the explanation Mike.

Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 2nd Aug 2006 02:56
You may also want to use the phy make scene command to create multiple scenes for software usage which might be useful for certain situations. There is a demo program in the Projects\Dark Physics\Demos\PhysX\ folder by the name of Multiple Scenes. If you dont have the AGEIA PhysX accelerator try adjusting the code in there on lines 48 and 49 to use software only and you will get to see how multiple scenes operate.
Habatar
20
Years of Service
User Offline
Joined: 9th Aug 2004
Location: Madrid (Spain)
Posted: 2nd Aug 2006 09:30 Edited at: 2nd Aug 2006 09:31
Thanks Mike. I reed the help in the Advance section and see the two demos and now I understand.

I dont have the Hardware yet. I make the changes in that lines and the demo run correctly, but if in the main loop y press the Sapcekey y recibe this error (attaced image)



Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 13:05:14
Your offset time is: 2024-11-24 13:05:14