Robots

Author Topic: GMF ('How-to' mods and notes)  (Read 6925 times)

Offline Madiaba

  • *
  • Posts: 1438
  • Reputation: 8
    • View Profile
GMF ('How-to' mods and notes)
« on: August 08, 2009, 03:33:21 PM »
[/color]
« Last Edit: July 15, 2010, 11:39:27 AM by Madiaba »
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline Clickbeetle

  • *
  • Posts: 3323
  • Reputation: 21
  • In Soviet Russia, bugs stomp YOU!
    • View Profile
    • Beetle Bros site
GMF ('How-to' mods and notes)
« Reply #1 on: August 09, 2009, 06:38:54 PM »
Excellent tutorial.  I wish this was around a couple years ago; it would have saved me a lot of grief.  It was a while before I finally understood those dang TM rows.

Two things I have to add.  One, a helpful tip:  Attach points always face in the positive Z direction.  So whatever way you want stuff to attach, make the Z axis face that way.

Two, a more in depth explanation of rotating TM_ROWs.

Say you need to rotate, say, an attach point 30 degrees, or even something really weird like 271.2 degrees.  How do you do that?

Well, it's pretty simple with a little math, and once you realize that the length of any one of the TM_ROWs always equals 1.

The examples Mad gave full of 0.7071's will rotate the attach point 45 degrees.  Why all the long decimal numbers?  Well, since the length of any axis always equals 1, you can't just do

Code: [Select]
*TM_ROW1  1  0  -1
*TM_ROW2  0  1  0
*TM_ROW3  1  0  1

in order to rotate the attach point 45 degrees, halfway between the X and Z axes.  That won't work.

In order to get the correct numbers, you need to imagine a circle with radius 1, and rotate the axes inside that.  It will help here if you've had some basic trigonometry because you'll be using sine and cosine functions.  Basically, the cosine of the angle you want gives you the X coordinate on the circle, and the sine of the angle you want gives you the Y coordinate.  Plug in cos(45) to a calculator and you'll get about 0.7071.  That is the terminal X coordinate of a line with length of 1 at 45 degrees.  You'll get the same number for sin(45).

So the correct numbers for a 45 degree rotation are

Code: [Select]
*TM_ROW1  0.7071   0  -0.7071
*TM_ROW2  0          1   0
*TM_ROW3  0.7071  0  0.7071

***IMPORTANT NOTE***  If you're doing sine and cosine on a calculator, MAKE SURE YOU'RE IN DEGREE MODE AND NOT RADIANS.  Radians are multiples of pi with 180 degrees = pi and 360 degrees = 2pi.  Obviously, 45 will be a much different number in Radians mode than in Degree mode, and you'll get bogus numbers.

Now let's get back to doing weirder rotations like 30 and 271.2 degrees.  Once you understand 45 degrees (or any other angle), it's pretty simple.  Just plug in cos(30) and sin(30) as the x,y coordinates of the X and Z axes.

Code: [Select]
*TM_ROW1  0.866  0  -0.5
*TM_ROW2  0        1   0
*TM_ROW3  0.5     0   0.866

Sketching it out on a piece of paper helps to understand where to put the numbers, and whether they should be positive or negative.  The key thing to remember is that the angles between axes are always 90 degrees, so if you rotate one axis, you will have to rotate another one to compensate for it.

If you get the numbers wrong, you'll end up with something like the Distortion Field in Firebeetle's Component Pack :mrgreen:

I think that just about covers it.  Basically, you just need to "get it" with one angle, and then you'll understand them all.

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings

Offline Madiaba

  • *
  • Posts: 1438
  • Reputation: 8
    • View Profile
GMF ('How-to' mods and notes)
« Reply #2 on: August 09, 2009, 07:55:28 PM »
*Cricket noise, cricket noise, cricket noise,.......*
..
Thanks, CB, for the added help. Greatly appreciated.
Sorry, I've been sitting on the info for a while, since few dive in here. And I'm often accused of 'over-doing' it in my explanations, which I already thought I had done from the response of utter silence...
..
Several arena and component makers(nice-:-D) were inquiring how to turn things in the gmf. I was told by a couple that they didn't understand my first chart too well. So I made it more user-friendly here. Didn't want to 'over-do' it so I stayed with the 4 cardinal point and 45 degree increments, to save from confusion. I left the 'place values' long because that's what they will encounter in a stock gmf, again for the same reason.
..
BTW: I really DO like helping modders and tweakers, but I'm sorta run-down from helping so many through the week, continuously. Do you think that you or Serge or Apanx (maybe Trov) could help out during the week sometimes? Let me know (PM) please...
 
