NFSAddons Forums

Need For Speed Forums => Editing Projects => Topic started by: bfut on Oct 29, 2021, 8:30 AM

Title: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Oct 29, 2021, 8:30 AM
Homepage: https://github.com/bfut/fcecodec

fcecodec_blender - Blender (.fce) Import/Export Add-on: https://github.com/bfut/fcecodec_blender

Obj2Fce conversion tutorial: https://github.com/bfut/fcecodec/blob/main/scripts/doc_Obj2Fce.md
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: AJ_Lethal on Oct 29, 2021, 10:53 AM
Nice to see a new tool for FCE files, although a have a couple of questions:

1- are you planning to make a Windows CLI version, like unvivtool?
2- is the tool able to extract data such as dummies and colors?
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Oct 30, 2021, 11:57 AM
cheers

yes, everything gets exposed. Colors, dummies, triangle flags, vertex animation flags, etc.
MGetColors_numpy()
MSetColors_numpy()
MGetDummyNames()
MSetDummyNames()
MGetDummyPos_numpy()
MSetDummyPos_numpy()

these return / expect arrays.

Because Wavefront OBJ does not know dummies, IoExportObj() outputs diamonds in their place instead (which is kinda the same idea from the official MCO cars).

Example: the dummies of MCOs 47caddy.viv->part.fce

>>>mesh.MGetDummyNames()
['HWYN500', 'HWYN500', 'TRYN550', 'TRYN550', 'POYN350', 'POYN350', 'TRYN550', 'TRYN550', ':ENGINE', ':EXHAUST', ':EXHAUST', 'RWNN350', 'RWNN350']

>>> mesh.MGetDummyPos_numpy().reshape(-1,3)
[[-0.8350089  -0.07701124  2.4603028 ]
[ 0.8369203  -0.07701124  2.4603028 ]
[-0.89753664 -0.2275881  -2.348826  ]
[ 0.9148167  -0.23661205 -2.3675246 ]
[ 0.82447654 -0.2796423   2.4292781 ]
[-0.8279473  -0.2796423   2.4486275 ]
[ 0.90377176 -0.30901065 -2.4441476 ]
[-0.89753664 -0.30966136 -2.4347985 ]
[-0.00663905 -0.07701124  2.431279  ]
[-0.4226048  -0.5902259  -2.5992672 ]
[ 0.43890017 -0.5902259  -2.5992672 ]
[-0.9075366  -0.17758808 -2.178826  ]
[ 0.91246223 -0.17758808 -2.178826  ]]



Example: the colors of NFSHS ldia/car.viv->car.fce

# for N colors the array has shape=(N, 4, 4)
# fcelib_fcetypes.h documents the meaning of each row

>>> mesh.MGetColors_numpy()
[[[138  14 210 128]
  [ 31 111 111 127]
  [  3 254 116 127]
  [  1 220  70 127]]

[[ 35 254 178 127]
  [ 31 151 112 127]
  [171 253  88 127]
  [171 253  62 127]]

[[254 255 150 127]
  [127   2  73 127]
  [134  11 194 127]
  [134  11 137 127]]

[[168 178 100 127]
  [127   1  49 127]
  [ 37 176 147 127]
  [ 37 176 103 127]]]




not sure why, but I do stuff like this now >:D
mesh.MVertsPos_numpy = mesh.MVertsPos_numpy * 10
(https://i.imgur.com/JVykT3x.png)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Nov 17, 2021, 1:21 PM
There have been several updates since the above posts.

Of note, the repo now includes convenient converter scripts Obj2Fce and Fce2Obj. With these, it's just drop in and go:
https://github.com/bfut/fcecodec/tree/main/scripts

Dummies, part positions and triangle flags are all handled, among other features. For NFS:HS, damage models are handled.

For Obj2Fce, there is comprehensive documentation available: https://github.com/bfut/fcecodec/blob/main/scripts/doc_Obj2Fce.md

Finally, here is your shortcut from your favorite 3D editor (e.g. Blender, Houdini FX, etc.) straight to FCE.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Dec 13, 2021, 2:47 PM
News:
1) The tutorial has been updated quite a bit and has been posted to NFSAddons:
https://www.nfsaddons.com/downloads/nfshs/tools/6399/convert-obj-to-fce.html
The tutorial now covers FCE3, FCE4, and bits of FCE4M (= MCO).

