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 dynamix] Trying to understand the GLOBAL and LOCAL force commands

Author
Message
Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 31st Oct 2012 00:04 Edited at: 31st Oct 2012 00:05
Hi all again, in these days I made a lot of forward steps using DarkDynamix. From a really chaotic and complex start I finally reached some main goals :

1) to push a object with different value of forces and from different direction too
2) to change DarkDynamix objects XYZ position in 3D space
3) to detect collisions and collision groups
4) to change materials and physic property
5) Making static triangle mesh objects and dynamic convex mesh objects too
6) Thx to Matty I able to assemble an object made by other objects, making it with a really good collision mesh (the sum of all convex meshes of the object parts) and not using just a poor (in collision precision performances) convex mesh.
Ok so and so the main themes are reached.

But I find really difficulty to correctly understand the forces related to Global and Local coordinates.


So, please, take a look on the attached picture.
I tried to analyze the matter of the global and local coordinates plus an analysis about all the DYN ADD FORCE commands.

Ok, simply tell me If some of my attached picture points are wrong.
I have little experiences about 3D worlds and that little experiences did not help me..


Over that, are there some DarkDynamix commands that graphically show the force lines? As the debug show the collision area for the actors.


Thank you!

Attachments

Login to view attachments
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 31st Oct 2012 00:32 Edited at: 31st Oct 2012 00:33
I looked at your image and although I think you get the basics it doesn't seem like you have it quite right. I'll try and summarize in as few words as possible.

A Global Force (referred to as 'Force') acts along the global axis. So a force of 0,0,100 is 100 along the z axis.

A Local Force (referred to as 'Local Force') acts along the objects own axis. So which ever way and object is facing, a force of 0,0,100 along the local z axis is essentially a force in the direction the object is facing.

A Global Position (referred to as 'Pos') is absolute world coordinates. So 0,10,0 is a global position of 0,10,0. It doesn't matter where the object is, the force will act at this global position.

