[Request] James Cameron Avatar the game models

Post questions about game models here, or help out others!
User avatar
Kirin
ultra-n00b
Posts: 6
Joined: Tue Aug 01, 2017 12:12 am
Has thanked: 9 times

Re: [Request] James Cameron Avatar the game models

Post by Kirin » Wed Feb 20, 2019 12:15 am

Hi there, I have problem with import this file into a Blender. Is it possible to solve this problem?

Code: Select all

d:\James Cameron`s Avatar - The Game\graphics\av_environment\navi\props\navi_wil
low_tree.xbg
--------------------------------------------------
--------------------------------------------------
chunk: LTMR 44 (1, 136)
d:\James Cameron`s Avatar - The Game\GRAPHICS\_MATERIALS\SSEAUT-M-20090402311697
34.xbm
DiffuseTexture1
0 d:\James Cameron`s Avatar - The Game\graphics\av_environment\_rainforest\tree\
_textures\rf_willow_tree_leaf_01_d.dds
NormalTexture1
0 d:\James Cameron`s Avatar - The Game\graphics\av_environment\_rainforest\zrt_t
extures\rt_willow_leaf_a_n.dds
IlluminationTexture
0 d:\James Cameron`s Avatar - The Game\graphics\av_environment\_rainforest\tree\
_textures\rf_willow_tree_leaf_01_d.dds
d:\James Cameron`s Avatar - The Game\GRAPHICS\_MATERIALS\SSEAUT-M-20090401536106
23.xbm
DiffuseTexture2
1 d:\James Cameron`s Avatar - The Game\graphics\av_environment\_rainforest\tree\
_textures\rft_tree_bark_mossy_01b_d.dds
DiffuseTexture1
1 d:\James Cameron`s Avatar - The Game\graphics\av_environment\_rainforest\tree\
_textures\rft_ecorces_willow_tree_01_d.dds
NormalTexture1
1 d:\James Cameron`s Avatar - The Game\graphics\av_environment\_rainforest\tree\
_textures\rft_ecorces_willow_tree_01_n.dds
chunk: EDON 180 (1, 10569)
chunk: MB2O 10749 (1, 6040)
chunk: DIKS 16789 (1, 104)
chunk: DNKS 16893 (1, 1964)
chunk: SDOL 18857 (1, 290845)
Traceback (most recent call last):
  File "Avatar.py", line 263, in Parser
    xbgParser(filename,g)
  File "Avatar.py", line 192, in xbgParser
    if chunk == 'SDOL':SDOL(g)
  File "Avatar.py", line 25, in SDOL
    indiceSectionSize = g.i(1)[0]
  File "D:\python\WatchDogs-2014-06-25\newGameLib\myLibraries\binaresLib.py", li
ne 100, in i
struct.error: unpack requires a string argument of length 4
Here is file - http://www.mediafire.com/file/0jut2j41k ... e.zip/file

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: [Request] James Cameron Avatar the game models

Post by shakotay2 » Wed Feb 20, 2019 11:31 am

I've made a small patch:

Code: Select all

	for m in range(lodCount):
		x=g.tell()
		g.seek(x+16)
		mesh=Mesh()
but as you can see there's the next hurdle in PMCU chunk. Don't have the time to fix this so you might wait for the author.

console output:
Avatar[PC]\navi_willow_tree.xbg
--------------------------------------------------
--------------------------------------------------
chunk: LTMR 44 (1, 136)
x:\Avatar[PC]\navi_willow_tree.xbgGRAPHICS\_MATERIALS\
SSEAUT-M-2009040231169734.xbm
x:\Avatar[PC]\navi_willow_tree.xbgGRAPHICS\_MATERIALS\
SSEAUT-M-2009040153610623.xbm
chunk: EDON 180 (1, 10569)
chunk: MB2O 10749 (1, 6040)
chunk: DIKS 16789 (1, 104)
chunk: DNKS 16893 (1, 1964)
chunk: SDOL 18857 (1, 290845)
chunk: XOBB 309702 (1, 44)
chunk: HPSB 309746 (1, 36)
chunk: DOL 309782 (1, 28)
chunk: PMCP 309810 (1, 28)
chunk: PMCU 309838 (1, 28)
[(1, 1062, 1062, 3186, 32, 666, 3018), (-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)]
Traceback (most recent call last):
File "Avatar-dbg.py", line 268, in Parser
File "Avatar-dbg.py", line 235, in xbgParser
IndexError: tuple index out of range
##############################
navi_willow_tree.png
You do not have the required permissions to view the files attached to this post.
Last edited by shakotay2 on Thu Feb 21, 2019 9:22 pm, edited 1 time in total.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Kirin
ultra-n00b
Posts: 6
Joined: Tue Aug 01, 2017 12:12 am
Has thanked: 9 times

Re: [Request] James Cameron Avatar the game models

Post by Kirin » Wed Feb 20, 2019 4:25 pm

Thank you, I will wait for the author. :)

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: [Request] James Cameron Avatar the game models

Post by shakotay2 » Tue Feb 26, 2019 8:55 pm

Problem is that vertex stride is 32 for the first submesh; script is very hard to debug for me.

Code: Select all

[(1, 1062, 1062, 3186, 32, 666, 3018), (-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)]
[(1, 3745, 3745, 11235, 40, 2521, 3034), (1, 2, 3, 4, 5, 6, 7, 8, 53, 54, 55, 56
, 57, 58, 59, 60, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)]
[(0, 478, 478, 1434, 40, 356, 3034), (10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10
, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10)]
[(0, 518, 518, 1554, 40, 388, 3034), (21, 22, 23, 24, 25, 26, 27, 28, 29, 21, 21
, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21
, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21)]
[(0, 574, 574, 1722, 40, 428, 3034), (62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 62
, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62
, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62)]
[(0, 374, 374, 1122, 40, 280, 3034), (73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 73
, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73
, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73)]
[(0, 478, 478, 1434, 40, 356, 3034), (32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 32
, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32)]
navi_willow_tree-xbg.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

User avatar
Kirin
ultra-n00b
Posts: 6
Joined: Tue Aug 01, 2017 12:12 am
Has thanked: 9 times

Re: [Request] James Cameron Avatar the game models

Post by Kirin » Sat Mar 02, 2019 8:33 pm

Is there a way to get mesh from this file?

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 3461
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 955 times
Been thanked: 1876 times

Re: [Request] James Cameron Avatar the game models

Post by shakotay2 » Sat Mar 02, 2019 8:41 pm

Using hex2obj (view link in my sig) you need to load the xbg, enter the parameters from the picture in my previous post then File/SaveAs mesh and you're done.

You can also copy the following lines into a text file, rename it to whatever.H2O and load it with File/Open H2O :

0x406D4 22899
Vb1
40 12
0x9E40 5425
020400
0x0 255
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

VirtualTurtle
ultra-n00b
Posts: 3
Joined: Tue Jan 03, 2017 1:58 am

Re: [Request] James Cameron Avatar the game models

Post by VirtualTurtle » Sun Jun 02, 2019 5:09 pm

I've attempted to use both the blender script and hex2obj with no luck. the blender script is having difficulty finding newGameLib, even when the folder is in the same directory. Someone who's done this before, how did you get it to work? Hex2Obj was a bit too technical for me, I loaded the .H2O file and tried a .xbg file, but it said something about the vertex count. I'm looking for anything that'll work here.

Post Reply