Important information: this site is currently scheduled to go offline indefinitely by end of the year.

[Request] James Cameron Avatar the game models

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

Re: [Request] James Cameron Avatar the game models

Post by Kirin »

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: 4284
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: [Request] James Cameron Avatar the game models

Post by shakotay2 »

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.
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?"
User avatar
Kirin
ultra-n00b
Posts: 7
Joined: Tue Aug 01, 2017 12:12 am
Has thanked: 12 times

Re: [Request] James Cameron Avatar the game models

Post by Kirin »

Thank you, I will wait for the author. :)
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4284
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: [Request] James Cameron Avatar the game models

Post by shakotay2 »

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.
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?"
User avatar
Kirin
ultra-n00b
Posts: 7
Joined: Tue Aug 01, 2017 12:12 am
Has thanked: 12 times

Re: [Request] James Cameron Avatar the game models

Post by Kirin »

Is there a way to get mesh from this file?
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4284
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1146 times
Been thanked: 2242 times

Re: [Request] James Cameron Avatar the game models

Post by shakotay2 »

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
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?"
VirtualTurtle
ultra-n00b
Posts: 4
Joined: Tue Jan 03, 2017 1:58 am

Re: [Request] James Cameron Avatar the game models

Post by VirtualTurtle »

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.
Ironcarnage101
ultra-n00b
Posts: 7
Joined: Tue Aug 31, 2021 12:45 am

Re: [Request] James Cameron Avatar the game models

Post by Ironcarnage101 »

How would I use the files provided? I've tried to install the Avatar.py addon to my Blender but it won't work. Also is there a safe download of the game so I can rip what I want from the game's files?
odocha0986
ultra-n00b
Posts: 4
Joined: Mon Mar 20, 2023 5:13 pm

Re: [Request] James Cameron Avatar the game models

Post by odocha0986 »

omfgpota wrote: Tue Jun 29, 2010 1:53 pm
shekofte wrote:excuse me for asking this question here !
how should i extract the content of avatar packages ?

please go to sir aluigi's site and there's the script you need to extract the game data, it's below
http://aluigi.org/papers/bms/avatar.bms
not work when reimport it into a pak file again, is there any other method?
Post Reply