Why is hexadecimal used in binary model files?

Started by
19 comments, last by Norman Barrows 10 years, 9 months ago

if you're using directx, you may be able to convert to .x format, and load that way.

I use Truespace 7.6 to convert 3ds, obj, and other formats to .x. or use truespace 7.61 to create models from scratch and save as RsScn (for future editing) and .x (for use in the game).

I use LoadMeshFromX, then i do some meshopt stuff. and yes, i know! it should be pre-processed, but its not release version yet. when release time comes i'll run all the meshes through a meshopt routine and save them back to disk, then turn off the meshopt code in the load routine. even with meshopt on, load times are still only 20 seconds one time at program start for about 300 meshes.

then i extract the vb, ib, numverts, and numtris, and put them in my game's mesh database, then free the mesh.

i keep meshes, textures and materials in separate databases and mix and match on the fly as needed.

When i have a blender model, i save it out in another format, then load it into truespace and save it as a .x file.

the .x format supports ascii, binary, and compressed binary, as well as skeleton based animations. although supposedly it may not be that great as far as animations goes.

i have yet to do a title where the number of characters onscreen at once was low enough to allow for use of skinned meshes, so i have yet to deal with that aspect of .x files.

hexidecimal is simply a way to display binary numbers that's a little easier for humans to read.

bytecodes are a common occurrence in file formats of all types. they are often used to identify the file format itself at the beginning of a file, or to identify sections of data within a file.

the bytecode at the beginning of a .x file that identifies it as a .x file is ".XOF" or something like that as i recall.

the complete official .x filespec is available in the dx docs.

if possible, use an existing format to save time. but you're not the first person i've heard of "rolling their own" when it comes to animations and file formats.

i use an in-house limb based model and animation system (no mesh deformations = runs faster = more characters onscreen at once with no slowdown). so i have't had to deal with the issue yet. i'll blow up that bridge when i get to it. <g>. but after CAVEMAN 3.0, it looks like SIMSapce 8.0, Airships!, and a pirate simulator with lots of characters onscreen (200?) are the next things on my todo list. so it may be a while before i deal with skinned meshes.

"so many games to make, so little time!"

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

This topic is closed to new replies.

Advertisement