I obtained some models from Playstation all stars battle royale dumping the vram from the console.
The IDmagic has changed from the beta version (MODL to EA05) the vertex size is 16 and the uv pos is 12 (I used hex2obj for obtain some meshes but with this method some faces are lost), also I used the decompresed faces from vram dump over the meshes in t-pose but not all faces are in the dump file (the dump file only have the faces that are shown front to the camera, all faces behind are not rendered)
I extracted this mesh with hex2obj (some faces are lost)
here are some models
http://www.mediafire.com/download/wnu9c ... a_ea05.rar
here is a model + the old noesis script by chrrox for import cskn meshes.
http://www.mediafire.com/download/6vkbz ... suit02.rar
the original files use edge indices compression, maybe someone can modify the script for import this files to noesis with all faces
thanks
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
PS All-Stars Battle Royale(final version ea05-cskn)
-
- n00b
- Posts: 17
- Joined: Fri Nov 12, 2010 4:03 pm
- Has thanked: 3 times
- Been thanked: 5 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
You can loaded manually each mesh.
Code: Select all
#sample class
from inc_noesis import *
def registerNoesisTypes():
handle = noesis.register("Playstation All Stars", ".cskn")
noesis.setHandlerTypeCheck(handle, binModCheckType)
noesis.setHandlerLoadModel(handle, binModLoadModel)
#noesis.logPopup()
return 1
def binModCheckType(data):
td = NoeBitStream(data)
return 1
class binFile:
def __init__(self, bs):
self.bs = bs
rapi.rpgSetOption(noesis.RPGOPT_BIGENDIAN, 1)
self.texList = []
self.matList = []
self.boneList = []
self.boneMap = []
self.offsetList = []
self.meshOffsets = []
def loadAll(self, bs):
indexCount = 0x8A0
indexSize = 0x370
indexOffset = 0x1C00
bs.seek(indexOffset, NOESEEK_ABS)
edgeData = bs.readBytes(indexSize)
edgeDecomp = rapi.decompressEdgeIndices(edgeData, indexCount)
for i in range(0, indexCount):
t = edgeDecomp[i*2]
edgeDecomp[i*2] = edgeDecomp[i*2 + 1]
edgeDecomp[i*2 + 1] = t
vertexOffset = 0x1F70
bs.seek(vertexOffset, NOESEEK_ABS)
vertCount = 0x1A2
vSize = 0x10
vertBuff = bs.readBytes(vSize * vertCount)
#UVBuff = bs.readBytes(vertCount * 6)
#rapi.rpgBindUV1BufferOfs(UVBuff, noesis.RPGEODATA_SHORT, 6, 0)
rapi.rpgBindPositionBufferOfs(vertBuff, noesis.RPGEODATA_FLOAT, vSize, 0)
#rapi.rpgCommitTriangles(None, noesis.RPGEODATA_USHORT, vertCount, noesis.RPGEO_POINTS, 1)
rapi.rpgCommitTriangles(edgeDecomp, noesis.RPGEODATA_USHORT, indexCount, noesis.RPGEO_TRIANGLE, 1)
def binModLoadModel(data, mdlList):
ctx = rapi.rpgCreateContext()
bin = binFile(NoeBitStream(data, NOE_BIGENDIAN))
bin.loadAll(bin.bs)
try:
mdl = rapi.rpgConstructModel()
except:
mdl = NoeModel()
mdl.setModelMaterials(NoeModelMaterials(bin.texList, bin.matList))
mdlList.append(mdl); mdl.setBones(bin.boneList)
return 1
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
thx, kovalevich007. I added some lines to your script if you don't mind:
now you'll get 9 submeshes from the radec_suit02.
I'm pretty sure there are 4 more submeshes but I got lost when trying to find the last 4 offsets for the IndOffsArr I introduced.
The max range of for i in range(0, 9) must be set to 13 (or size of IndOffsArr)
or other value for other models.
dataTableOffs = 0x1546 also to be changed for different models. (Maybe someone else will find a method to get the submesh count and the indexOffsets automatically?)
For this suit search for FFFFFFFF22. You'll find it 13 times (== 13 submeshes?).
Code: Select all
#sample class
from inc_noesis import *
indOffArr = [0x1C00, 0x5100, 0x10100, 0x1B280, 0x26800, 0x31B00, 0x3CE80, 0x42280, 0x4DC00]# 4 addresses to be added
matName = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]
def registerNoesisTypes():
handle = noesis.register("Playstation All Stars", ".cskn")
noesis.setHandlerTypeCheck(handle, binModCheckType)
noesis.setHandlerLoadModel(handle, binModLoadModel)
#noesis.logPopup()
return 1
def binModCheckType(data):
td = NoeBitStream(data)
return 1
class binFile:
def __init__(self, bs):
self.bs = bs
rapi.rpgSetOption(noesis.RPGOPT_BIGENDIAN, 1)
self.texList = []
self.matList = []
self.boneList = []
self.boneMap = []
self.offsetList = []
self.meshOffsets = []
self.materials = []
def loadAll(self, bs):
dataTableOffs = 0x1546
for j in range(0, 9):
self.materials.append(j)
indexOffset = indOffArr[j]
bs.seek(dataTableOffs, NOESEEK_ABS)
bs.seek(2, NOESEEK_REL)
vertCount = bs.readUShort()
indexCount = bs.readUShort()
#print("indCnt: %d vertCnt: %d" %(indexCount, vertCount))
bs.seek(8, NOESEEK_REL)
#indexCount = 0x8A0
#indexSize = 0x370
indexSize = bs.readUShort()
bs.seek(indexOffset, NOESEEK_ABS)
edgeData = bs.readBytes(indexSize)
edgeDecomp = rapi.decompressEdgeIndices(edgeData, indexCount)
for i in range(0, indexCount):
t = edgeDecomp[i*2]
edgeDecomp[i*2] = edgeDecomp[i*2 + 1]
edgeDecomp[i*2 + 1] = t
#vertexOffset = 0x1F70
vertexOffset = indexOffset + indexSize
print("indexOff: 0x%x, cnt: %d, size: 0x%x, vertOff: 0x%x, cnt: %d" %(indexOffset, indexCount, indexSize, vertexOffset, vertCount))
bs.seek(vertexOffset, NOESEEK_ABS)
#vertCount = 0x1A2
vSize = 0x10
vertBuff = bs.readBytes(vSize * vertCount)
#UVBuff = bs.readBytes(vertCount * 6)
#rapi.rpgBindUV1BufferOfs(UVBuff, noesis.RPGEODATA_SHORT, 6, 0)
rapi.rpgBindPositionBufferOfs(vertBuff, noesis.RPGEODATA_FLOAT, vSize, 0)
#rapi.rpgCommitTriangles(None, noesis.RPGEODATA_USHORT, vertCount, noesis.RPGEO_POINTS, 1)
rapi.rpgSetMaterial(matName[j])
rapi.rpgCommitTriangles(edgeDecomp, noesis.RPGEODATA_USHORT, indexCount, noesis.RPGEO_TRIANGLE, 1)
dataTableOffs += 128
def binModLoadModel(data, mdlList):
ctx = rapi.rpgCreateContext()
bin = binFile(NoeBitStream(data, NOE_BIGENDIAN))
bin.loadAll(bin.bs)
try:
mdl = rapi.rpgConstructModel()
except:
mdl = NoeModel()
mdl.setModelMaterials(NoeModelMaterials(bin.texList, bin.matList))
mdlList.append(mdl); mdl.setBones(bin.boneList)
return 1
I'm pretty sure there are 4 more submeshes but I got lost when trying to find the last 4 offsets for the IndOffsArr I introduced.
The max range of for i in range(0, 9) must be set to 13 (or size of IndOffsArr)
or other value for other models.
dataTableOffs = 0x1546 also to be changed for different models. (Maybe someone else will find a method to get the submesh count and the indexOffsets automatically?)
For this suit search for FFFFFFFF22. You'll find it 13 times (== 13 submeshes?).
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Thu Oct 09, 2014 7:14 pm, edited 2 times in total.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- n00b
- Posts: 17
- Joined: Fri Nov 12, 2010 4:03 pm
- Has thanked: 3 times
- Been thanked: 5 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
indOffArr = [0x1C00, 0x5100, 0x10100, 0x1B280, 0x26800, 0x31B00, 0x3CE80, 0x42280, 0x4DC00, 0x59800, 0x5D400, 0x69280, 0x74280]
for i in range(0, 13)
for i in range(0, 13)
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
how to build groups (i.e. submeshes) using Noesis script?
(so that exported wavefront models contain lines such as
g mesh0)
I tried it manually for the first 4 submeshes and first I thought I failed
since the left foot wasn't part of the lower body (left part of pic).
Then I realized that it's a matter of material to be introduced (simply used the loop index for generating name and index).
btw: I changed the loop var i to j in the script of my previous post really don't know why they separated the foot and the arm. (prefer playing RPGs where NPCs may lose their life but never separate body parts...)
(so that exported wavefront models contain lines such as
g mesh0)
I tried it manually for the first 4 submeshes and first I thought I failed
since the left foot wasn't part of the lower body (left part of pic).
Then I realized that it's a matter of material to be introduced (simply used the loop index for generating name and index).
btw: I changed the loop var i to j in the script of my previous post really don't know why they separated the foot and the arm. (prefer playing RPGs where NPCs may lose their life but never separate body parts...)
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- n00b
- Posts: 17
- Joined: Fri Nov 12, 2010 4:03 pm
- Has thanked: 3 times
- Been thanked: 5 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
Code: Select all
rapi.rpgSetMaterial(str(indexOffset))
Another would be to understand how to get the UV...
-
- mega-veteran
- Posts: 176
- Joined: Fri Jul 29, 2011 9:18 pm
- Has thanked: 54 times
- Been thanked: 46 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
thanks kovalevich007 and shakotay2 for the help!!
The only thing I know about uvs, they are in half float. I don't know much about noesis script and his structure but the script posted here is easy to understand for import other meshes from other characters
The only thing I know about uvs, they are in half float. I don't know much about noesis script and his structure but the script posted here is easy to understand for import other meshes from other characters
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
thx.
UVBuff = rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vSize, 12)
UVBuff = rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vSize, 12)
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- mega-veteran
- Posts: 176
- Joined: Fri Jul 29, 2011 9:18 pm
- Has thanked: 54 times
- Been thanked: 46 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
Thanks! works fine in all meshesshakotay2 wrote:UVBuff = rapi.rpgBindUV1BufferOfs(vertBuff, noesis.RPGEODATA_HALFFLOAT, vSize, 12)
-
- n00b
- Posts: 17
- Joined: Fri Nov 12, 2010 4:03 pm
- Has thanked: 3 times
- Been thanked: 5 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
awesome! i thought most people had just quit on ps all-stars models a while back, nice to see more recent progress, hopefully we will eventually see Drake, Cole, Emmett (if possible, because he's dlc), or Polygon Man's models
-
- veteran
- Posts: 106
- Joined: Tue Apr 03, 2012 6:02 am
- Has thanked: 11 times
- Been thanked: 12 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
Can this script be used to get the UVs from the cskn models from the PSA-S beta?
-
- veteran
- Posts: 119
- Joined: Fri Mar 30, 2012 4:56 pm
- Has thanked: 12 times
- Been thanked: 3 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
Sorry for the gigantic bump, but I have a memory dump which I've been extracting things from, but the script hasn't been working on anything. It's either been crashing or getting this error:
Here's what I'm trying to load:
http://puu.sh/nMmVX.cskn
Here's what I'm trying to load:
http://puu.sh/nMmVX.cskn
- shakotay2
- MEGAVETERAN
- Posts: 4291
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1151 times
- Been thanked: 2244 times
Re: PS All-Stars Battle Royale(final version ea05-cskn)
guess, you didn't read this thread, did you?lemurboy12 wrote:, but the script hasn't been working on anything. It's either been crashing or getting this error:
(looks like you were using chrrox' original script)
Using the script from this thread we were talking about 17 months ago gives this: indOffsArr = [0xCF80, ...]
dataTableOffs = 0xCEC6
hehehe, 3 downloads within 5 minutes?
sry, it's just a sphere, nothing more
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
-
- veteran
- Posts: 119
- Joined: Fri Mar 30, 2012 4:56 pm
- Has thanked: 12 times
- Been thanked: 3 times