View Full Version : wavefron .obj files what program, payware or free can this be modeled in
USS Sea Tiger
03-23-08, 04:52 AM
Hi
I am currently working my files in gmax and triple translating them into the obj files. this seems to be causing issues in the game due to flipped faces causing crashes
is there a program, payware or free, that will allow easier manipulation of these files??
where can I find it in the USA?
iambecomelife
03-23-08, 05:02 AM
Use wings3d. It's simple but easy to learn. It handles SH3 obj files very well for the most part.
http://www.wings3d.com/
DeepIron
03-23-08, 09:07 AM
I am currently working my files in gmax and triple translating them into the obj files. Here's an import/export script (xzzy_obj_tool.ms)
save_file = ""
global verts
global faces
global tverts
global nVerts
global nFaces
global nTVerts
global objname
global normals
fn rtoken str = (
ret_string = filterString str " :,\""
return ret_string[1]
)
fn createobj =(
if (tverts.count > 0) then (
m = mesh vertices:verts faces:faces tverts:tverts
update m
setnumtverts m tverts.count true
buildTVfaces m
for j = 1 to tverts.count do settvert m j tverts[j]
for i = 1 to faces.count do settvface m i faces[i]
update m
) else (
m = mesh vertices:verts faces:faces
)
if normals[1] != undefined then (
for i = 1 to faces.count do (
setfacesmoothgroup m i (normals[i])
)
) else (
addmodifier m (smooth autosmooth:true threshhold:45)
collapsestack m
)
update (m)
m.name = uniquename(objname)
format "verts: %\ntverts: %\nfaces: %\n" (verts.count) (tverts.count) (faces.count)
)
fn fn_import=(
filename = getOpenFileName "Import OBJ" types:"Wavefront OBJ (*.obj)|*.obj|All Files (*.*)|*.*"
if filename != undefined then (
fp = openFile filename
verts = #()
faces = #()
tverts = #()
normals = #()
nVerts = 0
nFaces = 0
nTVerts = 0
objname = "Object"
first_obj = true
while ((eof fp) == false) do (
curline = readLine fp
string = filterString curline " :,\""
linetype = rtoken curline
case linetype of (
"v": (
nVerts += 1
x = (string[2] as float)
y = (string[3] as float)
z = (string[4] as float)
verts[nVerts] = [x,y,z]
)
"vt": (
nTverts += 1
u = (string[2] as float)
v = (string[3] as float)
tverts[nTVerts] = [u,v,0]
)
"f": (
nFaces += 1
buf = filterString string[2] "/"
a = (buf[1] as integer)
buf = filterString string[3] "/"
b = (buf[1] as integer)
buf = filterString string[4] "/"
c = (buf[1] as integer)
faces[nFaces] = [a,b,c]
if string.count > 4 then (
nFaces += 1
buf = filterString string[5] "/"
d = (buf[1] as integer)
faces[nFaces] = [a,c,d]
)
)
"g": (
if( first_obj == true ) then (
-- we don't run creatobj() until we hit our second object
first_obj = false
objname = string[2]
) else (
createobj()
-- redefine the arrays
verts = #()
faces = #()
tverts = #()
normals = #()
nVerts = 0
nFaces = 0
nTVerts = 0
objname = string[2]
)
)
)
)
close fp
-- create the last object in the file
createobj()
)
)
fn fn_export=(
for obj in geometry do (
if ( (obj.primaryVisibility==on) AND (obj.ishidden==false) ) then (
snapobj = snapshot obj;
theMesh = getNodeByName (snapobj.name);
-- print out name of this object
format "g %\n" theMesh.name
/*
-- Cycle through all vertices in this mesh and print out their coordinates
for i = 1 to (getNumVerts theMesh) do (
v = getVert theMesh i;
format "v % % %\n" v.x v.y v.z
-- do the normals too
v = getNormal theMesh i
format "vn % % %\n" v.x v.y v.z
)
*/
channel = 1
cur_tvert = 1
cur_vert = 1
for face = 1 to theMesh.numFaces do (
theFace = getFace theMesh face;
x = (theFace.x as integer);
y = (theFace.y as integer);
z = (theFace.z as integer);
v = getVert theMesh x
format "v % % %\n" v.x v.y v.z
v = getVert theMesh y
format "v % % %\n" v.x v.y v.z
v = getVert theMesh z
format "v % % %\n" v.x v.y v.z
v = getNormal theMesh x
format "vn % % %\n" v.x v.y v.z
v = getNormal theMesh y
format "vn % % %\n" v.x v.y v.z
v = getNormal theMesh z
format "vn % % %\n" v.x v.y v.z
-- get the map face for this mesh face
theTFace = meshop.getMapFace theMesh channel face
-- get the UVW coordinates of each texture vertex
tvx = meshop.getMapVert theMesh channel (theTFace.x as integer)
tvy = meshop.getMapVert theMesh channel (theTFace.y as integer)
tvz = meshop.getMapVert theMesh channel (theTFace.z as integer)
format "vt % %\n" tvx[1] tvx[2]
format "vt % %\n" tvy[1] tvy[2]
format "vt % %\n" tvz[1] tvz[2]
format "f "
format "%/%/% " cur_vert cur_tvert cur_vert
format "%/%/% " (cur_vert + 1) (cur_tvert + 1) (cur_vert + 1)
format "%/%/%\n"(cur_vert + 2) (cur_tvert + 2) (cur_vert + 2)
cur_tvert += 3
cur_vert += 3
)
delete snapobj;
)
)
)
utility spread "OBJ Import/Export" (
button bt_export "Export" width:140 height:35
button bt_import "Import" width:140 height:35
on bt_export pressed do (
clearListener()
fn_export()
)
on bt_import pressed do (
fn_import()
)
)
Use wings3d. It's simple but easy to learn. It handles SH3 obj files very well for the most part.My modeler of choice as well. Just watch your poly count..
Graf Paper
03-23-08, 12:02 PM
Anim8or is a good freeware 3D subdivision modeler program with a large community to support it and many resources. It has a simpler interface and is intended for those just starting out in 3D modeling and animation but it can create some fantastic artwork.
Blender is an open source 3D modeling suite that is comparable to 3D Studio Max and Maya. The community that supports it and the resources available are huge. The learning curve is steep due to it being as complex as commercial applications but it can create art and effects every bit as good as the expensive software.
Blender has been used to make professional animated movies, such as "Elephant's Dream" and the full-length theatrical production of "Plumiferos".
Wings 3D is the most popular choice here for those looking for free alternatives and it is a very powerful tool for an open source project that is still in its beginnings.
DAZ Studio is a professional 3D modeler that is free and made by the same company that also has Bryce 3D and Carrara. The company makes its money by selling models and effects libraries that work with DAZ, Lightwave, Maya, and so forth.
There are numerous other free and open source 3D modeling and animation tools out there, if you search enough.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.