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.

3ds max export

Featured Replies

  • Author
  • Localization

theclub456, posted Sat Feb 14, 2015 4:19 am (3168)


can anyone teach me how to make a exporter for a 3d model with 3ds max. like if i wanted to mod a game i would make an importer and exporter with 3ds max
  • Author
  • Localization

TGE, posted Sat Feb 28, 2015 2:46 am (3506)


Example script:

Code:
fname = getSaveFileName \ 
caption:"Save File" \
types:"Binary Model(*.bmdl)|*.bmdl"\
historyCategory:"CustomBMDL Object Presets"
o = fopen fname "wb"

ObjArray = #()

clearlistener()

max select all
ObjCount = selection.count
print "Object Count: " ObjCount as string
WriteLong o (ObjCount as integer)
for x = 1 to ObjCount do (
   msh = snapshotAsMesh (selection[x])
   ObjArray[x]   = msh
   VertCount   = msh.numVerts
   UVCount    = msh.numTVerts
   FaceCount    = msh.numFaces
   print ("Object: " ObjArray[x] as string)
   print ("Vertex Count: " VertCount as string)
   print ("UV Count: " UVCount as string)
   print ("Face Count: " FaceCount as string)
   WriteLong o VertCount
   WriteLong o UVCount
   WriteLong o FaceCount
   
   Print ("Vertex Start = 0x" (bit.intAsHex(ftell o)as string))
   for v = 1 to VertCount do (
      vert = getVert msh v
      vx = vert.x as float
      vy = vert.y as float
      vz = vert.z as float
      writefloat o vx
      writefloat o vy
      writefloat o vz
   )
   
   Print ("UV Start = 0x" (bit.intAsHex(ftell o)as string))
   for u = 1 to UVCount do (
      tvert = getTvert msh u
      tu = tvert.x as float
      tv = tvert.y as float
      writefloat o tu
      writefloat o tv
   )
   
   Print ("Face Start = 0x" (bit.intAsHex(ftell o)as string))
   for f = 1 to FaceCount do (
      face = getFace msh f
      f1 = face.x as integer -1
      f2 = face.y as integer -1
      f3 = face.z as integer -1
      writeshort o f1
      writeshort o f2
      writeshort o f3
   )
   
)

fclose o


Doesn't quite work as it intended (doesn't write each object to a seperate chunk) but it's a good example regardless.
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.