Star Wars: Clone Wars Adventures (*.dme)

Post questions about game models here, or help out others!
lyutor1945
beginner
Posts: 37
Joined: Mon Nov 02, 2015 6:24 pm
Has thanked: 23 times
Been thanked: 2 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by lyutor1945 » Wed Dec 21, 2016 1:14 am

AceWell wrote:i have all game files, but i only research dme files because i am only interested in the models and textures :D
One more question. In the game files, I found only Ventress in the mask. In the game has only this model or unmasked version too? And where if it so?

User avatar
Acewell
VIP member
VIP member
Posts: 1187
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2330 times
Been thanked: 689 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by Acewell » Wed Dec 21, 2016 2:27 am

i only see a partial face for the Dathomir outfit like the one seen in the first picture
http://cwa.wikia.com/wiki/Asajj_Ventress

Char_AsajjHead_LOD0.dme extracted from AssetsW_001 and
goes with Char_AsajjBody_LOD0.dme from AssetsW_002

lyutor1945
beginner
Posts: 37
Joined: Mon Nov 02, 2015 6:24 pm
Has thanked: 23 times
Been thanked: 2 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by lyutor1945 » Thu May 25, 2017 11:31 pm

Guys, maybe someone knows, is it possible to download somewhere the game or pack archives?

ARAJediMaster
beginner
Posts: 24
Joined: Fri Jun 12, 2015 5:17 am
Has thanked: 5 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by ARAJediMaster » Mon Oct 23, 2017 2:40 am

Excuse me, but I am looking for the sound effects to this game. Does anybody have access to the original sound archives, and if so, how can I access them?

TRDaz
mega-veteran
mega-veteran
Posts: 193
Joined: Sat Sep 24, 2011 7:06 pm
Has thanked: 55 times
Been thanked: 19 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by TRDaz » Fri Sep 21, 2018 11:08 am

So I've recently been attempting to add bone support to this (I hope this is okay with you AceWell) and have gotten somewhere but still haven't managed to get proper positions on bones, any chance someone could look? This is the part of the script I added in:

Code: Select all

	if (rapi.checkFileExists(skelFile)):
		sk = rapi.loadIntoByteArray(skelFile)
		sk = NoeBitStream(sk)
		nameList = []
		parentList = []
		boneList = []
		mtxList = []
		sk.seek(0x08, NOESEEK_ABS)
		skipCount = sk.readUInt()
		currentPos = sk.tell()
		skip = sk.readBytes(skipCount)
		boneCount = sk.readUInt()
		print(boneCount)
		sk.seek(currentPos)
		for i in range(boneCount):
			boneName = sk.readString()
			#print(boneName)
			nameList.append(boneName)
		skip = sk.readBytes(4)
		for i in range(boneCount):
			skip = sk.readBytes(4)
			parent = sk.readUByte()
			skip = sk.readBytes(3)
			parentList.append(parent)
		for i in range(boneCount):
			unk = sk.readFloat()
			rot = NoeQuat(sk.read("4f"))
			scale = sk.read("3f")
			unk2 = sk.readFloat()
			posX, posY, posZ = sk.read("3f")
			#print(pos)
			boneMtx = rot.toMat43().inverse()
			boneMtx[0] *= scale[0]
			boneMtx[1] *= scale[1]
			boneMtx[2] *= scale[2]
			boneMtx[3] = NoeVec3((posX, posY, posZ))
			#print(posY)
			print(sk.tell())
			mtxList.append(boneMtx)
			newBone = NoeBone(i, nameList[i], mtxList[i], None, parentList[i])
			boneList.append(newBone)
It overall looks like it gets good positioning on heads although not at the position of the mesh, but it is very wrong on bodies. I could just be reading the data for bones completely wrong because I'm not familiar with how to read them properly, but any help is appreciated on how to do that. I've attached both bone files for the characters shown in the images.

Image Image
You do not have the required permissions to view the files attached to this post.