.
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline Clickbeetle

  • *
  • Posts: 3323
  • Reputation: 21
  • In Soviet Russia, bugs stomp YOU!
    • View Profile
    • Beetle Bros site
GMF ('How-to' mods and notes)
« Reply #3 on: August 09, 2009, 08:47:13 PM »
I try to help when I see someone asking about Python or GMF's, but you usually get to them first :mrgreen:

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings

Offline Trovaner

  • *
  • Posts: 1222
  • Reputation: 32
    • View Profile
GMF ('How-to' mods and notes)
« Reply #4 on: August 10, 2009, 10:33:49 AM »
I made this excel file a while back that simplifies rotating things. You guys are doing things a little differently than what is being done in the excel file but for the most part, the end results are the same... Feel free to change it all you want. It currently has a converter for degrees to radians, a TM_ROW rotator (which probably could be made more user friendly), and a mesh resizer.

I'm willing to help anyone that asks.  Although I'm still open to helping people with other things, I know the most about Python and GIB files.

Offline Serge

  • *
  • Posts: 1483
  • Reputation: 13
    • View Profile
    • http://www.q3k.org/
GMF ('How-to' mods and notes)
« Reply #5 on: August 12, 2009, 03:30:32 PM »
I am willing to help anyone with GMF files. I daresay I know everything about them (including PointToPoint and AngularDashPot constraints, and some other weird sh**.)
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline Madiaba

  • *
  • Posts: 1438
  • Reputation: 8
    • View Profile
GMF ('How-to' mods and notes)
« Reply #6 on: August 12, 2009, 05:47:53 PM »
^^Hehe^^, Wouldn't doubt that at all, Serge.
BTW: I did get your IM-ed Python inquiry. Check the py docs I gave you already; don't remember the exact question, but I think it's already in there. I'll get back with you soon. Just that work is never-ending this month...
 
If you desire to and can, Serge, you can hack away at explaining some of the other GMF topics listed above (or add some more topics)... :)
 
'Dziekuje', Serge. *hope it's spelled right and didn't say something nasty*
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline Avalanche

  • Current DSL HW Champion.
  • Ultra Heavyweight
  • Posts: 3085
  • Reputation: -35
  • Better than the mods
    • View Profile
Re: GMF ('How-to' mods and notes)
« Reply #7 on: January 30, 2010, 03:29:51 PM »
Can you make the text bigger?
Reigning DSL HW Champion, with 2 victories so far: One over Ty4er and one over DSC.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.

You don't have to like me. You don't have to respect me fully. But you do have to acknowledge what I've achieved.

I, for one, welcome our new Apanx overlord.

Offline Naryar

  • *
  • Posts: 21983
  • Reputation: 19
  • You are already defeated.
    • http://www.youtube.com/us
    • View Profile
  • Skype: TheMightyNaryar
Re: GMF ('How-to' mods and notes)
« Reply #8 on: January 30, 2010, 03:32:44 PM »
 :eek: i never saw this thread

 

Offline JoeBlo

  • *
  • Posts: 14546
  • Reputation: 13
    • View Profile
Re: GMF ('How-to' mods and notes)
« Reply #9 on: January 30, 2010, 07:27:21 PM »
there is my thread that you said you weren't going to read  :frown:

@Avalanche: if you mean font size hold down Ctrl while in your internet program and scroll with the mouse to zoom
14x BOTM Winner - Robot Arena for Mac

Offline Naryar

  • *
  • Posts: 21983
  • Reputation: 19
  • You are already defeated.
    • http://www.youtube.com/us
    • View Profile
  • Skype: TheMightyNaryar
Re: GMF ('How-to' mods and notes)
« Reply #10 on: February 11, 2010, 06:31:54 AM »
Nice tutorial, will read it soon.

Anyways,



