Page 1 of 2

League of Legends .SKN, .SKL, .ANM

Posted: Tue Jun 07, 2011 4:46 pm
by Nazaroff
League of Legends (LoL :) ) is a 3D game with character models in SKN file format, SKL is skeletal format and ANM is animation file format. I saw some tools for this game for importing models, but without animation. For example, script for Blender for import of SKN, or you can see SKN in 3D Object Convertr. And no tools for import model with animation for 3ds max.

Here rendered screen with converted to OBJ SKN-models.
Image

Can anybody make tool (script for MAX or plugin) to import animation? Here models from screen:
http://www.multiupload.com/L5QL2WO25H (5Mb)
I hope this old tool to import animation from old format of this game could be useful - http://www.multiupload.com/B5MZ844TKB

Re: League of Legends .SKN, .SKL, .ANM

Posted: Mon Jun 13, 2011 7:12 pm
by Zerox
While a Noesis plugin for the format would be fun, the format is already fully supported in Maya 2010/2011/2012 courtesy of ThiSpawn: http://forum.leaguecraft.com/index.php? ... 12-x86x64/

It imports the models with skeletal rigging intact you can also import the animations etc. Just use Maya and then transfer to 3DS Max if you need to.

Re: League of Legends .SKN, .SKL, .ANM

Posted: Tue Jul 12, 2011 2:51 am
by finale00
Did he publish the format anywhere? Or does everyone just depend on the author lol

Re: League of Legends .SKN, .SKL, .ANM

Posted: Thu Jul 14, 2011 3:52 pm
by nightFlarer
finale00 wrote:Did he publish the format anywhere? Or does everyone just depend on the author lol
If you can find it, there's an older tool for maya by renticletape, and he released it with the source. Then you can convert it into maxscript, like I did, but I didn't do bones or animation because I don't know how to yet.

I'm not sure if the format has change since I last made the script, which was near the start of this year.

Code: Select all

/*
League of Legends Maxscript Model Importer
by nightFlarer
A maxscript to import .skn files
*/

fname = getOpenFileName \ 
caption:"League of Legends Skin Model File" \
types:"League of Legends Skin Model File(*.skn)|*.skn" \
historyCategory:"LeagueofLegendsObjectPresets"
f = fopen fname "rb"
clearlistener()

fn ReadFixedString bstream fixedLen =
(
   local str = ""
   for i = 1 to fixedLen do
   (
      str0 = ReadByte bstream #unsigned
     str+= bit.intAsChar str0
   )
   str
)

Face_array=#()
Vert_array=#()
UV_array=#()

--Structure for the Header in skn files
magic=readlong f #unsigned
numMat=readshort f #unsigned
numObj=readshort f #unsigned

--Structure for a material block in skn files
matInd=readlong f #unsigned
charName=ReadFixedString f 64
startVertex=readlong f #unsigned
numVertices=readlong f #unsigned
startIndex=readlong f #unsigned
numIndices=readlong f #unsigned

--data block in skn files
numIndices=readlong f #unsigned
numVertices=readlong f #unsigned

--read faces
for x = 1 to numIndices/3 do(
fa=readshort f #unsigned+1
fb=readshort f #unsigned+1
fc=readshort f #unsigned+1
append Face_array[fc,fb,fa]
)
--read vertices
for x = 1 to numVertices do( -- vertex loop
vx=readfloat f
vy=readfloat f
vz=readfloat f
boneindex=readlong f #unsigned
w1=readfloat f
w2=readfloat f
w3=readfloat f
w4=readfloat f
nx=readfloat f
ny=readfloat f
nz=readfloat f
tu=readfloat f
tv=readfloat f
	
append Vert_array[vx,vz,vy]
append UV_array[tu,tv*-1+1,0]
)


msh = mesh vertices:Vert_array faces:Face_array
msh.numTVerts = UV_array.count
buildTVFaces msh
--convertTo msh PolyMeshObject
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]
rotate msh (angleaxis -180 [0,0,1])

Print ("Last Read @ 0x"+((bit.intAsHex(ftell f))as string))
gc()
fclose f

Re: League of Legends .SKN, .SKL, .ANM

Posted: Thu Jul 14, 2011 4:13 pm
by finale00
Alright thanks. I will use your script for reference :)

EDIT: works for the provided samples. Guess I'll have to get the client to test some more.

Image Image

Maybe I should actually start doing something about bones.

Re: League of Legends .SKN, .SKL, .ANM

Posted: Sat Jul 16, 2011 1:18 pm
by finale00
I DL'd the client but it seems to pack everything into dat files using raf as some index thing.
What to use to unpack?

Re: League of Legends .SKN, .SKL, .ANM

Posted: Sat Jul 16, 2011 3:40 pm
by nightFlarer
When I last downloaded and installed LoL, the champions,etc. was in "C:\Riot Games\League of Legends\game\HeroPak_client.zip".

They don't use zips anymore?

Re: League of Legends .SKN, .SKL, .ANM

Posted: Sat Jul 16, 2011 5:57 pm
by finale00
Hmm don't know all I see is a RADS folder with a bunch of different releases. Though, no zip archives.
Maybe I downloaded something different. I got it from

http://signup.leagueoflegends.com/en/signup/redownload

Re: League of Legends .SKN, .SKL, .ANM

Posted: Sun Jul 17, 2011 7:00 am
by Nazaroff
I have data in "HeroPak_client.zip" too. No "RADS" or same folders or archives.

Re: League of Legends .SKN, .SKL, .ANM

Posted: Sun Jul 17, 2011 4:53 pm
by finale00
Hmm who knows I just went to their official forums to look around and found this

ttp://76.73.13.30/Files/League%20of%20Legends/Game/

Maybe I missed a step or something lol

I also just downloaded the "maps" files, which seems to contain map assets (.SCB files). Sort of looks like there might be something there though it's not the most obvious.

Now...no items? lol

Re: League of Legends .SKN, .SKL, .ANM

Posted: Sun Jul 17, 2011 8:06 pm
by CriticalError
nightFlarer wrote:When I last downloaded and installed LoL, the champions,etc. was in "C:\Riot Games\League of Legends\game\HeroPak_client.zip".

They don't use zips anymore?
yes me too, I download from there and don't have nothing about zip files, maybe is different version, korean example.

Re: League of Legends .SKN, .SKL, .ANM

Posted: Sat Oct 08, 2011 7:42 pm
by Szkaradek123
The contents of this post was deleted because of possible forum rules violation.



Update 2014-11-28:

League of Legends importer for Blender version 249 and Python 26:
It supports:
- skn files - skinned meshes ( version 2 and 4 )
- anm files - animation files ( with header r3d2anmd version 3, 4 and 5 and without header r3d2anmd )

files with header "r3d2canm" are not. For it use viewtopic.php?p=101066#p101066


Re: League of Legends .SKN, .SKL, .ANM

Posted: Sat Oct 08, 2011 8:10 pm
by CriticalError
wow thanks a lot man, you are great, perfect support.

Re: League of Legends .SKN, .SKL, .ANM

Posted: Mon Oct 24, 2011 7:27 pm
by Rimbros
The contents of this post was deleted because of possible forum rules violation.

Re: League of Legends .SKN, .SKL, .ANM

Posted: Mon Mar 19, 2012 2:14 am
by napoleon321
How can I use thisblender plug in to import the models? I have the blend file in the folder where the skn and skl are and when i click twice on the blend file i just got opened blender... no model imported...