I have $15 EDIT!: $30 ready to send via PayPal.
I have loaded the vertices, but there is no poly data.
I need to build a poly between every 3 verts this maxscript loads.
Here is the maxscript.
Code: Select all
fPKG = getOpenFileName caption:"Choose FF7 Field File:" \
types:"FF7 Field File (*.dec)|*.dec|"
fn ReadFixedString bstream fixedLen =
(
local str = ""
for i = 1 to fixedLen do
(
str0 = ReadByte bstream #unsigned
if str0!=0xFD AND str0!=0xFC do str+= bit.intAsChar str0
)
str
)
fn readBElong fstream = (
long = readlong fstream
long = bit.swapBytes long 1 4
long = bit.swapBytes long 2 3
return long
)
fn readBEshort fstream = (
short = readshort fstream #unsigned
short = bit.swapBytes short 1 2
return short
)
Face_array=#()
Vert_array=#()
vert_count = 0
if fPKG != undefined then (
f = fopen fPKG "rb"
fseek f 22 #seek_set -- Pointer to mesh data offset.
entryPoint =readshort f -- Read that pointer
print entryPoint as string
fseek f entryPoint #seek_set -- Go to pointer offset.
count=900--random number that works, gets extra data overhead.
fseek f 16 #seek_cur -- Pointer for count is in this 16 byte chunk somewhere.
for x = 1 to count do(
vx=readshort f as integer
-- Print ("vx = "+ vx as string)
vy=readshort f as integer
-- Print ("vy = "+ vy as string)
vz=readshort f as integer
-- Print ("vz = "+ vz as string)
res=readshort f
-- Print ("Res = "+ res as string)
append Vert_array [vx+1, vy+1, vz+1]
--Print (vx as string + " , " + vy as string + " , " + vz as string)
append Face_array [vert_count+1,vert_count+3,vert_count+2]
)
msh = mesh vertices:Vert_array faces:Face_array
--meshop.createPolygon msh Vert_array smGroup:0 matID:1
--setNumCPVVerts msh msh.numverts
msh.name="WalkMesh"
Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
gc()
fclose f
) else (
clearlistener()
messageBox "No file was selected." title:"FF7 Walkmesh Importer"
)Here are some random files which all load so far.
http://www.mylesjohnston.com/field.zip
I need the polygons filled automatically.
Here's the File Format Docs.
http://wiki.qhimm.com/view/FF7/Field#Fi ... t_.28PC.29
And here's the specific data I'm after's Sub-Doc.
http://wiki.qhimm.com/view/FF7/Field/Walkmesh
I will reward $7.50 for making the script fill the the polys properly.
I will reward the other $7.50 for creating and aligning the scene camera with THIS data.
http://wiki.qhimm.com/view/FF7/Field/Camera_Matrix
The camera doesnt have to be perfect, just at the correct angle, I can move it closer or further by hand to match the background.
If filling the polys takes more than say 3 hours, or is actually a hassle (Shouldn't) I'll reward the whole $15, but you gotta post in this thread that you're taking the whole $15 cuz thats all the money I have on PayPal for a few days.
Sorry for a request as first post, as I learn I will be working on more model formats.
(Already just donated $7.50, hopefully I can get some help with the rest of this giftcard lol.)
Thanks,
- Myles
FILES ARE FROM OLD DEMO YET STILL COMPATIBLE.