After a few tries, I am still absolutely unable to get a second opposite attachment point on the sawblades (like that was done on the chewblades) because i want them to be chain-able for NAR AI v2.2 so you can make sawblade drums (i will also change the replica discs's APs in a similar way)

Here is part of the the modified sawblade1.GMF that when compiled back either crashes my game, either changes the sawblade to a huge-ass flat thing that does not look at all like a sawblade...

________________

(start of the GMF)
{
   *OBJECT_COUNT   6
   *GEOMOBJECT
   {
(Unchanged mesh info)
   }
   *GMID_ATTACHMENTPT
   {
      *NODE_NAME   Point01
      *NODE_TM
      {
         *NODE_NAME   Point01
         *TM_ROW0 1   0   0
         *TM_ROW1 0   1   0
         *TM_ROW2 0   0   1
         *TM_ROW3 0   0   2
      }
      USER DATA   type = attach
      
id = 1

attach = axle_F, axle_M
   }
   *GMID_ATTACHMENTPT
   {
      *NODE_NAME   Point02
      *NODE_TM
      {
         *NODE_NAME   Point02
         *TM_ROW0 1   0   0
         *TM_ROW1 0   -1   0
         *TM_ROW2 0   0   -1
         *TM_ROW3 0   0   2
      }
      USER DATA   type = attach
      
id = 2

attach = axle_F, axle_M
   }

   *GMID_HAVOK_SIMOBJECT

(end of the GMF)

______________________________________

Changes are bolded.

I changed the OBJECT_COUNT to 6 since there is one more AP (when it is kept at 5 it crashes my game) but it still doesn't seems to work :(

Any help ?
« Last Edit: February 11, 2010, 07:15:25 AM by Naryar »

Offline JoeBlo

  • *
  • Posts: 14546
  • Reputation: 13
    • View Profile
Re: GMF ('How-to' mods and notes)
« Reply #11 on: February 11, 2010, 08:39:22 AM »
gah mental blank

I will do a bit of quick refreshers....I think I may know your issue
14x BOTM Winner - Robot Arena for Mac

Offline Serge

  • *
  • Posts: 1483
  • Reputation: 13
    • View Profile
    • http://www.q3k.org/
Re: GMF ('How-to' mods and notes)
« Reply #12 on: February 11, 2010, 06:17:38 PM »
Care to upload the file somewhere? I'll take a look at it.
Use http://www.drop.io/ .
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline Clickbeetle

  • *
  • Posts: 3323
  • Reputation: 21
  • In Soviet Russia, bugs stomp YOU!
    • View Profile
    • Beetle Bros site
Re: GMF ('How-to' mods and notes)
« Reply #13 on: February 12, 2010, 10:28:00 PM »
changes the sawblade to a huge-ass flat thing that does not look at all like a sawblade...


This sounds like a skin problem, rather than an attach point problem.  The saw blade (presumably to cut down on polys) has square faces on the top and bottom, and a .tga skin with alpha channel is applied to make it appear circular.  If the skin is changed, it could appear as a big flat square.

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings

Offline Serge

  • *
  • Posts: 1483
  • Reputation: 13
    • View Profile
    • http://www.q3k.org/
Re: GMF ('How-to' mods and notes)
« Reply #14 on: February 13, 2010, 08:38:37 AM »
Actually, both of the meshes are circular. The display mesh is 22-sided, and the collision mesh is 8-sided.
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline JoeBlo

  • *
  • Posts: 14546
  • Reputation: 13
    • View Profile
Re: GMF ('How-to' mods and notes)
« Reply #15 on: February 13, 2010, 09:00:06 AM »
the "rim" of the sawblade is made out of a 3D object

the 2 faces just use a square tga image
14x BOTM Winner - Robot Arena for Mac

Offline Madiaba

  • *
  • Posts: 1438
  • Reputation: 8
    • View Profile
Re: GMF ('How-to' mods and notes)
« Reply #16 on: February 13, 2010, 11:04:09 AM »
So, are one of you guys on top of this and got it figured out?
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline Serge

  • *
  • Posts: 1483
  • Reputation: 13
    • View Profile
    • http://www.q3k.org/
Re: GMF ('How-to' mods and notes)
« Reply #17 on: February 13, 2010, 12:05:41 PM »
Not yet, since Nary hasn't posted his GMF file.
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 16725
  • Reputation: 12
    • Badnik96GTM
    • View Profile
    • BattleBots Wiki
  • See profile for gamer tags: 1
  • Skype: Badnik96
Re: GMF ('How-to' mods and notes)
« Reply #18 on: February 13, 2010, 03:37:07 PM »
umm guys, I have a problem. I'm making a Psychosprout shell for my *unannounced* replica pack using the Frosty the Snowbot wheel, but it won't attach.(it says it can't intersect with the chassis) I want to edit the collision mesh but I don't know how. Can you teach me???

Offline G.K.

  • *
  • Posts: 11514
  • Reputation: 10
  • Striving for a good personal text since 1994.
    • View Profile
Re: GMF ('How-to' mods and notes)
« Reply #19 on: February 13, 2010, 03:39:01 PM »
You could always BFE it on.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V. Signups open for The RA2 League.
Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)