FSIC Messageboard
  Tech Talk
  obBodyPts()

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   obBodyPts()
FarmerJoe
Pilot
posted 12-14- 12:49 AM     Click Here to See the Profile for FarmerJoe   Click Here to Email FarmerJoe     Edit/Delete Message   Reply w/Quote
I think quite a few of us need to understand how this function works? There has to be more to it than just putting in the vertice coordinates, there has to be some sort of order...there just has to be lots of shit attached to it like everything else, and that's why my damned hook won't grab the cable. HELP!

FarmerJoe

IP: Logged

Tailslide
Pilot
posted 12-14- 02:23 AM     Click Here to See the Profile for Tailslide   Click Here to Email Tailslide     Edit/Delete Message   Reply w/Quote

The way I understand it, the bodypts are just that .. points. The point has to collide with a polygon for a collision to take place. So you either need a really fat cable or lots of points along the end of your hook so one is guarunteed to run into the cable. Also you need a DOF so the hook can bend up when you hit the deck.

TS

IP: Logged

Michael Harrison
General
posted 12-14- 07:15 AM     Click Here to See the Profile for Michael Harrison   Click Here to Email Michael Harrison     Edit/Delete Message   Reply w/Quote
Farmer, body points are just points of collision with a material property.

The type of point you should use is CSurfacePoint (which is actually the default if you don't have a ptProto property). This also gives you the ability to specify the pt material. The material affects the coefficient of friction (how easy or difficult it is to drag across a surface)

To quote The Manual...

"8.2.22 class CSurfacePt : public CBodyPt
CSurfacePt generates collision and friction forces when the body point comes into contact with a surface (polygon). The size and direction of the forces depends on the material properties of the surface and the point."

collision points in general don't generate a collision unless the come into contact with a valid face of a polygon. IE, if the polygon has only one side, only the front has the possibility to generate collisions.

IP: Logged

Sv
Pilot
posted 12-14- 08:54 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Ahhh the OpenPlane bible

Chapter 8.2.22, from the book of CSurfacePt:

public CBodyPt
Ye Holy CSurfacePt shall generatuth collision and friction forces whenuth the body point cometh into divine contact with a surface (polygon). And yea the size and direction of the forces art dependuth on the material properties of the surface and the Holy point of divine divinity."

Can we make an OPPs project to update the entire OpenPlane bible to the deserved reverent King Jame's English?

------------------
-Sv =FC=

WWI in SDOE!

IP: Logged

FarmerJoe
Pilot
posted 12-14- 08:57 AM     Click Here to See the Profile for FarmerJoe   Click Here to Email FarmerJoe     Edit/Delete Message   Reply w/Quote
Thanks guys!

So basically all I have to do is, put a point on the face, where it "sticks out" the most? Then I will have guaranteed contact? Also does the way the hook is facing have something to do with the problem I am having? OOOO OOOO one more question, do you use the object's co-ords or the co-ords in the actual world of sdoe?

yall take'd easy now
FarmerJoe

IP: Logged

Sv
Pilot
posted 12-14- 09:27 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
I asked that before heheh - use the coords of the object itself, so 0,0,0 would mean put a contact point at the origin of the object.

At least that is what I think is the case - I have had trouble... are you using fake DOFS in OPS to find the coords?

-Sv

IP: Logged

charmstar
Pilot
posted 12-14- 06:55 PM     Click Here to See the Profile for charmstar   Click Here to Email charmstar     Edit/Delete Message   Reply w/Quote
So let me get this straightened out:

Any object that I use the ObBodyPt for, I should declare the position of the BodyPt in terms of the origin of the object, or in terms of the origin of the parent of that object? If I'm looking at setting a BodyPt for an aileron, are the coords in terms of the aileron's space, or the wing's space?

Also, in order to make it contact with the ground properly, I don't need to use the ptProto property, because the default is CSurfacePoint, which is what we want correct? So, all I should have to do is put in the point in the proper object's coord. system, and then if that point ever bumps into anything, damage will be caused. Is this true?

charmstar

IP: Logged

mposis
Pilot
posted 12-14- 07:31 PM     Click Here to See the Profile for mposis   Click Here to Email mposis     Edit/Delete Message   Reply w/Quote
Michael,

I made a tail hook for the Zero and it doesn't seem to collide with the carrier deck. Like you said I did not specify a ptproto for it. The wheels of the Zero seem to hit the cable but the hook just passes through.

Here are the pictures:
Retracted hook:

extending:

fully extended:

Here is how I declared it:
[DOF:324632:145]
2 ; kind
0.000000000 -10.40318012 -1.200205326 ; origin
1.000000000 0.000000000 0.000000000 ; axis
0.000000000 45.00000000 ; min max
####(dofID 'thook dofOsc (oscName 'thook oscRuntime 4 oscParent 'a6m5 oscCmd 'cmdHookToggle 'cmdRunReverse)##
[Group:324785:1672]
125 ; Group number
[Matrix:324793:64]
1.000000000 0.000000000 0.000000000 0.000000000
0.000000000 1.000000000 0.000000000 0.000000000
0.000000000 0.000000000 1.000000000 0.000000000
0.000000000 0.000000000 0.000000000 1.000000000
[Group:324865:1592]
126 ; Group number
[LOD:324873:1528] ; lod142.fsd / .lod
142 ; LOD number
[Translate:326409:12]
0.000000000 -12.05130005 -0.9096509814
[Model:326429:28]
185 ; modelname: hook
142 ; LOD number
-1 ; no LOD specified
-1 ; no LOD specified
-1 ; no LOD specified
-1 ; no LOD specified
-1 ; no Parts specified
[ENDGroup]
125 ; Group number
[ENDGroup]
126 ; Group number

IP: Logged

Bryan Russell
Pilot
posted 12-14- 10:18 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
I'm pretty sure you will need a proplist with the obBodyPts in there.

IP: Logged

Jaguar
Pilot
posted 12-14- 11:31 PM     Click Here to See the Profile for Jaguar   Click Here to Email Jaguar     Edit/Delete Message   Reply w/Quote
if you do get it to have a collision point, and have it lower that far, then it will raise the tail up in the air. As far as I know, there is no way to "Drag" a lod along the ground...... Michael could you PLEASE prove me wrong?

------------------
Cheers!
Jaguar
www.fshangar.com

IP: Logged

Bryan Russell
Pilot
posted 12-15- 12:15 AM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
I'm no DOF expert, but if you had a rotational DOF with a loose "spring" (or no spring perhaps) wouldn't this do what you're talking about?

This would be similar to how the gear's translational DOF's go up and down when they contact the ground, except that movement is rotational rather than straight.


Bryan

IP: Logged

FarmerJoe
Pilot
posted 12-15- 12:44 AM     Click Here to See the Profile for FarmerJoe   Click Here to Email FarmerJoe     Edit/Delete Message   Reply w/Quote
Jaguar:

If you can't drag a lod on the ground, then why when the wing detaches does it drag across the ground? The fact that it is on the plane shouldn't have to do anything with that correct me if I am wrong.

Bryan:
Now please explain this to me, how come you make an aircraft carrier put a cable on it, everything's just peachy, but when you put a tail hook on a plane "FUBAR"...About the DOF (why do you need to put a dof in there in order for it to make contact with the ground) please explain.

all:
I have been workin on the obBodyPts() for about 3 days now and still I can't get that hook to hit the ground any which way what so ever.

yall take'd easy now
FarmerJoe http://members.xoom.com/sdoesbeauts

IP: Logged

Tailslide
Pilot
posted 12-15- 03:58 AM     Click Here to See the Profile for Tailslide   Click Here to Email Tailslide     Edit/Delete Message   Reply w/Quote

You need a DOF otherwise the hook will not bend back up towards the plane as you drag it along the ground and the tail lowers.

I read the section on CSurfacePt and CBodyPt before my first post.. as far as I can tell CSurfacePt is just a type of body point that handles friction. Why wouldn't a BodyPt work as well? They work when I drag my wingtips along the ground.

TS

------------------
________________________
TS Aircombat

IP: Logged

Pete Hawk
Pilot
posted 12-15- 06:39 AM     Click Here to See the Profile for Pete Hawk   Click Here to Email Pete Hawk     Edit/Delete Message   Reply w/Quote
Here is a DOF property I just added to the Zero to retract the hook (using -80 as the max setting). I did it using OPS, and just selected the hook, and in the DOF property area right clicked and chose "add dof". Bryan, OPS rules! I love it. Back to the hook, it works fine and in conjunction with the gear for this quick test, BUT the thing still doesn't feel the ground. Hook goes right through it. It seems the very tip of that hook needs to have the right property assigned to it so that it will bend/pivot backwards and drag along the ground/carrier. But you guys know this already. Hmmm, everyone keep hammering away at this, as we are going where OpenPlane has not gone before!
:P


(dofID 'Tailhook dofOsc (oscName 'Tailhook oscDelayBgn 0 oscRuntime 4 oscDelayEnd 4 oscParent 'a6m5 oscCmd 'cmdGearToggle 'cmdRunReverse 'cmdGearUp 'cmdRunForward 'cmdGearDown 'cmdRunBackward oscEndHidden 'g294)

[This message has been edited by Pete Hawk (edited 12-15-1999).]

IP: Logged

Sv
Pilot
posted 12-15- 08:06 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
From what I have seen, my guess is:

You need to ad an obBodyPt to the tip of the hook. Then you need to add a very weak spring to the DOF Pete did - this will allow the hook to hing up when contacting the ground.

I know the spring part will work, but I'm not sure if the obBodyPt will tranfer forces to the spring. Maybe only airfoil objects can have forces tranfered to DOF springs, and in that case only air forces, not ground/object forces.

Well wait... If you taxi and hit a hanger with your wing, your wing detaches - is this due to wing damage, or is the spring breaking under the force? Hmmmm...

------------------
-Sv =FC=

WWI in SDOE!

IP: Logged

Pete Hawk
Pilot
posted 12-15- 11:11 AM     Click Here to See the Profile for Pete Hawk   Click Here to Email Pete Hawk     Edit/Delete Message   Reply w/Quote
You raised a good point. And it makes me ask this question, will damaging a one piece wing which has a dof spring in the center of it cause the wing to bend when hitting something? Or does the bend occur between the two lods (like a two piece wing... inner and outer wing parts)?

[This message has been edited by Pete Hawk (edited 12-15-1999).]

IP: Logged

Sv
Pilot
posted 12-15- 11:38 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Bending will only occure at the LOD level - so a one piece wing with a vertical spring DOF in the center will not bend sideways. However, you can out another spring DOF in the center, this time a rotate DOF around the horizontal. This will let the wing swivel if you hit something... but I bet a hard spin would swivel the wing as well.

Here is the real question: Would the rotated wing affect FM? I know that a dihedral based on rotation will change the force vectors - but the case of a swiveled wing must not be modeled - it would be so complex! If it was modeled, you could create a poly-hedral wing and turn with rudder only - as the plane skids sideways there is a dramatic increase of AOA on the outside wing - causing the plane to roll. I don't think this is part of the OpenPlane FM, is it?

So many things to think about... the definition of fun!

------------------
-Sv =FC=

WWI in SDOE!

IP: Logged

Michael Harrison
General
posted 12-15- 12:10 PM     Click Here to See the Profile for Michael Harrison   Click Here to Email Michael Harrison     Edit/Delete Message   Reply w/Quote
It sounds like several of you are confused as to how collision points and DOFs relate.


They don't. Not in a literal sense anyway.

To have a collision occur, you do not need any DOFs.

To have a collision occur, you do need some kind of obBodypt. Without a collision point, there's nothing that will cause a collision to be detected.

The reason you'd want the DOF in there is that when the collision occurs (assuming you've put the bodypt at the tip of the hook) you don't want the engine jerking the airplane to an immediate stop, or causing it to immediately reverse direction. Using a spring DOF should cause energy to be absorbed (which is what the cables do in real life), causing the plane to slow drastically.

