NFSAddons Forums

Main Menu

fcecodec (FCE decoder/encoder - Python module)

Started by bfut, Oct 29, 2021, 8:30 AM

bfut

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

bfut

Thread view count blew up for some reason. This program is actively maintained - if there's anything, just gimme feedback. :)

pete9516

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?

bfut

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

pete9516

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

bfut

#35
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://imgur.com/a/smkkIvl

pete9516

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://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?

bfut

#37
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.


bfut

#38
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



bfut

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.

pete9516

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?

bfut

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.  :)

bfut

#44
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 Screenshots

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

Homepage: https://github.com/bfut/fcecodec