episoder
mega-veteran
mega-veteran
Posts: 186
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by episoder » Fri Sep 21, 2018 1:31 pm

ugh. ehh... how do i get noesis to see the skelly file? i tried the local and absolute path, but it doesn't work, damnit.

Code: Select all

    if (rapi.checkFileExists(str("D:\starwars\models\cwa_xtr_wip\ahsokaV2\Char_HumanFemaleBody.dsk"))):
        print("skelly found")
        sk = rapi.loadIntoByteArray(str("D:\starwars\models\cwa_xtr_wip\ahsokaV2\Char_HumanFemaleBody.dsk"))
btw. tab indents pls. your space code differs from ace's spaces. :D and tabs are easier to track and manage/count for the parser to interpret. plus the current script doesn't read the boneweights and indices anymore. i have another (the older) version of the script tho.

TRDaz
mega-veteran
mega-veteran
Posts: 193
Joined: Sat Sep 24, 2011 7:06 pm
Has thanked: 55 times
Been thanked: 19 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by TRDaz » Fri Sep 21, 2018 2:02 pm

Code: Select all

def noepyLoadModel(data, mdlList):
	ctx = rapi.rpgCreateContext()
	#skelloading
	baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getLastCheckedName()))
	print(baseName)
	skelFile = rapi.getDirForFilePath(rapi.getInputName()) + baseName + ".dsk"
That is before the other code I posted, obviously will need the .dme file to make this work, and I had to remove the LOD0 from the name of the .dme file to make it work too.

It also needs this at the end instead of just mdlList.append(mdl)

Code: Select all

	mdlList.append(mdl); mdl.setBones(boneList)
They are tabbed, pasting the code makes it have spaces and not tabs, and I only have skeleton loading right now, still no weights.

episoder
mega-veteran
mega-veteran
Posts: 186
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by episoder » Fri Sep 21, 2018 3:25 pm

got it. manual debug right now. the whole thing should be done using the adr files and all files dumped in a single folder to be able to load all files directly. i only got the bone relationships sorta figured. there're possibly a bone_id -1 (FFFF) and a parent_id -1 (FFFF) too, potentially unparented bones. the other offset is directly into the bonename table. i still got no clue howto assemble the matrices. i'm a noob when it comes to this. i could math that there are 12 floats per bone tho. could be a 4x3 or 3x4 matrix, depending how you get the translation vector in there. using a quaternion you have 7, 3 for translation and maybe 1 for the scale, so... this doesn't make alot of sense to me. :? anyway... the bonetable code

Code: Select all

def noepyLoadModel(data, mdlList):
    ctx = rapi.rpgCreateContext()
    if (rapi.checkFileExists(skellyfile)):
        print("skelly found")
        sk = rapi.loadIntoByteArray(skellyfile)
        sk = NoeBitStream(sk)
        nameList = []
        parentList = []
        boneList = []
        mtxList = []
        sk.seek(0x08, NOESEEK_ABS)
        ofsrel_bonestruct = sk.readUInt()
        BNametable = sk.tell()
        sk.seek(ofsrel_bonestruct, NOESEEK_REL)
        boneCount = sk.readUInt()
        print(boneCount)
        currentbone = sk.tell()
        for i in range(boneCount):
            sk.seek(currentbone, NOESEEK_ABS)
            ofsrel_BName = sk.readUInt()
            boneId = sk.readUShort()
            parent = sk.readUShort()
            parentList.append(parent)
            currentbone = sk.tell()
            sk.seek(BNametable)
            sk.seek(ofsrel_BName, NOESEEK_REL)
            boneName = sk.readString()
            print(boneName)
            nameList.append(boneName)
        for i in range(boneCount):
            unk = sk.readFloat()
...

TRDaz
mega-veteran
mega-veteran
Posts: 193
Joined: Sat Sep 24, 2011 7:06 pm
Has thanked: 55 times
Been thanked: 19 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by TRDaz » Fri Sep 21, 2018 4:02 pm