IP: Logged

mposis
Pilot
posted 12-15- 01:03 PM     Click Here to See the Profile for mposis   Click Here to Email mposis     Edit/Delete Message   Reply w/Quote
Michael,

I still can't figure this out.

Here is the declaration for the cable:

[Group:101206:8244]
1 ; Group number
[LOD:101214:8168] ; lod001.fsd / .lod
1 ; LOD number
[Comment:109390:4]
#####
[Translate:109402:12]
0.000000000 0.000000000 0.000000000
[Model:109422:28]
20 ; modelname: cable
1 ; LOD number
-1 ; no LOD specified
-1 ; no LOD specified
-1 ; no LOD specified
-1 ; no LOD specified
-1 ; no Parts specified
[ENDGroup]
1 ; Group number

Why does the wheels collide with the cable even though there is no obBodypts declared for the cable? Is it because the hook moves while the cable doesn't?

IP: Logged

Sv
Pilot
posted 12-15- 03:49 PM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Here is my educated guess: (am I right? heheh)

ObBodyPts cause collisions when they hit ANY POLYGON. Polygons cause no collisions.

I think this is how it works, but I am not sure...

So the hook needs a collision point to hit the wire ploygon. I do not know how you would get the wire to move. Maybe it needs its own collision points, inertia, and spring DOF that lets it move in response to the force from the hook...

