This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: 2.X Models to 3.3.5a models  (Read 1497 times)

Arid

  • Contributors
  • Loreweaver
  • *****
  • Posts: 100
    • View Profile
2.X Models to 3.3.5a models
« on: February 10, 2011, 08:52:43 am »
I have found something a community I am a part of, Known as Project: Defiance, could use, It's a group of 2.X models, creatures at that, All of them can wear armor, Now I can't seem to find a non-tedious way I understand to convert them to the latest format,(Or even .3ds then to the latest format.)  If anyone would hlep, I can post the link here

http://www.megaupload.com/?d=X1136ESX

Thanks for help in advance. Even if it might not work.
(Oh and maybe disabling the geoset for the worgen back furs or somethin' too!)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Guest

  • Guest
Re: 2.X Models to 3.3.5a models
« Reply #1 on: July 04, 2011, 07:13:36 pm »
I'm pretty sure using python you can change the following script which converts cata m2's to wotlk m2's

Quote
import four.m2 as wotlkM2
import four.skin as wotlkSkin
from pym2_3.m2 import *
from pym2_3.skin import *

cata = CataM2.M2File("Male\GoblinMale.M2")
cataskin = CataSkin.SkinFile("Male\GoblinMale00.skin")

wotlk = M2File()
wotlk.hdr = cata.hdr
#change header version
wotlk.hdr.version = 264
wotlk.name = cata.name
wotlk.gSequ = cata.gSequ
wotlk.animations = cata.animations
wotlk.anim_files = cata.anim_files
wotlk.anim_lookup = cata.anim_lookup
wotlk.bones = cata.bones
wotlk.key_bones = cata.key_bones
wotlk.vertices = cata.vertices
wotlk.colors = cata.colors
wotlk.textures = cata.textures
wotlk.transparency = cata.transparency
wotlk.uv_anim = cata.uv_anim
wotlk.tex_replace = cata.tex_replace
wotlk.renderflags = cata.renderflags
wotlk.bone_lookup = cata.bone_lookup
wotlk.tex_lookup = cata.tex_lookup
#wotlk.tex_units = cata.tex_units #no
#add texunit
tu = Lookup()
tu.Id = 0
wotlk.tex_units.append(tu)
wotlk.hdr.tex_units.count += 1

wotlk.trans_lookup = cata.trans_lookup
wotlk.uv_anim_lookup = cata.uv_anim_lookup
wotlk.bounding_triangles = cata.bounding_triangles
wotlk.bounding_vertices = cata.bounding_vertices
wotlk.bounding_normals = cata.bounding_normals
wotlk.attachments = cata.attachments
wotlk.attach_lookup = cata.attach_lookup
wotlk.events = cata.events
wotlk.lights = cata.lights
#wotlk.cameras = cata.cameras #no
for i in cata.cameras:
 t = Camera()
 t.Type = i.Type
 t.FOV = i.UnkAnim.KeySubs[0].values[0]
 t.FarClip = i.FarClip
 t.NearClip = i.NearClip
 t.TransPos = i.TransPos
 t.Pos = i.Pos
 t.TransTar = i.TransTar
 t.Target = i.Target
 t.Scaling = i.Scaling
 wotlk.cameras.append(t)
wotlk.camera_lookup = cata.camera_lookup
wotlk.ribbon_emitters = cata.ribbon_emitters
wotlk.particle_emitters = cata.particle_emitters

wotlkskin = SkinFile()
wotlkskin.header = cataskin.header
wotlkskin.indices = cataskin.indices
wotlkskin.tri = cataskin.tri
wotlkskin.prop = cataskin.prop
wotlkskin.mesh = cataskin.mesh
wotlkskin.texunit = cataskin.texunit
for i in wotlkskin.texunit:
 i.texunit = 0

wotlk.write("WMale\GoblinMale.m2")
wotlkskin.write("WMale\GoblinMale00.skin")

I believe the changes would be to change all text reading cataskin. & cata. to tbcskin & tbc. to change imports and adjust code accordingly

Code: [Select]
import wotlk.m2 as wotlkM2 *
import wotlk.skin as wotlkSkin *
import tbc.m2 as tbcM2 *
import tbc.skin as tbcSkin *

tbc = tbcM2.M2File("Male\GoblinMale.M2")
tbcskin = tbcSkin.SkinFile("Male\GoblinMale00.skin")

wotlk = wotlkM2.M2File()
wotlk.hdr = tbc.hdr
#etc etc etc.......
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Guest

  • Guest
Re: 2.X Models to 3.3.5a models
« Reply #2 on: July 04, 2011, 09:57:44 pm »
sorry, I have been playing around and cannot find four.m2 for python, if anyone knows where all this is i hope they will post here
« Last Edit: January 01, 1970, 01:00:00 am by Admin »