2) FCE4M output is now also officially supported.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Jun 22, 2022, 7:12 AM
The repository is continuously being updated.

* improved FCE4M support
* improved ready-to-use Python scripts
* improved Obj2Fce conversion tutorial ( https://github.com/bfut/fcecodec/blob/main/scripts/doc_Obj2Fce.md )
* python function fcecodec.IoExportObj() optionally allows ignoring part positions (i.e., optionally center parts around the origin on export)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Aug 11, 2022, 7:43 AM
With the latest update to version 1.2, fcecodec has pretty much matured. The Python API will be stable from this point on.

OBJ to FCE and vice versa has been part of the package and is ready to use after installation. Would love to see someone share feedback and their own custom scripts.

Latest changes:
* Python: require NumPy; removes redundant non-NumPy functions (i.e., no more API clutter)
* Documentation: add background information for references used

Enjoy. https://github.com/bfut/fcecodec
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Aug 27, 2022, 1:15 AM
News:
* improved stability: robust handling of manipulated / invalid FCE data
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Aug 28, 2022, 2:47 AM
Quote from: bfut on Aug 27, 2022,  1:15 AM
News:
* improved stability: robust handling of manipulated / invalid FCE data
Just that you mentioned manipulated/invalid .fce data. There are quite many car.viv's that were hex edited back in the day. Can your unvivtool handle those kind of viv's? I couldn't try it out yet since the use of this program is very complicated to usual users.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Sep 02, 2022, 5:05 AM
Quote from: pete9516 on Aug 28, 2022,  2:47 AM
Quote from: bfut on Aug 27, 2022,  1:15 AM
News:
* improved stability: robust handling of manipulated / invalid FCE data
Just that you mentioned manipulated/invalid .fce data. There are quite many car.viv's that were hex edited back in the day. Can your unvivtool handle those kind of viv's? I couldn't try it out yet since the use of this program is very complicated to usual users.

1) Complicated in which sense? Are you on Windows? I'm constantly testing on Windows10, but Linux is recommended, because Python module installation is so much easier. Give WSL a try, if on a Windows machine.

2) Yes, that type of manipulation is one target. I specifically remember CPD manipulating his VIV archives (see unvivtool for that), and possibly even the FCEs. My go-to test file is CPD's Porsche 962. I'd be interested in any VIV or FCE that cannot be opened and/or fully parsed by either, unvivtool or fcecodec.

fcecodec is required to fully handle all valid FCE data. fcecodec (and unvivtool, for that matter) is designed in a way to recover as much information as possible until encountering faulty information within an invalid file. Nomenclatura: invalid = Need For Speed cannot handle it, valid = Need For Speed does handle the file. Those manipulated files of old were in fact valid in this sense, because they could be played in the games; but some tools of the day crashed. Contrary to that, crashes are not supposed to happen with my tools either way.

I have yet to encounter either FCE or VIV that cannot be opened by my tools, but would work in the games.

What information do you believe is missing from fcecodec documentation?
Do you have examples of manipulated files?
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Sep 05, 2022, 1:53 AM
Quote from: bfut on Sep 02, 2022,  5:05 AM
Quote from: pete9516 on Aug 28, 2022,  2:47 AM
Quote from: bfut on Aug 27, 2022,  1:15 AM
News:
* improved stability: robust handling of manipulated / invalid FCE data
Just that you mentioned manipulated/invalid .fce data. There are quite many car.viv's that were hex edited back in the day. Can your unvivtool handle those kind of viv's? I couldn't try it out yet since the use of this program is very complicated to usual users.

1) Complicated in which sense? Are you on Windows? I'm constantly testing on Windows10, but Linux is recommended, because Python module installation is so much easier. Give WSL a try, if on a Windows machine.

2) Yes, that type of manipulation is one target. I specifically remember CPD manipulating his VIV archives (see unvivtool for that), and possibly even the FCEs. My go-to test file is CPD's Porsche 962. I'd be interested in any VIV or FCE that cannot be opened and/or fully parsed by either, unvivtool or fcecodec.

