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 / Dark Physics and Matrix

Author
Message
The night coda
13
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 30th Sep 2012 22:49
I am trying to use water on a matrix and i have the Dark Physics plug-in and Dark Basic Pro i did a bit of searching but could not find much and nothing that helped
So what i would like to know is if there is a way of making a matrix be the same as phy make rigid body static box so it dose not allow the water to fall though it?

codaing at night alway and forever
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 1st Oct 2012 02:37
Quote: "
PHY MAKE RIGID BODY STATIC MESH
Make a new rigid body and simulate it as a mesh object.

Syntax

PHY MAKE RIGID BODY STATIC MESH ID

PHY MAKE RIGID BODY STATIC MESH ID,material

PHY MAKE RIGID BODY STATIC MESH ID, file$

PHY MAKE RIGID BODY STATIC MESH ID, file$, material
"


Remember there are optimisations that can be done like saving the Physics mesh into a memblock for faster loading for large objects in future... [thereby reducing app loading times]

You can also try:

Quote: "
PHY MAKE RIGID BODY STATIC TERRAIN
Make a new rigid body and simulate it as a terrain object.

Syntax

PHY MAKE RIGID BODY STATIC TERRAIN ID

PHY MAKE RIGID BODY STATIC TERRAIN ID,material

PHY MAKE RIGID BODY STATIC TERRAIN ID, file$

PHY MAKE RIGID BODY STATIC TERRAIN ID, file$, material
"


Look at the last two with file$ in them this saves a file with the mesh data for PHYSX to load faster in future... you can create the mesh data at run time and then immediately load it as well using the following...

Quote: "
PHY LOAD RIGID BODY STATIC MESH
Load data from a static convex file and apply this to an object.

Syntax

PHY LOAD RIGID BODY STATIC MESH ID, file$

PHY LOAD RIGID BODY STATIC MESH ID, file$, material
"


And for a terrain...

Quote: "
PHY LOAD RIGID BODY STATIC TERRAIN
Load data from a static terrain file and apply this to an object.

Syntax

PHY LOAD RIGID BODY STATIC TERRAIN ID, file$

PHY LOAD RIGID BODY STATIC TERRAIN ID, file$, material
"


Material is more like the friction or bounciness etc data for the objects... [restitution etc]

Remember to use F1 [on a command inside DBP] or read the information documents in your Dark Physics folder inside your projects folder...

Hope this helped...

Let me know if you manage to create a huge amount of water particles or are you using buoyancy tricks?

The night coda
13
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 1st Oct 2012 12:21
Thanks for the good reply was helpful but sadly i got Runtime Error 7008 - Object dose not exist at line 9 Object Number Not Found 1

i tryed a very simple program just to see if i could get the rigid body to be set then i'd go on to adding in the other stuff this is that code

Dose the error mean that i have to convert the mesh to an object to use it with Dark Physics
Thanks again for your help

codaing at night alway and forever
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Oct 2012 22:26
just save the mesh as an .dbo or .x file and load it back in... then apply physics to it...

The night coda
13
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 3rd Oct 2012 01:13
Ye thanks i had started to look at having to do that i found a good post about this sort of thing that i will after i am fully sure it worked right will link to on this thread so others who may want to do this can find it quickly
With what i have at the moment it dose not need saving but the line is rem for doing that in there code i will probably post the like and some code of how i use it by the end of the weekend

Thanks so much for the pointers MrValentine

codaing at night alway and forever
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 3rd Oct 2012 12:47
anytime buddy... the most fun is CODING IT YOURSELF... that is why I only gave you a direction

looking forward to the linkage and result

The night coda
13
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 8th Oct 2012 22:19
OK so i managed to do this now and as said i would put the code up here is the link to the thread i used to do this
http://forum.thegamecreators.com/?m=forum_view&t=194598&b=1

And here is an application of it with Dark Physics


codaing at night alway and forever
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 9th Oct 2012 04:52
I cannot see what this is doing other than creating an odd shape on screen... but thanks for sharing... can you explain what is happening in the demo?

The night coda
13
Years of Service
User Offline
Joined: 6th Jul 2010
Location: Hull
Posted: 18th Oct 2012 13:35
Sorry for my late reply i have just gone back to uni and have not been checking my email as much hehe
What the example shows is that by changing the matrix height values then running the function you get an object with the shape the matrix had this then means it can by used with PhyX

You could try randomizing the matrix before the function is called to get a 3D plane that shows a very bumpy aria or if you know how run Diamond Square on it and you will get something for a terrain

codaing at night alway and forever

Login to post a reply

Server time is: 2024-03-28 17:51:56
Your offset time is: 2024-03-28 17:51:56