Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Size of vertex coordinates (was Please help)

Featured Replies

  • Author
  • Localization

theclub456, posted Tue Jan 27, 2015 11:46 pm (2931)


How can I tell if a game 3d model uses 2 byte or 4byte or 8 byte vertex coordinates
  • Author
  • Localization

aluigi, posted Wed Jan 28, 2015 8:37 am (2938)


Moved in the correct section and used a "real" title ("Please help" means nothing and 90% gets ignored).
  • Author
  • Localization

sleepyzay, posted Fri Jan 30, 2015 1:53 am (2987)


theclub456 wrote:
How can I tell if a game 3d model uses 2 byte or 4byte or 8 byte vertex coordinates

Most models I've seen have vertices that are 12 bytes long composing of 3 floats and often some information afterwards like uv and vertex normal data. How I figure it out is by changing the bytes per row displayed until it looks like pic related. The first 3 floats are usually the vertex information. Hope this helps.

Image
  • Author
  • Localization

TGE, posted Fri Feb 06, 2015 6:36 pm (3087)


Basically, you look at how much data each vertex has.
A vertex position can be stored as a float, short or half float. Floats and half floats usually end with 'F' or 'D' or something similar.
By changing the amount of bytes shown on each line in the hex editor you can figure out how many bytes each vertex consists of
Common sizes are 28,32,64 etc
Vertices usually consist of positions, normals, uvs (often half floats), weights (either floats or bytes), bone indices, vertex colors (often bytes), extra normals (tangent, binormal), extra uv (multiple uv channels).
  • Author
  • Localization

cra0, posted Sun Feb 08, 2015 2:18 am (3101)


Dump the shader (if its a dx9 10 11 pc title)
You will see the input signature like

Vertex Stride X
{
VEC3_T POSITION
VEC3_T NORMAL
VEC2_T UV
}

Then you know u need to look for those. Most game devs I've seen pack their Position floats into uint16 for XYZW

To unpack you would read the XYZ values then divide them by the scaler most cases its UINT.MAXVAL (some times its the W component) im typing this from my phone so I cant give you a copy paste function.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.