fcecodec is required to fully handle all valid FCE data. fcecodec (and unvivtool, for that matter) is designed in a way to recover as much information as possible until encountering faulty information within an invalid file. Nomenclatura: invalid = Need For Speed cannot handle it, valid = Need For Speed does handle the file. Those manipulated files of old were in fact valid in this sense, because they could be played in the games; but some tools of the day crashed. Contrary to that, crashes are not supposed to happen with my tools either way.

I have yet to encounter either FCE or VIV that cannot be opened by my tools, but would work in the games.

What information do you believe is missing from fcecodec documentation?
Do you have examples of manipulated files?
Well i think that those tools would be very simple in a way that where you drag'n'drop the car.viv onto the .exe file, it will get exported in the same folder. Maybe this kind of feature is too hard to code, but i know it's possible. For usual people like me it's a pain in the ass to open cmd.exe and type the whole stuff. And i know how to copy'n'paste paths in cmd.exe. But still it would be way more pleaserable to just drag & drop the car.viv onto the .exe. And yes there is one car.viv i have which i don't know any tool that can export the inner data out of it. And it's drivable in the game. Here's the link to it:
https://drive.google.com/file/d/1opmNuVo4sXjrs-pn8xdRh6bA0ifkSQhJ/view?usp=sharing
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Sep 06, 2022, 5:43 AM
I was just trying to use example 2:
EXAMPLE 2
   unvivtool d car.viv .

      decodes and extracts all files from archive 'car.viv' to current working
      directory

But this doesn't work at all. All it does is this:
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Sep 06, 2022, 5:48 AM
And this is the error message when i do it the more complicated way, which finally works, but the car.viv is just too screwed.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Sep 10, 2022, 5:14 AM
I've responded in the unvivtool thread: https://www.nfsaddons.com/forums//index.php?topic=2294.15
Please post your questions about unvivtool in the dedicated thread instead.

Spoilers: car.fce is manipulated but fcecodec can handle it. :)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Sep 27, 2022, 9:17 AM
The latest update on Github fixes a potential crash in the DeletePart() function.

New Python are now included: 1) Convert dummies between NFS3, NFS4 and MCO. 2) Rename and merge parts for easy conversion between NFS3, NFS4 and MCO. The latter will make it possible to easily choose between convertible, chopped roof, normal roof as well as open and closed hood.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Sep 28, 2022, 9:07 AM
Quote from: bfut on Sep 27, 2022,  9:17 AM
The latest update on Github fixes a potential crash in the DeletePart() function.

2) Rename and merge parts for easy conversion between NFS3, NFS4 and MCO.
This is very interesting to me!! Merging parts is very useful for specific stuff. So FCEcodec can delete parts of a car.fce? I wouldn't imagine this, gonna try it out at a time
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: Paul Spain on Sep 29, 2022, 7:11 AM
Is this a way to finally break the 16 lights limit and possibly even have lights in colors not before available..Like say Green?
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Sep 30, 2022, 2:59 PM
Quote from: Paul Spain on Sep 29, 2022,  7:11 AM
Is this a way to finally break the 16 lights limit and possibly even have lights in colors not before available..Like say Green?
New colors would have to be implemented in the games themselves. To the best of my knowledge, green is not available, not even MCO.

The max. 16 dummy and max. 64 parts limits are hard-coded in the FCE file format itself. The dummy limit was circumvented by developers in MCO in that they simply added dozens of dummy parts instead, as placeholders for engine parts, wheels, driver, etc. That does not help for NFS3 and NFS4, however, and changed nothing for light and fx dummies.
We could easily define and implement a new FCE format version, if either of the games were open-sourced with appropriate licenses. Things like this are being done for old Quakes and Dooms, that have been FOSS'ed for decades.

Fcecodec is a modding tool that decodes and encodes the 3 FCE file format versions as they are implemented in NFS3, NFS4 and MCO. In my documentation, I refer to them as FCE3, FCE4 and FCEM, respectively.

Quote from: pete9516 on Sep 28, 2022,  9:07 AM
This is very interesting to me!! Merging parts is very useful for specific stuff. So FCEcodec can delete parts of a car.fce? I wouldn't imagine this, gonna try it out at a time

