The Forum is up for sale: XeNTaX Forum looking for new owner

LEGO Star Wars: The Skywalker Saga models

Post questions about game models here, or help out others!
Post Reply
Spiritovod
mega-veteran
mega-veteran
Posts: 171
Joined: Sun Oct 10, 2010 9:44 pm
Has thanked: 31 times
Been thanked: 153 times

LEGO Star Wars: The Skywalker Saga models

Post by Spiritovod »

They have quite complex mesh system, but for static meshes ("model" files) it's more or less simple.

In general, every mesh file consists of header and SMNR containers - you can find count of them in a model file before the first container, for example, for tree_stump and maz_castle from provided sample it will be 4. Those containers can include other kind of containers and other info. For static meshes they would contain mostly mesh data (vertices + indices and such) in DXTV sub-containers. Right before every DXTV container there will be vertices count in big endian - pay attention that fields should be parsed in big endian, but data itself is little endian. Depending on SMNR type (I think it's a second field after container's header) it can consist of one or two DXTV subcontainer - tree_stump is the first one and maz_castle is the second. In the first case all data will be included in the first block (positions as half-float + normals + UV + other) and after that there is block with indices. In the second case first DXTV subcontainer contains only normals + UV + other and the second one contains positions as float and block with indices. I believe that types of included in DXTV data are serialized in its header, also the header has variable size. You can see the purpose of each SMNR container at the end of file - for example, for tree_stump the first one will be base model, second and third are LODs and the last one is "shadow" mesh (it's usually used for effects).

Here is visual representation of results for the things explained above:
for tree_stump: https://i.imgur.com/0DWDomn.png
for maz_castle: https://i.imgur.com/ARSXUY9.png

===========================================

Update:
Ok, here is a brief explanation about skeletal meshes ("ghg" files):
They work in around the same way as static meshes, but more complicated. They have single indices block for all submeshes. Also, at the end of all SMNR containers with DXTV subcontainers with mesh data there will be 78 bytes block with usage of geometry of this DXTV block. For example, in incinerator_stormtrooper file first DXTV contains both positions + other info and indices data. Right after indices there is field with start index for indices, indices count, start index for positions and positions count (actually it's stride value * count). If you're serializing them separately, start index for positions will be always zero, as in most cases current DXTV contains separate positions data (either float or half-float) - but if you'll take a look at SMNR containers hierarchy, you should notice the same index values, which are shared among submeshes, considering current SMNR container. I suppose it allows to create groups of submeshes and process them in connection with each other if needed.

Here is visual representation of results for the things explained above:
for incinerator_stormtrooper (1st DXTV block submesh): https://i.imgur.com/QfMYTzv.png
for incinerator_stormtrooper (3rd DXTV block submesh): https://i.imgur.com/bR0wUlz.png
for incinerator_stormtrooper (4th DXTV block submesh): https://i.imgur.com/okAKBJi.png

===========================================

Samples, used here: link

P.S. Personally I'm not interested in all this, it's just a friend asked to look into it. Maybe this info will help others in some way.
Last edited by Spiritovod on Fri Apr 08, 2022 6:00 pm, edited 3 times in total.
Spiritovod
mega-veteran
mega-veteran
Posts: 171
Joined: Sun Oct 10, 2010 9:44 pm
Has thanked: 31 times
Been thanked: 153 times

Re: LEGO Star Wars: The Skywalker Saga models

Post by Spiritovod »

First post is updated with more info about skeletal meshes ("ghg" files).
Spiritovod
mega-veteran
mega-veteran
Posts: 171
Joined: Sun Oct 10, 2010 9:44 pm
Has thanked: 31 times
Been thanked: 153 times

Re: LEGO Star Wars: The Skywalker Saga models

Post by Spiritovod »

As an addition to explaned above, here is script for converting TEXTURE files into respective dds and also for extracting separate dds from NXG_TEXTURES files. You can modify the script according to included comment to strip full internal paths and leave filenames only.

Update: Small fixes for particular texture types added.
Update 2: Script is updated to support ATI1 textures. Also script should now produce proper error for unsupported texture types.
Update 3: Script is updated for proper handling of some NXG_TEXTURES files.

skywalker_saga_textures_v5.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Spiritovod on Tue Jun 21, 2022 10:23 pm, edited 2 times in total.
Karpati
ultra-veteran
ultra-veteran
Posts: 460
Joined: Thu Dec 07, 2006 11:25 pm
Has thanked: 9 times
Been thanked: 94 times

Re: LEGO Star Wars: The Skywalker Saga models

Post by Karpati »

I have finished my NTT Engine (LEGO Star Wars: The Skywalker Saga) *.model loader module and I have released the following programs as web updates:

- 3D Object Converter v8.024 (Windows)
- i3DConverter v4.204 (macOS)
- i3DConverter v2.204 (Linux)

How to get the 3D Object Converter v8.024:
Download the 3D Object Converter from http://3doc.i3dconverter.com and install it or download and use the portable version (if you don’t have it yet).
After it just use the Help/Check for updates... function to get the v8.024.

How to get the i3DConverter macOS v4.203:
Download the i3DConverter from http://www.i3dconverter.com and install it (if you don’t have it yet).
After it just use the Help/Check for updates... function to get the v4.203.

How to get the i3DConverter Linux v2.203:
Download the i3DConverter from http://www.i3dconverter.com and install it (if you don’t have it yet).
After it just use the Help/Check for updates... function to get the v2.203.
Spiritovod
mega-veteran
mega-veteran
Posts: 171
Joined: Sun Oct 10, 2010 9:44 pm
Has thanked: 31 times
Been thanked: 153 times

Re: LEGO Star Wars: The Skywalker Saga models

Post by Spiritovod »

KillzXGaming released his tool for .model files, based on Sluicer's info from here (in case if you don't know, Sluicer created similar tool for a few previous Lego games before, called ExtractNxgMESH): https://github.com/KillzXGaming/NTT-Model-Dumper
Post Reply