Author Topic: Two sets of verts  (Read 1138 times)

Offline Classicus

  • Middleweight
  • Posts: 315
  • Rep: 5
    • View Profile
    • Awards
Two sets of verts
« on: February 03, 2013, 05:15:35 PM »
Hey, I have noticed the two sets of vertices that you get in most .gmfs, are both sets always the same ie top is outside mesh and bottom set is the component part?

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Two sets of verts
« Reply #1 on: February 03, 2013, 10:29:29 PM »
If I'm understanding your question correctly, the answer is no. The first set of vertices are related to the physical verticies of the object (*MESH_VERTEX). The second set is related to the texture's mapping onto said verticies (*MESH_TVERT). If the surface that you are mapping to isn't square, you can use the second set of verticies to prevent distortion.

Offline Classicus

  • Middleweight
  • Posts: 315
  • Rep: 5
    • View Profile
    • Awards
Re: Two sets of verts
« Reply #2 on: February 04, 2013, 04:04:54 AM »
There is normally two sets of (*MESH_VERTEX), usually one near the top and one near the middle, I'm just trying to understand their roles and whether these are the same in each .gmf.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Two sets of verts
« Reply #3 on: February 04, 2013, 01:06:35 PM »
I'm still not sure what you are referring to... If I don't get it right this time could you post an example?

My best guess is that you are referring to multiple objects in the same GMF file. If this is the case, you may be looking at a collision mesh and a display mesh in a component GMF. They are two separate objects that have been associated with each other in the *GMID_HAVOK_RBCOLLECTION section. Some components like battery1.gmf only have one object but that is because it is using that object for both purposes (display and collision). In fact, arenas are built on the idea of having multiple objects in one GMF but it isn't as common to have a different collision mesh for each object.

Offline Classicus

  • Middleweight
  • Posts: 315
  • Rep: 5
    • View Profile
    • Awards
Re: Two sets of verts
« Reply #4 on: February 04, 2013, 01:40:59 PM »
Yes that's what I'm on about. I assumed one was the box for the component and the other was for visible part. My question is when you have two sets how do they react to each other? If I change the coordinates of one how does it affect the other? Thanks for the help.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Two sets of verts
« Reply #5 on: February 04, 2013, 02:53:47 PM »
Adjusting the *MESH_VERTEX of either will not impact the other. However, adjusting the origin in the *GMID_HAVOK_RBCOLLECTION will affect both (IIRC).

I personally prefer to tweak the verticies (as opposed to the origin) just because Serge's previewer doesn't take into account the *NODE_TM stuff.