Yes, basic tasks such as this are all available and allow easy automatization when chained. Documented here: https://github.com/bfut/fcecodec/tree/main/python
My scripts can be used just like command-line tools. Find scripts in this folder: https://github.com/bfut/fcecodec/tree/main/scripts

The decoder and encoder are fully transparent, i.e., vertex positions, normals, etc. do not change unless specifically edited.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Feb 17, 2023, 11:34 AM
Updated fcecodec v1.3 is now available from https://github.com/bfut/fcecodec

Changes:
+ Scripts: several new scripts, see below
# stability and usability improvements
# License changed to GPLv2

New Scripts:
+ bfut_ConvertDummiesToFce3.py - convert dummy names from NFS:HS and MCO to NFS3
+ bfut_CopyCarColors.py - copy car colors from source to target, overwriting target
+ bfut_MergeParts (Fce4 to Fce3, keep version).py - NFS:HS to NFS3 conversion convenience tool
+ bfut_MergeParts (FceM to Fce4, keep version).py - MCO to NFS:HS conversion convenience tool
+ bfut_SortPartsToFce3Order (keep fce version).py - NFS:HS to NFS3 conversion convenience tool
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 09, 2023, 12:03 PM
Updated fcecodec v1.4 is now available from https://github.com/bfut/fcecodec

Changes:
+ faster execution
+ Scripts: several new scripts, see below
# stability and usability improvements

New Scripts:
+ bfut_SaveFceAsFce3.py - convert FCE version only
+ bfut_SaveFceAsFce4.py - convert FCE version only
+ bfut_SaveFceAsFce4M.py - convert FCE version only
+ bfut_SetHighChromeToTransparent.py - add semi-transparency flag to all high chrome polygons
+ bfut_SetNormals (project verts to unit sphere).py - quick fix for broken normals; this is closest to NFS3 vanilla normals but mostly a code example
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 11, 2023, 9:11 AM
Just posted a bunch of script updates to the main page. Enjoy. :)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 15, 2023, 1:14 PM
https://github.com/bfut/fcecodec/blob/main/notebooks/bfut_FceConverter.ipynb

Preview version of the FceConverter. Detailed documentation in there.

Conversion from MCO to NFS:HS, MCO to NFS3 and NFS:HS to NFS3 is finished.

It's also a tutorial all the same. Enjoy.


Description
This notebook is a step-by-step converter for FCE files between FCE3, FCE4, and FCE4M formats.
Handles renaming parts, merging parts, reordering parts, renaming dummies, scaling model size, etc., where applicable.
Also converts texture alpha channel. For FCE3 and FCE4, the source is a TGA file. For FCE4M, the source is an FSH file.

Purpose
This notebook can produce a game-ready and finished VIV archive in seconds, avoiding manual chores.
Preview and prepare your work for multiple games at the same time.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Apr 15, 2023, 3:47 PM
Quote from: bfut on Apr 15, 2023,  1:14 PM
https://github.com/bfut/notebooks/blob/main/fcecodec/bfut_FceConverter.ipynb

Preview version of the FceConverter. Detailed documentation in there.

Conversion from MCO to NFS:HS, MCO to NFS3 and NFS:HS to NFS3 is finished.

It's also a tutorial all the same. Enjoy.


Description
This notebook is a step-by-step converter for FCE files between FCE3, FCE4, and FCE4M formats.
Handles renaming parts, merging parts, reordering parts, renaming dummies, scaling model size, etc., where applicable.
Also converts texture alpha channel. For FCE3 and FCE4, the source is a TGA file. For FCE4M, the source is an FSH file.

Purpose
This notebook can produce a game-ready and finished VIV archive in seconds, avoiding manual chores.
Preview and prepare your work for multiple games at the same time.

This is awesome!!
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 21, 2023, 1:46 PM
Updated fcecodec v1.4 is now available from https://github.com/bfut/fcecodec

Changes:
+ Scripts: several new scripts, see below

New Scripts:
+ bfut_ConvertDummies (Fce3 to Fce4)
+ bfut_ConvertPartnames (Fce3 to Fce4)
+ bfut_ConvertPartnames (Fce4 to Fce4M)
+ bfut_MimicPartnamesAndPartsorder - sort parts in target.fce according to parts in input.fce, adding and deleting where necessary (use with HS and MCO files with canonical partnames)

