Important information: this site is currently scheduled to go offline indefinitely by December 1st 2023.
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe
If you wish to donate to attempt the preservation of tools and software somewhere else before it goes down, check the GoFundMe
Witcher Wild Hunt (request)
-
erik945
- mega-veteran

- Posts: 257
- Joined: Fri Jan 20, 2012 5:43 pm
- Has thanked: 49 times
- Been thanked: 276 times
Witcher Wild Hunt (request)
I try extract 3d models from Witcher Wild Hunt. Sources (*.bundle, *.cache) been unpack with QuickBMS script.
As simple example i use model of Ciri's sword. It seems 3d model consist of a few files.
*.w2ent - base record about of type model. Has link to *.w2mesh
*.w2mesh - header of model and some data. Has link to *.w2mesh.X.buffer and *.xbm
*.w2mesh.X.buffer - data of models. Perhaps it is data about vertex, uv and face array.
But file has strange data. This is not correct float or double values. I don't can understand what is this. May be specific format, compressed or encoding data etc.
*.xbm - some data about textures.
Can anybody help me with it?
As simple example i use model of Ciri's sword. It seems 3d model consist of a few files.
*.w2ent - base record about of type model. Has link to *.w2mesh
*.w2mesh - header of model and some data. Has link to *.w2mesh.X.buffer and *.xbm
*.w2mesh.X.buffer - data of models. Perhaps it is data about vertex, uv and face array.
But file has strange data. This is not correct float or double values. I don't can understand what is this. May be specific format, compressed or encoding data etc.
*.xbm - some data about textures.
Can anybody help me with it?
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN

- Posts: 4300
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1152 times
- Been thanked: 3936 times
Re: Witcher Wild Hunt (request)
looks like another tedious task
this is a point cloud I got: (From the face indices I guess there might be 6 submeshes, but not sure about that.)
this is a point cloud I got: (From the face indices I guess there might be 6 submeshes, but not sure about that.)
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?"
- shakotay2
- MEGAVETERAN

- Posts: 4300
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1152 times
- Been thanked: 3936 times
Re: Witcher Wild Hunt (request)
why do you think so?erik945 wrote:Ok, thank you. Look like as correct UV coordinates.
This is some xbm:
just a wild guess: H2O file, point cloudThis is hex2obj?
Can you show config of the tools?
0x0 1
Vb0
0x8
0x3CC0 972
020200
0x8 255
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?"
-
erik945
- mega-veteran

- Posts: 257
- Joined: Fri Jan 20, 2012 5:43 pm
- Has thanked: 49 times
- Been thanked: 276 times
Re: Witcher Wild Hunt (request)
I don't know. Just look similar. You read this array with offset 0x3CC0, right? What format? half-float?
I think xbm is very lov resolution textures. Full resolution textures unpack too, but without names and directory structures.This hodge-podge.
upd, yes half-float. Lenght of array is around 1944 vertex (0x3CC0 - 0x5b20).
I think xbm is very lov resolution textures. Full resolution textures unpack too, but without names and directory structures.This hodge-podge.
upd, yes half-float. Lenght of array is around 1944 vertex (0x3CC0 - 0x5b20).
- shakotay2
- MEGAVETERAN

- Posts: 4300
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1152 times
- Been thanked: 3936 times
Re: Witcher Wild Hunt (request)
this looks interesting (from the wireframe there seem to be parts of a sword):
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?"
-
erik945
- mega-veteran

- Posts: 257
- Joined: Fri Jan 20, 2012 5:43 pm
- Has thanked: 49 times
- Been thanked: 276 times
Re: Witcher Wild Hunt (request)
Yes, you right. This is faces indices. I been right too. First block (0x3CC0 - 0x5b20) - UV coordinates.
It remains to understand where the coordinates of the vertices in 3D space.
Incidentally, the data blocks is cyclically repeated. Look offset 0xCE80. Maybe it submesh.
upd. first array (0x0 - 0x3CC0), has strange format, but if this is something about vertices, on record is 8 bytes. (8 * 1944 = 15552d = 0x3CC0). Don't know what is it.
Next submesh start on offset 0x97E0. 0x97e0 - 0x5b20 = 3CC0. another block 8x1944. Don't know where 3d coordinates. Float - does not fit. May be half-float?
It remains to understand where the coordinates of the vertices in 3D space.
Incidentally, the data blocks is cyclically repeated. Look offset 0xCE80. Maybe it submesh.
upd. first array (0x0 - 0x3CC0), has strange format, but if this is something about vertices, on record is 8 bytes. (8 * 1944 = 15552d = 0x3CC0). Don't know what is it.
Next submesh start on offset 0x97E0. 0x97e0 - 0x5b20 = 3CC0. another block 8x1944. Don't know where 3d coordinates. Float - does not fit. May be half-float?
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN

- Posts: 4300
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1152 times
- Been thanked: 3936 times
Re: Witcher Wild Hunt (request)
great!erik945 wrote:I been right too. First block (0x3CC0 - 0x5b20) - UV coordinates.![]()
It remains to understand where the coordinates of the vertices in 3D space.
Maybe tell us which face indices u used? Then it might be easier to get the vertices.
These are the supposed face indices blocks:
addr size................FI count vertex count
1A400 46FE: 18174/2= 9087 -> 1944 verts
1EAFE 666: 1638/2= 819 -> 263
1F164 20A6: 8358/2= 4179 -> 1088
2120A 504: 1284/2= 642 -> 152
2170E C96: 3222/2= 1611 -> 542
223A4
yup, I know.Incidentally, the data blocks is cyclically repeated.
For the uvs maybe it's used for multiple texturing?
for me it seems there are parts of the sword in the block from 0x0 to 0x3CBFDon't know where 3d coordinates
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?"
-
erik945
- mega-veteran

- Posts: 257
- Joined: Fri Jan 20, 2012 5:43 pm
- Has thanked: 49 times
- Been thanked: 276 times
Re: Witcher Wild Hunt (request)
face indicies has offset (as you say) 0x1A400. 3 * unsignded short int. I find 2850 faces.
(fragment on maxscript)
(fragment on maxscript)
Code: Select all
fseek f 0x1A400 #seek_set
for j = 1 to 2850 do (
i1 = (readshort f #unsigned ) + 1
i2 = (readshort f #unsigned ) + 1
i3 = (readshort f #unsigned ) + 1
append Face_arrays[i1,i2,i3]
)
- shakotay2
- MEGAVETERAN

- Posts: 4300
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1152 times
- Been thanked: 3936 times
Re: Witcher Wild Hunt (request)
thx! Seems I've a bug with the uv's blocksize in uv preview of hex2obj. 
(so with a VBsize=8 and UVB=4 it skips the 2nd (identical) t-verts what it shouldn't)
(so with a VBsize=8 and UVB=4 it skips the 2nd (identical) t-verts what it shouldn't)
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?"
- shakotay2
- MEGAVETERAN

- Posts: 4300
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1152 times
- Been thanked: 3936 times
Re: Witcher Wild Hunt (request)
the mesh is very likely to be found in the block from 0x0 to 0x3CBF. Try shorts, not half floats:
To get rid of the squared structures try subtracting/adding half value of the bounding box values.
(that's how I did it in former versions of hex2obj using the 'cut' feature, iirc)
(some fiddeling will be required, but I'm off for jogging now...)
(that's how I did it in former versions of hex2obj using the 'cut' feature, iirc)
(some fiddeling will be required, but I'm off for jogging now...)
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?"
-
erik945
- mega-veteran

- Posts: 257
- Joined: Fri Jan 20, 2012 5:43 pm
- Has thanked: 49 times
- Been thanked: 276 times
Re: Witcher Wild Hunt (request)
Everything is very simple. This is unsigned short value
I tried to pick up not standard mantis and exponent... Facepalm...
Model greatly scaled but quite recognizable. It is necessary to find the values of scaling. I think it is in *.w2mesh
upd. scales is rough proportional x: 23; y: 100; z: 690
I tried to pick up not standard mantis and exponent... Facepalm...
Code: Select all
fseek f 0x0 #seek_set --reading_vertex
for j = 1 to 1944 do (
x = readshort f #unsigned
y = readshort f #unsigned
z = readshort f #unsigned
print ("x: " + (x as string) + " 0x" + ((bit.intAsHex(x))as string) + " ||y: " + (y as string) + " 0x" + ((bit.intAsHex(y))as string) + " ||z: " + (z as string) + " 0x" + ((bit.intAsHex(z))as string))
qq = readshort f
append vertex_array[x,y,z]
)
Code: Select all
"x: 32432 0x7eb0 ||y: 32595 0x7f53 ||z: 65376 0xff60"
"x: 32463 0x7ecf ||y: 32747 0x7feb ||z: 65371 0xff5b"
"x: 32655 0x7f8f ||y: 32701 0x7fbd ||z: 65519 0xffef"
"x: 32639 0x7f7f ||y: 32595 0x7f53 ||z: 65525 0xfff5"
"x: 32770 0x8002 ||y: 32701 0x7fbd ||z: 65528 0xfff8"
"x: 32770 0x8002 ||y: 32595 0x7f53 ||z: 65535 0xffff"
"x: 32901 0x8085 ||y: 32595 0x7f53 ||z: 65525 0xfff5"
"x: 32885 0x8075 ||y: 32701 0x7fbd ||z: 65519 0xffef"
"x: 33108 0x8154 ||y: 32595 0x7f53 ||z: 65376 0xff60"
"x: 33078 0x8136 ||y: 32747 0x7feb ||z: 65371 0xff5b"
"x: 33108 0x8154 ||y: 32595 0x7f53 ||z: 65376 0xff60"
upd. scales is rough proportional x: 23; y: 100; z: 690
You do not have the required permissions to view the files attached to this post.
- shakotay2
- MEGAVETERAN

- Posts: 4300
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1152 times
- Been thanked: 3936 times
Re: Witcher Wild Hunt (request)
same result as with hex2obj ver 0.22c, 'cut' on (obsolete):
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?"
-
erik945
- mega-veteran

- Posts: 257
- Joined: Fri Jan 20, 2012 5:43 pm
- Has thanked: 49 times
- Been thanked: 276 times
Re: Witcher Wild Hunt (request)
Work with .w2mesh
offset of 0xC77 contain 25-byte records of submesh:
offset vertex coordinates, offset UV, offset unknown datablock (array located after UV array), some unknown bytes and number of submesh's vertex.
result
Last submesh hasn't uv and unknown array, i check it. May be it is collision or shadowbox or someone other.
offset of 0xC77 contain 25-byte records of submesh:
offset vertex coordinates, offset UV, offset unknown datablock (array located after UV array), some unknown bytes and number of submesh's vertex.
Code: Select all
for i = 1 to 6 do (
b_offset = ftell fm
vertex_offset_start = readlong fm #unsigned
uv_offset_start = readlong fm #unsigned
un1_offset_start = readlong fm #unsigned
qq2 = readlong fm #unsigned
qq3 = readlong fm #unsigned
qq4 = readlong fm #unsigned
qq5 = readshort fm #unsigned
number_vertex = readshort fm #unsigned
qq6 = readlong fm #unsigned
qq7 = readlong fm #unsigned
qq8 = readbyte fm #unsigned
print ("b_offset: " + (b_offset as string) + " 0x" + ((bit.intAsHex(b_offset))as string) + " ||vertex_offset_start: " + (vertex_offset_start as string) + " 0x" + ((bit.intAsHex(vertex_offset_start))as string) + " ||uv_offset_start: " + (uv_offset_start as string) + " 0x" + ((bit.intAsHex(uv_offset_start))as string) + " ||un1_offset_start: " + (un1_offset_start as string) + " 0x" + ((bit.intAsHex(un1_offset_start))as string)+ " ||number_vertex: " + (number_vertex as string) + " 0x" + ((bit.intAsHex(number_vertex))as string))
)
Code: Select all
"b_offset: 3191 0xc77 ||vertex_offset_start: 0 0x0 ||uv_offset_start: 15552 0x3cc0 ||un1_offset_start: 23328 0x5b20 ||number_vertex: 1944 0x798"
"b_offset: 3228 0xc9c ||vertex_offset_start: 38880 0x97e0 ||uv_offset_start: 40992 0xa020 ||un1_offset_start: 42048 0xa440 ||number_vertex: 263 0x107"
"b_offset: 3265 0xcc1 ||vertex_offset_start: 44160 0xac80 ||uv_offset_start: 52864 0xce80 ||un1_offset_start: 57216 0xdf80 ||number_vertex: 1088 0x440"
"b_offset: 3302 0xce6 ||vertex_offset_start: 65920 0x10180 ||uv_offset_start: 67136 0x10640 ||un1_offset_start: 67744 0x108a0 ||number_vertex: 152 0x98"
"b_offset: 3339 0xd0b ||vertex_offset_start: 68960 0x10d60 ||uv_offset_start: 73296 0x11e50 ||un1_offset_start: 75472 0x126d0 ||number_vertex: 542 0x21e"
"b_offset: 3376 0xd30 ||vertex_offset_start: 79808 0x137c0 ||uv_offset_start: 0 0x0 ||un1_offset_start: 0 0x0 ||number_vertex: 2207 0x89f"