-Sv

IP: Logged

Bryan Russell
Pilot
posted 12-15- 05:48 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
OK I'll add my 2c worth to this thing (thats only about 1.2c US, so it's not worth much) this isn't gospel just my thoughts.

Firstly probably get the terminology right as that is normally the biggest cause of misinterpretation


LOD - A mesh made up of vertices, polygons and texture information. The highest detail LOD also lends its polygons to the smObject for collision detection.

smObject - a object constructed during load time from the various Model, Comment, Matrix, LOD, Translation etc records according to the loading rules of the SM file. a smObject represents the attributes a particular part of a OpenPlane object possesses including look, and behavior.

Model - a Record that is the focal point of smObject creation and represents the smObjects hierarchical relationships to each other.


obBodyPt - a property defined for a smObject via a Comment record that defines one or more points that are used for collision detection. a obBodyPt can have a class (defined by ptProto property) of either CSurfacePt, CTirePt or CPropPt. CSurfacePt is the default if no class is specified. A ptMaterial property can also be defined which defines how a collision point interacts, with a polygon with a particular material. Try setting the wheels of an aircraft to "ptMaterial 'water" and see what happens! (that need to be part of the obBodyPt proplist BTW)

So now the description

1. Collisions are detected by the OpenPlane Engine when a obBodyPt defined point comes in contact with a polygon.