---

NFS FCE Converter: https://github.com/bfut/fcecodec/blob/main/notebooks/bfut_FceConverter.ipynb

New preview version:
+ all conversion modes are finished: takes 3, HS and MCO files as input and converts to any desired output 3, HS or MCO
# more detailed installation instructions
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 23, 2023, 5:00 AM
Quote from: pete9516 on Apr 15, 2023,  3:47 PM
This is awesome!!
Thanks!
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 28, 2023, 11:13 PM
Updated fcecodec v1.4 is now available from https://github.com/bfut/fcecodec

Changes:
+ Scripts: new script, see below

New Scripts:
+ bfut_RescaleModel.py - quickly make your model bigger or smaller by a given factor

---

bfut_FceConverter: https://github.com/bfut/fcecodec/blob/main/notebooks/bfut_FceConverter.ipynb

New preview version:
+ heavily updated documentation (especially installation)
+ minor performance improvement

This notebook is not too far off the final version. If there are wishes, now would be a good time to bring 'em up.  :)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: noise on Apr 29, 2023, 1:21 AM
Don't know if you have any influence on the behavior of fcecenter/converter but after you used these tools for your car.fce and then go to fcefinish, you often see the normals are messed up.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 29, 2023, 6:09 AM
Quote from: noise on Apr 29, 2023,  1:21 AM
Don't know if you have any influence on the behavior of fcecenter/converter but after you used these tools for your car.fce and then go to fcefinish, you often see the normals are messed up.
That's an FCEFinish issue.

fcecodec is fully transparent and does not change the normals, unless desired by the user.

A quick way to edit FCEs:
1) for FCE export to OBJ use bfut_Fce2Obj.py, then open as OBJ in Blender, 3dsmax, etc.
2) to reimport OBJ to FCE, use one of the bfut_Obj2Fce*.py scripts

Thank you for the feedback!  :)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: noise on Apr 29, 2023, 1:26 PM
Thnx, haven't tried fcecodec yet.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 29, 2023, 1:55 PM
Please don't ask about other people's software in this dedicated thread, as I cannot give you support on that. Thanks anyway. ;)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Sep 02, 2023, 5:53 AM
Updated fcecodec v1.5 is now available from https://github.com/bfut/fcecodec

fcecodec Changes:
+ improved performance and stability
---

New bfut_FceConverter version (https://github.com/bfut/fcecodec/blob/main/notebooks/bfut_FceConverter.ipynb):
+ direct link to no-user-prompt version of FSHTool
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Dec 11, 2023, 11:09 AM
Thread view count blew up for some reason. This program is actively maintained - if there's anything, just gimme feedback. :)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Dec 12, 2023, 8:16 PM
Quote from: bfut on Dec 11, 2023, 11:09 AM
Thread view count blew up for some reason. This program is actively maintained - if there's anything, just gimme feedback. :)
Sometimes i find corrupt car.fce files, is your program intended to also fix such files?
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Dec 15, 2023, 10:03 AM
The goal is to be able to decode everything that is accepted by the game and reject anything invalid. IIRC there have been examples of "locked" FCEs, similarly to what has been done with VIV archives.

Any particular example? :D
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Dec 15, 2023, 5:13 PM
Quote from: bfut on Dec 15, 2023, 10:03 AM
The goal is to be able to decode everything that is accepted by the game and reject anything invalid. IIRC there have been examples of "locked" FCEs, similarly to what has been done with VIV archives.

Any particular example? :D
Not yet, i've once had problems removing low poly parts from Justin Martin's Aston Martin Vanquish, when i did so with Zanoza Modeler 1.07b, AI had different position of :HB than player car and/or vice versa. But i managed to refix this model nonetheless by simply redoing the process with the original car.fce exported from the car.viv. If i find a problematic model, i'll let you know
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Dec 27, 2023, 4:17 AM
Quote from: pete9516 on Dec 15, 2023,  5:13 PM
Quote from: bfut on Dec 15, 2023, 10:03 AM
The goal is to be able to decode everything that is accepted by the game and reject anything invalid. IIRC there have been examples of "locked" FCEs, similarly to what has been done with VIV archives.

Any particular example? :D
Not yet, i've once had problems removing low poly parts from Justin Martin's Aston Martin Vanquish, when i did so with Zanoza Modeler 1.07b, AI had different position of :HB than player car and/or vice versa. But i managed to refix this model nonetheless by simply redoing the process with the original car.fce exported from the car.viv. If i find a problematic model, i'll let you know

The :LB (low body) damage positions are badly offset and that is the effect you have seen. I made a screenshot below.  The Aston Martin FCE is completely fine otherwise, i.e., fcecodec has zero issues handling it. No doubt a result of the terrible FCE editors available at the time of release. Justin martin was great modder - I would play his cars all the time back then.

The below is ther result of:
1) Download the car.
2) Unzip
3) Use unvivtool to unpack VIV
4) Use fcecodec to convert to OBJ python 'fcecodec/scripts/bfut_Fce2Obj.py' 'nfsaddons.com_astonmartinvanquish/car.fce'
5) Open in Blender



