herbert3000 wrote:Getting the models from imas.gamedbs.jp/cgss/chara/index3d is a little bit harder, but here's what I did...
Thx, it really helps
And I tried to find something more...
For any page of imas.gamedbs.jp/cgss/chara/viewer3d/*
model data were loaded from folder ../mesh/b/ and ../mesh/h/
as '<script>' labels tell it
(for example <script src="imas.gamedbs.jp/cgss/chara/mesh/b/xxx"></script> )
which are NOT static DOM elements
So I traced the scripts and found the global variable "a"
defined in "<script>a=blablablabla</script>",
and a decoder js file following it
"<script src="
http://imas.gamedbs.jp/cgss/js/three.bu ... "></script>"
(no idea what "1486798735" means)
Variable "a" is decoded at line 975:
Code: Select all
var e=a.substring(a.length-7),k=a.split(e),b=JSON.parse(function(b,e){for(var f=window.atob(e).split("").map(function(b){return b.charCodeAt(0)}),k=0,r=0;f[r]^=b.charCodeAt(k),k=(k+1)%b.length,r=(r+1)%f.length,0!==k||0!==r;);return f.map(function(b){return String.fromCharCode(b)}).join("")}(e+k[1],k[0]));
No idea and no matter what it does,
you can get an array like:
Code: Select all
b={
md:{
imh:{
u:"http:\/\/imas.gamedbs.jp\/cgss\/chara\/mesh\/h\/257\/3017",
x:"0",
y:"131",
z:"-3",
rx:"0",
ry:"0",
rz:"0",
sx:"100",
sy:"100",
sz:"100"},
imb:{
u:"http:\/\/imas.gamedbs.jp\/cgss\/chara\/mesh\/b\/257\/3017",
x:"0",
y:"0",
z:"0",
rx:"0",
ry:"0",
rz:"0"}
},
p:"http:\/\/imas.gamedbs.jp\/cgss\/images_tx\/",
sk:"u-ZyJgrBw5"}
Obviously it contains the url that we want,
position of model, (and some what?)
url prefix of textures,
and the split string(reversed) for the next decoding.
Follow herbert3000's step,
download this two "mesh" file,
cut their header(window.imx=") and footer("),
split them by that string(reverse(b.sk)), (you'll get two parts each file)
base64 decode this two parts,
save the first part as xxx.obj.zlib and the second part as xxx.mtl.zlib,
decode zlib files by zdrop.exe,
and you get the obj file containing model point set and the mtl file listing textures.
Obj file may look like:
Code: Select all
#
# Wavefront OBJ file
# Created with Kaydara FBX
#
mtllib md_chr0266_18_21_5940.mtl
g M_Head
v -0.012692 0.075740 0.102601
v -0.006363 0.068618 0.099454
Rename the mtl file when it defines label "mtllib".
Mtl file looks like:
Code: Select all
newmtl mt_chr0106
map_Kd tx_chr0106.png
newmtl mt_chr0106_mayu
map_Kd tx_chr0106.png
Download all the image files in b.p(imas.gamedbs.jp/cgss/images_tx/)
For example imas.gamedbs.jp/cgss/images_tx/tx_chr0106.png
And then you get all files about the models. (I hope so...)
No any motion in the preview page, so I guess that it has no bone data.
All the steps can be done mechanically, though they are not easier.
An simple js+php script can get them automatically, if you want to own them all.