2. When a collision occurs a force is transferred to the colliding objects, in the direction the collision occurred, based on the interaction programmed for the material of the obBodyPt and the Polygon. For example rubber hitting cement would have more friction than ice hitting metal.

3. If there is no "Give" defined in the direction of the applied force (via a DOF), the part will be broken off from its parent, if the impact force is high enough. (there might have to be something explicitly defined for the breaking to happen)

4. If a DOF is defined for the smObject , it will react to the force depending on how the DOF is defined. Any spring and damping properties of the DOF will act to absorb the force of the collision. For example the struts on most landing gear have a translational DOF with some springiness. When wheels collide with the ground, the DOF moves and absorbs the force on impact, if you hit the ground too hard the DOF will be pushed past its limits and the gear will break.

5. So.. for the tail hook, if obBodyPts are defined so that they will collide with the cable, (note that you will need enough obBodyPts to "capture" the cable so that it doesn't "slip" out) then you might want to define a rotational DOF with some springiness so that when the cable (or deck) hits the hook, it can give a bit and fold back. Also a translational DOF that will absorb force along the length of the hook, would also be good. For the cable, you will need to define a translational DOF that will move and absorb the force of the hook (and attached aircraft) hitting it. It would be cool to make the cable bend like a piece of string would but it might only be possible to have the whole cable stay straight and move along the deck.


I’ve started work on a bodyPt function for OPS as this seems to be quite a critical issue. I hope to release a beta version fairly quickly that will display the bodyPts (manual edit) so that at least it might help people to understand what they do.

Bryan

IP: Logged

Bryan Russell
Pilot
posted 12-15- 05:48 PM     Click Here to See the Profile for Bryan Russell   Click Here to Email Bryan Russell     Edit/Delete Message   Reply w/Quote
OK I'll add my 2c worth to this thing (thats only about 1.2c US, so it's not worth much) this isn't gospel just my thoughts.