A Local Position (referred to as 'Local Pos') is a position relative to the object, taking into account it's rotation. So a local position of 0,10,0 can be visualised as this: start at the object's origin, face in the direction the object is rotated, move 10 units up (so if the object was lying on it's right side, moving 10 units up would actually be a movement to the right)

Then you can combine those in a number of ways. Just separate the concept of FORCE and LOCAL FORCE (for the direction in which the force acts) and the concept of POS and LOCAL POS (for the point at which the force acts).

Hope that helps.

Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 31st Oct 2012 00:40
An example of use may help too ...

If I want to simulate a shockwave hitting an object, we can imagine a big wave of power hitting the object all over in a certain direction. I'd use DYN ADD FORCE as the shockwave is travelling in a global direction along my map and it isn't hitting a specific place on my object. It's hitting all of it.

If I want to simulate a bullet hitting my object I'd use DYN ADD FORCE AT POS. The direction of force is a known global force based on the direction of travel of my bullet. Where it hits my object is the position of the bullet at time of contacts. Therefore global force and global position.

If I want to simulate a rear thruster on a space ship, I'd use DYN DYN ADD LOCAL FORCE AT LOCAL POS. The direction of force is based on the direction the ship is facing. It always thrusts backwards out of the ship which is a negative force on the ship's z-axis. Also the position of the thruster is always relative to the ship. It may be 2 units backward from the origin of the ship model, so I want to apply the force at a local position of 0,0,-2.

Hope those few examples help.

Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 31st Oct 2012 01:08 Edited at: 31st Oct 2012 01:09
q
Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 31st Oct 2012 01:35 Edited at: 31st Oct 2012 01:45
mmm Thank you REALLY MUCH Fallout, I was really wrong...

Damn.. the matter is really complex.

Your first post just help me to understand that I did not understand anything about.. (at least it's a start..) and gave me a lot of confusion.

Your second post deleted some my confusion and really start to make me in the right way.
These examples really help me to visually
understand the situation.


I am trying to make some lift forces that, is some circumstances, will grown of intensity and will make my wing object be lifted.
You can see the attached pic,

I would to have 4 differen lift forces starting from 4 different local points of the wing upper surface to "UP" direction (up is the UP direction related to the wing upper surface)
So these forces did not push the wing from under the wing but these forces born on the UPPER side of the wing to UP direction. So these forces are dragging the wing to UP!


So I think I have to use one command that you have not used in your examples.. maybe ADD FORCE AT LOCAL POS?
And if yes... what are XYZ local values of the 4 lift forces on my attached pic?

THANK YOU!

Attachments

Login to view attachments
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 31st Oct 2012 10:27
Hi Alduce. Sounds like you've almost got it. Yes, if you want the forces to always act on the same part of the wing, use LOCAL POS. Then no matter what the angle of the wing is, the force will act in the same place.

Aerodynamics are a tough thing to simulate though. If a wing is moving forwards through the air, then the wing profile will suck the wing upwards as you said, but it'll suck it locally upwards. So if a plane is flying upside down, the wing profile will actually suck the plane towards the ground. Therefore you want to use LOCAL FORCE on the y-axis, to ensure the wing is always pulled in it's own upwards direction.

However there's also the "angle of attack" which has a huge effect. For example, flaps and ailerons divert air and have more effect on forces than the wing profile does. When a plane is flying slowly (e.g. landing), they point their noses up towards to the sky to create an "angle of attack" and keep the plane in the air, and at this point the wing profile has very little effect.

Here's an image I found. Hopefully it'll show up ...



Notice that when a wing is travelling along parallel to the ground, but with an angle of attack, the resultant force is still a LOCAL upwards force. The air pushes on the underside of the wing and causes lift and drag. So pointing a plane's nose 45 degrees upwards but flying parallel with the ground with have several effects: 1. the wing profile will do almost nothing, 2. half the force of the wind resistance on the wing will push the wing upwards (lift), 3. half the force of the wind resistance will push the wing backwards (drag). In this simple example, the result is always in the wings local Y axis.

Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 31st Oct 2012 12:30 Edited at: 31st Oct 2012 13:17
Hi again Fallout, you telling me I am almost got the point but it seems I am even more messed than before
I'm sadly realizing my limits about english and about ease of manipulation of abstract concepts and I am start to think I am with little chances to really get the point of the global, local matter..
Then, sorry If I repeating concepts or words, this is my only chanche to try to understand and achieve some points about.


I like to see people who are passionate about flight like you. It's obvious that you know the matter about the lift of a wing
I am a real fan about flight dynamic too so your attached pic is probably the only one thing I really understand in this thread
I am trying with all my brain forces to program a flight simulator and my BIG lucky about is that I have a friend who is captain of airliners and he really happy about this project and he giving me ALL damn maths about flying dynamic. I am a fan of the flight since I was a child, I always knew how complex the matter is but from the moment I started talking ,with this friend, about the flight dynamics so...
..so I realize I was just in a species of SUPER ARCADE knowledge about..
Lucky he is really good on maths and physic so, maybe, something can born.. Obvious that I am using a physic engine and I MUST to understand as much as possible, especially "the forces".
So.. back to your words..


1st STEP)
Quote: "Yes, if you want the forces to always act on the same part of the wing, use LOCAL POS"

I would these forces always act on the upper side of the wing. But I would also like that these forces have different LOCAL coordinates ON THE UPPER SIDE OF THE WING. (exactly as the my last attached pic)
So following your words I can hypothesize that each of these 4 forces have different XZ LOCAL coordinates.. and same Y LOCAL coordinate... right?

(yes yes I know that these forces should start from the inside of the wing as your attached pic but to assist me as better, let these forces will start from the upper side of the wing for now!)


2nd STEP)
A) Then all these 4 forces will have their Y LOCAL COORDS with the same value 'cause all 4 forces will born on the upper surface of the wing...

B) therefore the upper side of the wing will be in WING MAX Y LOCAL COORDINATE.

C) therefore all 4 forces will born on the WING MAXIMUM Y LOCAL COORDINATE of the wing...


3rd STEP)
The X and Z coordinates of these forces will be different 'cause Yes, I would to place these forces all on the wing surface but I would that these 4 forces have different positions on this wing surface (always as my last attached pic)


4th step)
As your words and your picture, I would my lift forces drag my wing ALWAYS using a RESULTANT FORCE. Then I always get my simulate wing act as a real wing about this point.
IF my wing will be rotated, alway the RESULTAN FORCE working as in your attached picture.


FOR NOW I STOP here, I don't want to stress you too much cause I understand how many complex and infinite this matter is...
and before to talk about the right DarkDynamix command to use, I would to know If these 4 steps are right or not......