(https://i.imgur.com/pg5X9MU.png)
https://imgur.com/a/smkkIvl
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Dec 27, 2023, 5:06 AM
Quote from: bfut on Dec 27, 2023,  4:17 AM
Quote from: pete9516 on Dec 15, 2023,  5:13 PM
Quote from: bfut on Dec 15, 2023, 10:03 AM
The goal is to be able to decode everything that is accepted by the game and reject anything invalid. IIRC there have been examples of "locked" FCEs, similarly to what has been done with VIV archives.

Any particular example? :D
Not yet, i've once had problems removing low poly parts from Justin Martin's Aston Martin Vanquish, when i did so with Zanoza Modeler 1.07b, AI had different position of :HB than player car and/or vice versa. But i managed to refix this model nonetheless by simply redoing the process with the original car.fce exported from the car.viv. If i find a problematic model, i'll let you know

The :LB (low body) damage positions are badly offset and that is the effect you have seen. I made a screenshot below.  The Aston Martin FCE is completely fine otherwise, i.e., fcecodec has zero issues handling it. No doubt a result of the terrible FCE editors available at the time of release. Justin martin was great modder - I would play his cars all the time back then.

The below is ther result of:
1) Download the car.
2) Unzip
3) Use unvivtool to unpack VIV
4) Use fcecodec to convert to OBJ python 'fcecodec/scripts/bfut_Fce2Obj.py' 'nfsaddons.com_astonmartinvanquish/car.fce'
5) Open in Blender



