Thanks chipi it works perfect, but I have no idea how to make textures work.
How to convert NFS NL (sba) textures to any usefull format?
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
NFS No Limits
-
- veteran
- Posts: 143
- Joined: Mon Sep 22, 2014 1:23 am
- Has thanked: 72 times
- Been thanked: 14 times
Re: NFS No Limits
Read his post, mate.TomWin wrote:Thanks chipi it works perfect, but I have no idea how to make textures work.
How to convert NFS NL (sba) textures to any usefull format?
My converter has been ready since Sunday, but I've been struggling with sba textures.
It's all a mess, multiple data chunks connected together like databases...
- Chipicao
- ultra-veteran
- Posts: 476
- Joined: Thu Feb 03, 2011 11:18 am
- Has thanked: 42 times
- Been thanked: 305 times
- Contact:
Re: NFS No Limits
Here's what I know so far about the SBA.
The file structure itself is very straight-forward:
This structure is looped until the end of the file, and each one is aligned to 4 bytes (although only CDAT needs it)
There are several types:
In case of DXT or PVR, the texture headers need to be rebuilt, that's why it's important to parse "DATA" properly and read everything.
The way I see it, property strings from CHDR need to be linked to property types and then to actual values from DATA in order to have enough information to rebuild texture headers.
It's just a matter oh "how"
The file structure itself is very straight-forward:
Code: Select all
int32 fileIdentifier //"SBIN"
int32 version
struct dataBlock
{
int32 dataIdentifier; //4byte string
int32 dataLength; //not including identifier, length or checksum
int32 checksum;
byte[] data;
}
There are several types:
- "ENUM", "STRU": groups of shorts(usually 6) that may give additional information about the other structures that follow
- "FIEL": group of shorts; unknown at this point
- "OHDR": presumably acts like a header with reading instructions for the "DATA" that follows
- "DATA": contains texture properties such as format, width, height, mipmaps
- "CHDR": header for the "char data block"; contains pairs of int32 offsets and lengths used to read strings
- "CDAT": char data block from which strings are read using "CHDR"; the strings are null-terminated, but that's probably part of the writing process, not the reading
Examples: ImageFormatType, TextureFilterType, TextureWrapType, Image, format, data, width, height, Texture, mipmaps, filter_min, filter_mag, wrap_s, wrap_t, default, RGB, RGBA, PVRTC_2BPP_RGB, PVRTC_2BPP_RGBA, PVRTC_4BPP_RGBA, PVRTC_4BPP_RGB, DXT1, DXT3, DXT5, ATC_RGB, ATC_RGBA_Explicit, ATC_RGBA_Interpolated, ETC_RGB, PNG, JPEG, Nearest, Linear, NearestMipmapNearest, NearestMipmapLinear, LinearMipmapNearest, LinearMipmapLinear, Repeat, ClampToEdge - "BULK": unknown at this point; could be used to link everything together
- "ALGN": used for the sole purpose of aligning the image data
- "BARG" contains the actual image data
In case of DXT or PVR, the texture headers need to be rebuilt, that's why it's important to parse "DATA" properly and read everything.
The way I see it, property strings from CHDR need to be linked to property types and then to actual values from DATA in order to have enough information to rebuild texture headers.
It's just a matter oh "how"
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
- Chipicao
- ultra-veteran
- Posts: 476
- Joined: Thu Feb 03, 2011 11:18 am
- Has thanked: 42 times
- Been thanked: 305 times
- Contact:
Re: NFS No Limits
Yeah, it may be a bit confusing. What I mean is texture names and file paths are registered, but they will fail to load.
So at the very least you will know what kind of texture should be used for a specific material.
So at the very least you will know what kind of texture should be used for a specific material.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
- Chipicao
- ultra-veteran
- Posts: 476
- Joined: Thu Feb 03, 2011 11:18 am
- Has thanked: 42 times
- Been thanked: 305 times
- Contact:
Re: NFS No Limits
Here is a small tool I made to convert textures: http://www.mediafire.com/download/m00pm ... aBrute.zip
It is by no means a "true" converter. It basically guesses the image format and number of mipmaps based in width, height and image data size.
Only for NFS:NL! Most textures are successfully converted, except cube maps and some special sba files.
I have also updated M3G2FBX:
- fixed a small issue with rotations
- added option to make mesh names unique, useful if you plan to convert FBX to OBJ; usage: M3G2FBX -u file/folder
- the tool will now actively search for textures that have been converted with sbaBrute; keep textures in their original location or in the same folder as the model
I suggest you remove any special characters from folder names, for example the ™ in NFS NL, otherwise textures may not load.
It is by no means a "true" converter. It basically guesses the image format and number of mipmaps based in width, height and image data size.
Only for NFS:NL! Most textures are successfully converted, except cube maps and some special sba files.
I have also updated M3G2FBX:
- fixed a small issue with rotations
- added option to make mesh names unique, useful if you plan to convert FBX to OBJ; usage: M3G2FBX -u file/folder
- the tool will now actively search for textures that have been converted with sbaBrute; keep textures in their original location or in the same folder as the model
I suggest you remove any special characters from folder names, for example the ™ in NFS NL, otherwise textures may not load.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
- Chipicao
- ultra-veteran
- Posts: 476
- Joined: Thu Feb 03, 2011 11:18 am
- Has thanked: 42 times
- Been thanked: 305 times
- Contact:
Re: NFS No Limits
Please re-download M3G2FBX. I have fixed a serious issue that prevented reading UVs on certain models, including a few cars.
Thanks to Automotive Gaming for pointing it out.
Thanks to Automotive Gaming for pointing it out.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
- Ferrari formula 1
- advanced
- Posts: 72
- Joined: Mon Aug 11, 2014 11:42 am
- Has thanked: 28 times
- Been thanked: 11 times
Re: NFS No Limits
Chipicao wrote:Here is a small tool I made to convert textures: http://www.mediafire.com/download/m00pm ... aBrute.zip
It is by no means a "true" converter. It basically guesses the image format and number of mipmaps based in width, height and image data size.
Only for NFS:NL! Most textures are successfully converted, except cube maps and some special sba files.
I have also updated M3G2FBX:
- fixed a small issue with rotations
- added option to make mesh names unique, useful if you plan to convert FBX to OBJ; usage: M3G2FBX -u file/folder
- the tool will now actively search for textures that have been converted with sbaBrute; keep textures in their original location or in the same folder as the model
I suggest you remove any special characters from folder names, for example the ™ in NFS NL, otherwise textures may not load.
wow great... can u please share the garage FBX model???
Thanks
Re: NFS No Limits
Um, is a support for NFS:HP possible (as it uses M3G for models as well)?Chipicao wrote:- supports all models from RR3, NFS:MW and NFS:NL
-
- veteran
- Posts: 143
- Joined: Thu Feb 04, 2016 9:20 pm
- Has thanked: 19 times
- Been thanked: 13 times
Re: NFS No Limits
sbaBurte isn't working from newest cars and obb file can not open http://www.mediafire.com/download/l14hj ... blo_sv.rar
-
- veteran
- Posts: 143
- Joined: Thu Feb 04, 2016 9:20 pm
- Has thanked: 19 times
- Been thanked: 13 times
Re: NFS No Limits
Game have new archive of models: http://www.mediafire.com/download/gnkaf ... models.ob1
-
- ultra-n00b
- Posts: 3
- Joined: Sun Aug 28, 2016 4:00 pm