Ps. I fear about all 4 steps are wrong ahah...

EDIT:
After all that theory of this thread I am testing live with my program using a box 5,50,5 (like a building) and probably I am starting to understand something
Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 31st Oct 2012 13:51 Edited at: 31st Oct 2012 13:58
FINALLY I got the situation!
The perfect mix between theoretical help by fallout and a lot of tests of various DYN force commands on various shape objects, let finally me to understand the logic behind global and local positions and forces!

I made a object like a building and another one like a sheet and I applied before the DYN ADD FORCE. Later I applied the DYN ADD FORCE AT LOCAL POS command and finally I GOT THE LIGHT! haha

So I start to apply to the sheet (so and so a wing) the DYN ADD FORCE AT LOCAL POS (with a Y positive global force) 'cause I was sure that it was the correct command but NOT!
Yeah, in a first moment it can seems but not, 'cause the FORCE IS GENERAL and can't exist the RESULTANT FORCE!
In fact with this command my UP is always UP, even if the wing is rotated.

SO.........
the right command is:
DYN ADD LOCAL FORCE AT LOCAL POS


with precision is:




Yes I know it's not a DRAG (as the real lift of wing by the air) but it's just a PUSH but the effect is the same!


With this command I can push up my wing from a precise XYZ local point of the wing AND this command provide me ALWAYS the UP force is a RESULTANT FORCE (cause I set the local parameters of the command in a way to do that!)

Maybe I am yet with some confusions but sure I obtained at least the ticket for entering in this matter.

THANK YOU SO MUTCH Fallout!
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 31st Oct 2012 14:48
hahaha. Sounds like you have finally worked it out! It's so good when a problem 'clicks' in your brain and makes sense. So yes, it sounds like you're on the right track now. Well done!

I do quite like planes and plane physics. I have even designed and built 4 remote controlled planes out of depron foam. One of them was a B25 with a profiled wing, two were flat wings without a profile, and 1 was a stepped delta wing. The one thing I learnt was that, so long as you have control surfaces (ailerons, rudder, elevator), anything will fly. Just put a big engine on it, get the centre of mass correctly balanced, and it'll fly .... it might fly badly, but it'll fly.

Good luck with your game.






Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 31st Oct 2012 15:29 Edited at: 31st Oct 2012 15:42
Ahhhh great!! and really compliments for your results building these models! these models are FANTASTIC! (I can't imagine how many times to build all of these..)

I lived great moments of my life with RC planes too! (unfortunately many years ago..)

I own a RC Cessna 172 plane with 174cm of wingspan and Tiger combustion engine! (today is covered with dust in a closet )

So I was right when I wrote that you knew the matter of flight dynamic!

The amazing sensation when you face the take-off, flight and landing situations!
The "funny desperation" when you get a damn crash or the "great funny sensation" when you can make the right maneuver that saves the rc plane some centimeters from the ground!
And the time spent in modifications or rebuilding the rc plane after a crash or (as your case) in the BUILDING from zero of a RC PLANE!

I and my friend trying to make a physic world more near as possible to a real world where If I will change the shape of my airplane wings and fusolange objects so I will got different flight models!
I know it's really a BIG thing to reach but MAYBE, with a lot of brain and keyboard work and your and in general forum help, is it possible

Thank you for your help, really!
Fallout
21
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 31st Oct 2012 17:45 Edited at: 31st Oct 2012 17:47
No problem! It's nice to see someone asking for help who has put a lot of thought into their problem. With your diagrams it shows you've tried hard before asking, which is appreciated.

Coming up with a realistic flight model with wind resistance and fuselage shape etc. will definitely be a challenge. I would suspect the best bet would be to hard code variables rather than trying to simulate how wind affects a mesh. For example, it would be easier and more realistic to say "This mesh has a wind resistance of 10 and stability of 12" than write a program which calculates those values by analysing the mesh. Keep it simple!

I think if you can master the simulation of the wing then you'll have the basis for a good flight simulation. Good luck!

Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 31st Oct 2012 20:26
Quote: "For example, it would be easier and more realistic to say "This mesh has a wind resistance of 10 and stability of 12" than write a program which calculates those values by analysing the mesh. Keep it simple! "


yeah! really a great idea! I hope I will able to show you my progress soon!

Login to post a reply

Server time is: 2024-04-18 14:44:20
Your offset time is: 2024-04-18 14:44:20