Firstly probably get the terminology right as that is normally the biggest cause of misinterpretation


LOD - A mesh made up of vertices, polygons and texture information. The highest detail LOD also lends its polygons to the smObject for collision detection.

smObject - a object constructed during load time from the various Model, Comment, Matrix, LOD, Translation etc records according to the loading rules of the SM file. a smObject represents the attributes a particular part of a OpenPlane object possesses including look, and behavior.

Model - a Record that is the focal point of smObject creation and represents the smObjects hierarchical relationships to each other.


obBodyPt - a property defined for a smObject via a Comment record that defines one or more points that are used for collision detection. a obBodyPt can have a class (defined by ptProto property) of either CSurfacePt, CTirePt or CPropPt. CSurfacePt is the default if no class is specified. A ptMaterial property can also be defined which defines how a collision point interacts, with a polygon with a particular material. Try setting the wheels of an aircraft to "ptMaterial 'water" and see what happens! (that need to be part of the obBodyPt proplist BTW)

So now the description

1. Collisions are detected by the OpenPlane Engine when a obBodyPt defined point comes in contact with a polygon.

2. When a collision occurs a force is transferred to the colliding objects, in the direction the collision occurred, based on the interaction programmed for the material of the obBodyPt and the Polygon. For example rubber hitting cement would have more friction than ice hitting metal.

3. If there is no "Give" defined in the direction of the applied force (via a DOF), the part will be broken off from its parent, if the impact force is high enough. (there might have to be something explicitly defined for the breaking to happen)

4. If a DOF is defined for the smObject , it will react to the force depending on how the DOF is defined. Any spring and damping properties of the DOF will act to absorb the force of the collision. For example the struts on most landing gear have a translational DOF with some springiness. When wheels collide with the ground, the DOF moves and absorbs the force on impact, if you hit the ground too hard the DOF will be pushed past its limits and the gear will break.