(https://i.imgur.com/pg5X9MU.png)
https://imgur.com/a/smkkIvl
Thanks for having a look at it. I can't explain why it didn't work for the first time. But the second time it did. How it's supposed to use those python scripts? Is it just a cmd.exe prompt or there's something more to it?
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Mar 30, 2024, 8:07 AM
I've worked on easing the installation process on the Windows platform.

The Python module is now available in pre-built packages. That means it can be installed immediately in any vanilla Python 3.9 or later.

Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Apr 28, 2024, 11:53 AM
fcecodec 1.5 is now available. Get accompanying scripts at https://www.nfsaddons.com/downloads/nfshs/tools/7834/fcecodec-scripts-v15.html

Changes:
+    Python: easy installation via python -m pip install fcecodec on Win, Linux, and macOS
+    Python: native print in Google Colab

Requires Python 3.10 or later:
python -m pip install fcecodec

Homepage: https://github.com/bfut/fcecodec
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on May 01, 2024, 3:36 AM
fcecodec python scripts and the powerful bfut_FceConverter.ipynb are now packaged together with fshtool for an easy setup. Just unzip and you're set.

Download from:
https://github.com/bfut/fcecodec/releases/download/1.5/fcecodec15_scripts.zip
https://www.nfsaddons.com/downloads/nfshs/tools/7834/fcecodec-scripts-v15.html
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on May 12, 2024, 2:46 PM
Blender importer and exporter Add-on: https://github.com/bfut/fcecodec_blender
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on May 18, 2024, 7:07 AM
The Blender Add-on is close to completion and will be released alongside a new fcecodec version.

Attachments show Blender's import and export dialogs.
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on May 18, 2024, 8:22 AM
Quote from: bfut on May 18, 2024,  7:07 AM
The Blender Add-on is close to completion and will be released alongside a new fcecodec version.

Attachments show Blender's import and export dialogs.
This is insane. So it's never been possible to edit a model in Blender and convert it to FCE format?
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on May 18, 2024, 9:35 AM
Quote from: pete9516 on May 18, 2024,  8:22 AM
Quote from: bfut on May 18, 2024,  7:07 AM
The Blender Add-on is close to completion and will be released alongside a new fcecodec version.

Attachments show Blender's import and export dialogs.
This is insane. So it's never been possible to edit a model in Blender and convert it to FCE format?
To the best of my knowledge, not directly. It's been requested, though, including in this forum.  :)
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on May 19, 2024, 1:58 AM
fcecodec 1.6 is now available.

Get accompanying Blender FCE Import/Export Add-on: https://github.com/bfut/fcecodec_blender
Get accompanying scripts at https://github.com/bfut/fcecodec/releases/tag/1.6

Changes:
+    minor performance improvements
+    release all new Blender FCE Import/Export Add-on: Homepage (https://github.com/bfut/fcecodec_blender) Screenshots (https://www.nfsaddons.com/projects/nfshs/286/bfut-fce-importexport-blender-add-on.html)

Requires Python 3.10 or later:
python -m pip install fcecodec

Homepage: https://github.com/bfut/fcecodec
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Jun 05, 2024, 9:25 AM
fcecodec_blender 1.1 is now available

Description:
Blender (.fce) Import/Export Add-on for Need For Speed 3 & High Stakes car models

Changes:
+ improved performance

Download: https://github.com/bfut/fcecodec_blender/archive/refs/heads/main.zip
Homepage: https://github.com/bfut/fcecodec_blender
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: pete9516 on Jun 05, 2024, 2:25 PM
Quote from: bfut on Jun 05, 2024,  9:25 AM
fcecodec_blender 1.1 is now available

Description:
Blender (.fce) Import/Export Add-on for Need For Speed 3 & High Stakes car models

Changes:
+ improved performance

Download: https://github.com/bfut/fcecodec_blender/archive/refs/heads/main.zip
Homepage: https://github.com/bfut/fcecodec_blender
Nice!! Does it work for older Blender versions?
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Jun 07, 2024, 11:41 AM
fcecodec_blender 1.2 is now available

Supported Blender versions:
4.x and 3.6 LTS

Download: https://github.com/bfut/fcecodec_blender/archive/refs/heads/main.zip
Homepage: https://github.com/bfut/fcecodec_blender


@pete: supports Blender 3.6 LTS and 4.x . I'll try to maintain 3.6 LTS compatibility, because 4.x drops support for certain ancient GPUs ca. 2010
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Jul 12, 2024, 4:51 PM
fcecodec_blender 2.0 is now available

Supported Blender versions:
4.x and 4.2 and 3.6 LTS

Changes:
+ batch import from VIV archive
+ VIV archive contents preview

Download: https://github.com/bfut/fcecodec_blender/archive/refs/heads/main.zip
Homepage: https://github.com/bfut/fcecodec_blender
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Jul 13, 2024, 4:46 AM
fcecodec_blender 3.1 is now available

Supported Blender versions:
4.x and 4.2 LTS and 3.6 LTS

Supported Need For Speed versions:
NFS3, NFS:HS, MCO

Changes:
+ finished (.viv) archive integration

Download: https://github.com/bfut/fcecodec_blender/archive/refs/heads/main.zip
Homepage: https://github.com/bfut/fcecodec_blender
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Aug 07, 2024, 1:55 PM
fcecodec_blender 3.3 is now available from https://github.com/bfut/fcecodec_blender/releases/tag/3.3

Supported Blender versions:
4.x and 4.2 LTS and 3.6 LTS

Supported Need For Speed versions:
NFS3, NFS:HS, MCO

Changes:
+ unvivtool integration on (.fce) export: overwrite FCE directly in (.viv) archive
Title: Re: fcecodec (FCE decoder/encoder - Python module)
Post by: bfut on Aug 08, 2024, 9:19 PM
fcecodec_blender 3.4 is now available from https://github.com/bfut/fcecodec_blender/releases/tag/3.4

cosmetic changes only.