Help us keep the site up! Got some change to spare? Why not donate a few bits and buy us a coffee. Image

Final Fantasy VII (7) Walkmesh - 30$ Reward

Post questions about game models here, or help out others!
Post Reply

Was this overall an acceptible post?

Very Acceptable!
1
17%
Yes
2
33%
LOUSY 'Introduction' man.
1
17%
Wrong Category.
0
No votes
No, Go read the Forum Rules AGAIN!
2
33%
 
Total votes: 6

MiLO83
ultra-n00b
Posts: 6
Joined: Wed Nov 20, 2013 11:23 pm

Final Fantasy VII (7) Walkmesh - 30$ Reward

Post by MiLO83 »

Hi,
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"
)
Image
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.
Last edited by MiLO83 on Thu Nov 28, 2013 9:50 am, edited 1 time in total.
MiLO83
ultra-n00b
Posts: 6
Joined: Wed Nov 20, 2013 11:23 pm

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by MiLO83 »

Seriously? It's been 3 days?
Do I need to offer more money?
It should be as easy as a line of code to build a polygon from every 3 loaded verts in order.
Tell me that 1 line, or as many lines as it takes, and i'll send you $15.
If you know why nobody is replying please tell me!
And I forgot to put (Request) in the topic, if a mod could fix that.

- Myles
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1397 times

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by chrrox »

just add this at the end of your script

msh = mesh vertices:Vert_array faces:Face_array
msh.numTVerts = UV_array.count
buildTVFaces msh
for j = 1 to UV_array.count do setTVert msh j UV_array[j]
for j = 1 to Face_array.count do setTVFace msh j Face_array[j]
for j = 1 to Normal_array.count do setNormal msh j Normal_array[j]
MiLO83
ultra-n00b
Posts: 6
Joined: Wed Nov 20, 2013 11:23 pm

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by MiLO83 »

Thanks Chrrox, (The Legend!)
but I get this error...

-- Runtime error: buildTVFaces: mesh has no texture vertices - $Editable_Mesh:WalkMesh @ [0.000000,0.000000,0.000000]

Can you please download the sample files and give a working script?
It's $15 man, probably take less than 20 minutes. I know you're 1337!
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1397 times

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by chrrox »

just append 0's to an array called
0,0
UV_array=#()
that is the same size as the vertex array.
MiLO83
ultra-n00b
Posts: 6
Joined: Wed Nov 20, 2013 11:23 pm

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by MiLO83 »

Huh?
Can you just modify the script?
Sounds like you know what to do!
I'll send you the $15, just edit the script with your ideas and post the script here.
I have never even coded maxscript before, I was following mariokart64n's video tutorials to get this far...

- Myles
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 504 times

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by MrAdults »

chrrox check this out man, I got these cheeseburgers, they some double cheeseburgers! Man I'll suck yo' dick! Come on man just hook a nigga's UV array up man!
MiLO83
ultra-n00b
Posts: 6
Joined: Wed Nov 20, 2013 11:23 pm

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by MiLO83 »

Guuud waaaaaaan.
I wood liek to by a ambeg geeerrrrr.
DUR BURRRGGGGER!
Mr.Adults, I tried his suggestions and got runtime errors. I have never written maxscript aside from following mariokart64n's tutorial.
I'm not familiar with its syntax or functions. I will obviously go over chrrox's code and analyze it myself to learn from,
but I've already offered google 2 cheeseburgers and *EhEM!* sucked its d!ck. Google does not seem to me to have much info on reading files to meshes in maxscript.
This model format doesn't have any faces or UV or normals. It is a collision mesh from 1997. I obviously tried myself, and would ask questions without offering money, but I
have a long list of other things i'm working on. Search "Moogle Earth" on Google Play Store for Android. I made that, and it's an old version. I am currently adding new features.

- Myles

Edit : Here's the current script.

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=#()
Normal_array=#()
UV_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]
	append UV_array [0.0,0.0,0.0]
		append Normal_array [0.0,0.0,0.0]
)	


--meshop.createPolygon msh Vert_array smGroup:0 matID:1
--setNumCPVVerts msh msh.numverts

gc()
fclose f
msh = mesh vertices:Vert_array faces:Face_array
setNumCPVVerts msh msh.numverts
msh.name="WalkMesh"
msh.numTVerts = UV_array.count
buildTVFaces msh
for j = 1 to UV_array.count do setTVert msh j UV_array[j]
for j = 1 to Face_array.count do setTVFace msh j Face_array[j]
for j = 1 to Normal_array.count do setNormal msh j Normal_array[j] 

)
User avatar
CarLuver69
advanced
Posts: 50
Joined: Thu Mar 08, 2012 6:17 pm
Location: California, USA
Has thanked: 7 times
Been thanked: 19 times
Contact:

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by CarLuver69 »

It appears that some of my script that I wrote nearly a year ago has helped you get a start on FF7 models, no?

viewtopic.php?f=16&t=9977

You're welcome :-P
MiLO83
ultra-n00b
Posts: 6
Joined: Wed Nov 20, 2013 11:23 pm

Re: Final Fantasy VII (7) Walkmesh - 15$ Reward

Post by MiLO83 »

Actually I was following MarioKart64n's Youtube tutorials...
I AM NOW RAISING THE REWARD TO $30 VIA PAYPAL,
OR I CAN BUY YOU A $25 VISA/MASTERCARD GIFTCARD YOU CAN REGISTER AND SPEND ONLINE.
Just in time for the Holidays!

- Myles
Troopermanaic
advanced
Posts: 71
Joined: Fri Jul 01, 2011 4:29 pm
Has thanked: 5 times
Been thanked: 5 times

Re: Final Fantasy VII (7) Walkmesh - 30$ Reward

Post by Troopermanaic »

IDK if this helps you but this is how I build mesh for any game

Code: Select all

for MDL = 1 to MeshCount do (
	try (
		msh = mesh \
		vertices: Vertex_array[MDL] \
		tverts: TextureVerts_array[MDL] \
		faces: Index_array[MDL] \
		scale: Size_array[MDL] \
		dir: MeshRotation_array[MDL] \
		pos: MeshLocation_array[MDL] \
		name: MeshName_array[MDL]

		buildTVFaces msh

		for UVF = 1 to msh.numfaces do (
			try (
				setTVFace msh UVF (getFace msh UVF)
			)
			catch(
				format "import of UVF % failed\n" UVF
			)
		)
	)
	catch(
		format "import of MDL % failed\n" MDL
	)
)
ALSO I think your face loop is wrong, heres mine for example

Code: Select all

for IC = 1 to Indexcount /3 do(
    f1=ReadShort f +1 --Face 1
    f2=ReadShort f +1 --Face 2
    f3=ReadShort f +1 --Face 3
    append Face_array[f3,f2,f1]
)
MrAdults I thank you for referencing the funniest line in one of my old favorite 90's movies "Don't be a menace to society while drinking juice in the hood"
EZ-BMS for when you want to work with non-programmers viewtopic.php?f=33&t=10499
If you like what I do then support my coffee addiction https://www.paypal.com/cgi-bin/webscr?c ... 853S265MPW
Post Reply