5. So.. for the tail hook, if obBodyPts are defined so that they will collide with the cable, (note that you will need enough obBodyPts to "capture" the cable so that it doesn't "slip" out) then you might want to define a rotational DOF with some springiness so that when the cable (or deck) hits the hook, it can give a bit and fold back. Also a translational DOF that will absorb force along the length of the hook, would also be good. For the cable, you will need to define a translational DOF that will move and absorb the force of the hook (and attached aircraft) hitting it. It would be cool to make the cable bend like a piece of string would but it might only be possible to have the whole cable stay straight and move along the deck.


I’ve started work on a bodyPt function for OPS as this seems to be quite a critical issue. I hope to release a beta version fairly quickly that will display the bodyPts (manual edit) so that at least it might help people to understand what they do.

Bryan

IP: Logged

Pete Hawk
Pilot
posted 12-15- 07:27 PM     Click Here to See the Profile for Pete Hawk   Click Here to Email Pete Hawk     Edit/Delete Message   Reply w/Quote
That's great news Bryan, thanks!

IP: Logged

FarmerJoe
Pilot
posted 12-16- 03:42 AM     Click Here to See the Profile for FarmerJoe   Click Here to Email FarmerJoe     Edit/Delete Message   Reply w/Quote
I was takin it easy drinkin beer and dickin with the obBodyPts() again...Ahummmm I GOT THE HOOK TO GRAB THE CABLE YEEEEEEHAWWWWWWWWWWW.

I put a dof on that whore and now it works

yall take'd easy now
FarmerJoe

IP: Logged

Sv
Pilot
posted 12-16- 05:41 AM     Click Here to See the Profile for Sv   Click Here to Email Sv     Edit/Delete Message   Reply w/Quote
Thanks Bryan, well said!

Also note that the OpenPlane documentation states that DOF springs only apply to TRANSLATION DOFS, not ROTATION DOFS. This is, of course, not true. There are many rotation spring DOFS working in OpenPlane now on the shipping planes...

Also I look forward to obBodyPts editing in OPS! That will rule!

-Sv

[This message has been edited by Sv (edited 12-16-1999).]

IP: Logged

Pete Hawk
Pilot
posted 12-16- 06:49 AM     Click Here to See the Profile for Pete Hawk   Click Here to Email Pete Hawk     Edit/Delete Message   Reply w/Quote
Farmer,

Would you be so kind as to zip up your new working Zero and Akagi and post it on your site? I can't wait to see this!

Nice work!

IP: Logged

mposis
Pilot
posted 12-16- 08:45 AM     Click Here to See the Profile for mposis   Click Here to Email mposis     Edit/Delete Message   Reply w/Quote
I added obBodypts to the end of the hook but it still pass through the carrier deck.

IP: Logged

mposis
Pilot
posted 12-17- 07:09 AM     Click Here to See the Profile for mposis   Click Here to Email mposis     Edit/Delete Message   Reply w/Quote
FarmerJoe,

Do you think I can download the working tailhook and carrier? Thanks.

------------------
Glad I had my seatbelt on...

IP: Logged

FarmerJoe
Pilot
posted 12-18- 03:36 AM     Click Here to See the Profile for FarmerJoe   Click Here to Email FarmerJoe     Edit/Delete Message   Reply w/Quote
The hook isn't fully functional but it hits the ground and the deck, and sometimes I can get it to grab the cable...I also found something out about the obBodyPts() if you put phLBS() in there, it works! So try that MP and also be sure you have a dof for it =). goto my site and where it says download here tailslide or something like that. Click on it =)

take'd easy now
FarmerJoe http://memebers.xoom.com/sdoesbeauts

[This message has been edited by FarmerJoe (edited 12-18-1999).]

IP: Logged

mposis
Pilot
posted 12-18- 06:35 AM     Click Here to See the Profile for mposis   Click Here to Email mposis     Edit/Delete Message   Reply w/Quote
FarmerJoe,

Thanks. I downloaded the file. It needs the weight and the collision points to work. Also, I discovered that if you drag the hook on the deck it will slow down the plane. Maybe we don't need a cable after all.

IP: Logged

Tailslide
Pilot
posted 12-18- 12:12 PM     Click Here to See the Profile for Tailslide   Click Here to Email Tailslide     Edit/Delete Message   Reply w/Quote

: ) "Throw out the anchor !"

IP: Logged

Pete Hawk
Pilot
posted 12-18- 08:29 PM     Click Here to See the Profile for Pete Hawk   Click Here to Email Pete Hawk     Edit/Delete Message   Reply w/Quote
Could someone post the models that actually work? I'm working on several OP projects right now and don't have time to mess with it. I would however like to drop the files in SDOE and give it a quick try though.

Thanks

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | Fighter Squadron Information Center

(This site Copyright (c) 1999 Inertia LLC)

Powered by Infopop www.infopop.com © 2000
Ultimate Bulletin Board 5.45c