Yeah my issue is the bone reading, I knew there were 12 floats per bone but I don't know which would be the rotation, position etc. I've tried various options aswell as just reading the matrix with Mat43 but it still results in the same thing I have right now.

episoder
mega-veteran
mega-veteran
Posts: 186
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by episoder » Fri Sep 21, 2018 5:42 pm

yo. same here. but i got somewhere removing all the matrix stuff. using an identity mat to pin the locations. your script did output weird stuff. and i forgot to save the offset after the bone array. :mrgreen: the head bones were sorta pinned by the L and R X values. for sure the array location without all the matrix crap. still gotta figure where the delta or 'local translation' is. some parent child relations seem wrong too. i pretty much don't care about the rotation.

Image

i'm not sure if this dislocation may be intentional even. i'm not sure about the math invloved but if the original pose is not stored and just uses the animation files this may still work without the tpose skelly. kinda protection. i'll try to figure it out anyway tho.
Last edited by episoder on Fri Sep 21, 2018 5:53 pm, edited 1 time in total.

TRDaz
mega-veteran
mega-veteran
Posts: 193
Joined: Sat Sep 24, 2011 7:06 pm
Has thanked: 55 times
Been thanked: 19 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by TRDaz » Fri Sep 21, 2018 5:49 pm

Yeah that result is what I got with mine, the root and neck bones seem to be accurate in positioning, the X axis on the other bones seem accurate but everything else for those doesn't, which makes me confused.

Looks like the face positions are stored in the .dme file actually, but doesn't work for body. This is manual seeking in the file atm, gotta code in getting to it properly.
Image

episoder
mega-veteran
mega-veteran
Posts: 186
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by episoder » Fri Sep 21, 2018 9:15 pm

i got the head looking good. and a nice start at the body. parent recursion. i guess the rotation matters.

Image

wip script if you wanna mess with it. :]
You do not have the required permissions to view the files attached to this post.

TRDaz
mega-veteran
mega-veteran
Posts: 193
Joined: Sat Sep 24, 2011 7:06 pm
Has thanked: 55 times
Been thanked: 19 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by TRDaz » Fri Sep 21, 2018 10:06 pm

I'm not entirely sure how the parent recursion stuff works but nice work so far :)

episoder
mega-veteran
mega-veteran
Posts: 186
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 80 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by episoder » Fri Sep 21, 2018 11:37 pm

yo. it was a weird thing to find anyway. i figured it out when i messed with the boneids. i added those and the head added to the neck was at the right place. but it didn't work any further. i had to try to recurse it. basicly what it does is adding what seems local bone transforms based on their parent bones.

recursion itself explained

Code: Select all

def recursion(i)
    parent = parentList[i]
    if parent >= 0:
        recursion(parent)
1) i = toe -> search parent -> finds foot -> function calls itself with i paremeter foot
2) i = foot -> search parent -> finds calf -> function calls itself with i parameter calf
3) i = calf -> searhc parent -> finds thigh -> function calls itself with i parameter thigh
...

until there's no parent in the chain, which is the root bone. it's maybe just stupid code. now that i think about it could potentially be done with a while loop too. i just didn't think about that i guess. :mrgreen:

akderebur
ultra-veteran
ultra-veteran
Posts: 325
Joined: Fri Jul 08, 2011 10:36 am
Has thanked: 44 times
Been thanked: 290 times

Re: Star Wars: Clone Wars Adventures (*.dme)

Post by akderebur » Sat Sep 22, 2018 12:38 pm

9 floats for 3x3 local rotation matrix, 3 floats for local position vector.
sw_skel.png
@episoder Your approach is correct, as you need to reach the world space coordinates, but it can be achieved more easily using matrices. Load 12 floats as NoeMat43. Multiply bone matrix with the parent in recursion until, you reach the top. You need the rotation to load the skeleton properly anyway.
You do not have the required permissions to view the files attached to this post.

Post Reply