Git Product home page Git Product logo

fast64's Introduction

Fast64

This requires Blender 3.2+. Blender 4.0+ is recommended.

Forked from kurethedead/fast64 on BitBucket.

alt-text

This is a Blender plugin that allows one to export F3D display lists. It also has the ability to export assets for Super Mario 64 and Ocarina of Time decompilation projects. It supports custom color combiners / geometry modes / etc. It is also possible to use exported C code in homebrew applications.

Make sure to save often, as this plugin is prone to crashing when creating materials / undoing material creation. This is a Blender issue.

https://developer.blender.org/T70574

alt-text

Credits

Thanks to anonymous_moose, Cheezepin, Rovert, and especially InTheBeef for testing. Thanks to InTheBeef for LowPolySkinnedMario.

Discord Server

We have a Discord server for support as well as development here.

Links to Docs / Guides for Each Game

  1. Super Mario 64
  2. Ocarina Of Time

Installation

Download the repository as a zip file. In Blender, go to Edit -> Preferences -> Add-Ons and click the "Install" button to install the plugin from the zip file. Find the Fast64 addon in the addon list and enable it. If it does not show up, go to Edit -> Preferences -> Save&Load and make sure 'Auto Run Python Scripts' is enabled.

Tool Locations

The tools can be found in the properties sidebar under the 'Fast64' tab (toggled by pressing N). The F3D material inspector can be found in the properties editor under the material tab.

F3D Materials

Any exported mesh must use an F3D Material, which can be added by the 'Create F3D Material' button in the material inspector window. You CANNOT use regular blender materials. If you have a model with Principled BSDF materials, you can use the Principled BSDF to F3D conversion operator to automatically convert them. The image in the "Base Color" slot will be set as texture 0, while the image in the "Subsurface Color" slot will be set as texture 1.

Vertex Colors

To use vertex colors, select a vertex colored texture preset and add two vertex color layers to your mesh named 'Col' and 'Alpha'. The alpha layer will use the greyscale value of the vertex color to determine alpha.

Large Texture Mode

In F3D material properties, you can enable "Large Texture Mode". This will let you use textures up to 1024x1024 as long as each triangle in the mesh has UVs that can fit within a single tile load. Fast64 will categorize triangles into shared tile loads and load the portion of the texture when necessary.

Decomp vs Homebrew Compatibility

There may occur cases where code is formatted differently based on the code use case. In the tools panel under the Fast64 File Settings subheader, you can toggle homebrew compatibility.

Converting To F3D v5 Materials

A new optimized shader graph was introduced to decrease processing times for material creation and exporting. If you have a project that still uses old materials, you may want to convert them to v5. To convert an old project, click the "Recreate F3D Materials As V5" operator near the top of the Fast64 tab in 3D view. This may take a while depending on the number of materials in the project. Then go to the outliner, change the display mode to "Orphan Data" (broken heart icon), then click "Purge" in the top right corner. Purge multiple times until all of the old node groups are gone.

F3DEX3 Features

Fast64 supports exporting data for F3DEX3, a modded microcode which brings many new features and higher performance. Preview of these new features in the 3D view is not currently supported, but they will be exported correctly. To modify the vertex colors of an object with a material which is using packed normals (shading/lighting and vertex colors together), temporarily switch to a vertex colored preset or uncheck Lighting in the material geometry mode settings. Once the vertex colors are painted how you want them, re-enable Lighting and Packed Normals.

Selecting F3DEX3 as your microcode unlocks a large number of additional presets based on F3DEX3 features. For more information on all these features, see the F3DEX3 readme, GBI, and these videos. The preset names get very long and are abbreviated as follows:

  • Shaded: Computes lighting, which normally affects shade color.
  • Vcol: Vertex colors are enabled in addition to lighting; normally these are multiplied together to become shade color.
  • Ao: Ambient occlusion.
  • Cel: Cel shading. If followed by a number, this is the number of cel levels.
  • Ltcol: Cel shading tints are loaded from light colors.
  • Blend vs. Mul for cel shading: Whether to apply the tint in the blender with linear interpolation, or by multiplication in the CC. The latter sometimes looks better, but does not support vertex colors.
  • Lerp vs. Mult for multitexture (water): Whether the two textures are combined by linear interpolation or multiplication.

For cel shading, it is recommended to start with one of the cel shading presets, then modify the settings under the Use Cel Shading panel. Hover over each UI control for additional information about how that setting works.

Updater

Fast64 features an updater (CGCookie/blender-addon-updater).

It can be found in the addon preferences:

How the updater in the addon preferences looks, right after addon install

Click the "Check now for fast64 update" button to check for updates.

Updater preferences after clicking the "check for updates" button

Click "Install main / old version" and choose "Main" if it isn't already selected:

Updater: install main

Click OK, there should be a message "Addon successfully installed" and prompting you to restart Blender:

Updater: successful install, must restart

Clicking the red button will close Blender. After restarting, fast64 will be up-to-date with the latest main revision.

Fast64 Development

If you'd like to develop in VSCode, follow this tutorial to get proper autocomplete. Skip the linter for now, we'll need to make sure the entire project gets linted before enabling autosave linting because the changes will be massive. https://b3d.interplanety.org/en/using-microsoft-visual-studio-code-as-external-ide-for-writing-blender-scripts-add-ons/

Formatting

We use Black, version 23.

To install it, run pip install 'black>=23,<24'.

To make VS Code use it, change the python.formatting.provider setting to "black".

To format the whole repo, run black . (or python3 -m black . depending on how it is installed) from the root of the repo.

The (minimal) configuration for Black is in /pyproject.toml.

There is a GitHub action set up to check that PRs and the main branch are formatted: /.github/workflows/black-lint.yml

If you see a message such as

Oh no! πŸ’₯ πŸ’” πŸ’₯ The required version `23` does not match the running version `24.1.0`!

Make sure the black --version is 23. Install a 23 version with pip install 'black>=23,<24'.

Updater notes

Be careful if testing the updater when using git, it may mess up the .git folder in some cases.

Also see the extensive documentation in the https://github.com/CGCookie/blender-addon-updater README.

The "Update directly to main" button uses bl_info["version"] as the current version, and versions parsed from git tags as other versions. This means that to create a new version, the bl_info version should be bumped and a corresponding tag should be created (for example "version": (1, 0, 2), and a v1.0.2 tag). This tag will then be available to update to, if it denotes a version that is more recent than the current version.

The "Install main / old version" button will install the latest revision from the main branch.

fast64's People

Contributors

aglab2 avatar axollyon avatar bitlytic avatar cdi-fails avatar coco875 avatar dragorn421 avatar hailtododongo avatar jesusyoshi54 avatar krm01 avatar kurethedead avatar lilaa3 avatar mr-wiseguy avatar reonu avatar sauraen avatar smb123w64gb avatar thecozies avatar yanis42 avatar yoshimilkman avatar zelllll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fast64's Issues

Fast64 in Blender 3.1.0+ - Material Display Issue

Hello so while bug #83 got fixed in Blender 3.1.0 it still seems to be sometimes randomly showing up for example when clicking on create Material it sometimes throw the error of #83 which seems to happen due to Fast64 for whateveer reason choosing instead of the Normal SM64 Shaded Solid to use a Custom Preset and it also has bugs with textures by for example rendering my 32x32 Texture in complete black even tho i assigned it already
image

SyntaxError: when installing

I get this error when doing the install for the fast64 plugin
i just did a fresh install of blender3.4.1 and new download of the plugin

Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 3.0\3.0\scripts\modules\addon_utils.py", line 351, in enable
mod = import(module_name)
File "C:\Users\robin\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main_init_.py", line 4, in
from .fast64_internal.operators import AddWaterBox
File "C:\Users\robin\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal_init_.py", line 1, in
from .f3d_material_converter import *
File "C:\Users\robin\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal\f3d_material_converter.py", line 5, in
from .f3d.f3d_material import *
File "C:\Users\robin\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal\f3d_init_.py", line 1, in
from .f3d_parser import *
File "C:\Users\robin\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal\f3d\f3d_parser.py", line 4, in
from .f3d_gbi import *
File "C:\Users\robin\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal\f3d\f3d_gbi.py", line 5, in
from ..utility import *
File "C:\Users\robin\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal\utility.py", line 1453
match context.scene.gameEditorMode:
^
SyntaxError: invalid syntax

Property versioning system is broken

OOT_ObjectProperties right now uses an IntProperty to hold its current version. However, in Blender, properties whose values haven't been changed from the defaults do not preserve their values when the default is changed. I haven't checked in depth, but I think SM64 also has this issue. For data added through operators this isn't an issue as the version can be set on creation (ex. F3D material creation), but if a user creates empties without using Fast64 operators, then the version will not be preserved on future updates.

Too many connecting vertices in skinned triangles

Too many connecting vertices in skinned triangles for bone '000-offset.001'. Max is 14 on parent bone, currently at 21. Note that a vertex with different UVs/normals/materials in connected faces will count more than once. Try keeping UVs contiguous, and avoid using split normals.
Wonder96

im making a mod called Wonder96 dynos pack for mario 64 but I get this issue everytime I export

Add the option to import materials in order

Due to my computer being weak, I can't load the materials tab (or view materials) or it crashes. I would like to be able to have the materials in collision export in order like iProgramInCpp's EasyExporter:

// Material.006 Material...
COL_TRI_INIT(SURFACE_DEFAULT, 3),
COL_TRI(7,3,1),
COL_TRI(173,169,167),
COL_TRI(189,185,183),
// Material.007 Material...
COL_TRI_INIT(SURFACE_DEFAULT, 2),
COL_TRI(50,54,52),
COL_TRI(55,51,49),
// Material.008 Material...
COL_TRI_INIT(SURFACE_DEFAULT, 4),
COL_TRI(48,49,51),
COL_TRI(50,51,55),
COL_TRI(54,55,53),
COL_TRI(52,53,49),
// Material.009 Material...

It would be useful for editing manually since I'm kinda used to it at this point, and it'd prevent me from having to rely on other tools or ask others to help with it.

Fast64 Issue when Exporting GeoLayout in Binary Mode

Hello so i have an issue when exporting the LowPolySkinnedMario.blend to a Binary Rom the weird thing is that it gives an error even tho exporting the armature work without any issue idk if this a part of my end or a bug in the tool :(

  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_writer.py", line 2239, in execute
    addrRange, segPointer = exportGeolayoutObjectBinary(
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_writer.py", line 595, in exportGeolayoutObjectBinary
    return saveGeolayoutBinary(romfile, geolayoutGraph, fModel, exportRange,
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_writer.py", line 612, in saveGeolayoutBinary
    geolayoutGraph.save_binary(romfile, levelData)
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_classes.py", line 130, in save_binary
    geolayout.save_binary(romfile, segmentData)
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_classes.py", line 191, in save_binary
    romfile.write(self.to_binary(segmentData))
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_classes.py", line 185, in to_binary
    data += node.to_binary(segmentData)
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_classes.py", line 310, in to_binary
    data.extend(child.to_binary(segmentData))
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_classes.py", line 300, in to_binary
    data = self.node.to_binary(segmentData)
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/sm64/sm64_geolayout_classes.py", line 762, in to_binary
    command.extend(encodeSegmentedAddr(start_address, segmentData))
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/utility.py", line 1043, in encodeSegmentedAddr
    segment = getSegment(address, segmentData)
  File "/home/daria/.config/blender/3.0/scripts/addons/fast64-main/fast64_internal/utility.py", line 1054, in getSegment
    raise PluginError("Address " + hex(address) + \
TypeError: 'str' object cannot be interpreted as an integer```

"Size too big: Data ends at 0x1e51e0, which is larger than the specified range."

So, I was trying to remove all of the Toad model's polygons so that it wouldn't appear in-game. I wanted the ROM to be compatible with other Super Mario 64 tools, so I set the Import/Export options to Binary. I was able to successfully import and edit the model, but once I go to export it, it gives me this error:
"Size too big: Data ends at 0x1e51e0, which is larger than the specified range."
What does this mean, and how do I fix it?

Getting start (and end) addresses of a GeoLayout for binary export

I know binary exporting is an abandoned thing but it's pretty useful to me
I've been trying to find the koopa's (with a shell) geolayout's start (and end) address for binary exporting.
I've got the model object and the level script address but I;ve been trying to get the start addresses but it just says the address is not provided in any of the segments.

Is there a way how to do this?

[OoT] Unfriendly error when exporting a room without geometry

How to reproduce:

  • new blender file
  • click "Add Scene" tool
  • delete the plane mesh object (or unparent it from the room empty)
  • export the scene

-> undescriptive error happens

instead fast64 should either print a legible error, or allow exporting rooms without any geometry attached

Fast64 Material Creation Issue

image

Hello so this happened fairly recently aka an hour ago :P basically i clicked like i normally would on the create F3D Material and all i got was this error tho while i can still use blender the texture is all black :( its a 12x812 texture tho i even large texture mode doesnt make help it :( oh btw im on blender 3.1.0 so that may be the issue >.>

EDIT: im also getting an bpy_prob_collection[index]: index 0 out of range, size 0

which also happens with 32x32 Textures now :(

gc-eu-mq-dbg seems to be an additonal directory that is breaking the decomp build

It seems the decomp file now has a directory within the build folder called gc-eu-mq-dbg
This seems to be breaking fast64's exports. I think this needs to be updated, I am very new to this and
am not sure if I am correct here, but after I export a scene I need to copy the contents of gc-eu-mq-dbg into
build (along side gc-eu-mq-dbg), and everything builds again.

If I am on the correct track, Let me know and I would love to try to fix this :)

Error on exporting insertable binary.

Traceback (most recent call last):
File "C:\Users\teste\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\fast64\fast64_internal\sm64\sm64_geolayout_writer.py", line 3084, in execute
exportGeolayoutArmatureInsertableBinary(
File "C:\Users\teste\AppData\Roaming\Blender Foundation\Blender\3.2\scripts\addons\fast64\fast64_internal\sm64\sm64_geolayout_writer.py", line 805, in exportGeolayoutArmatureInsertableBinary
saveGeolayoutInsertableBinary(geolayoutGraph, fModel, filepath, f3dType)
NameError: name 'f3dType' is not defined

Issues with Exporting "LowPolySkinnedMarioV5".blend into SM64

okay so this is a thing that has been happening for a lot of months now that i have been struggling at getting to fix myself mainly due to my misunderstanding of certain N64 aspects anyways so basically what happens is trying to export the Mario Model inside the "LowPolySkinnedMario_V5.blend" File to any Super Mario 64 Repo so far i tried with sm64, ultrams64 and HackerSM64 with all of these causing issues with Mario being displayed as almost white?
So far from what i looked it seems nothing was noted regarding this anywhere in the README which is kinda bad as the Blend file is literally packed with every Single Fast64 Release

image

Weird Geolayout Bug with exported SM64 Levels in Blender 3.0 LTS using the latest Version

Hello so the title explain the main issue so here is my Level
image
This Level ofc now work inside the Game itself but it required me to flip all my Faces
image
as you can see its impossible to work and edit this Model

This is for example how it normally looks when using the Face Oration where i can actually see Stuff inside Blender and which the Level was built with and what happens ingame
image
image

Consider Collections when using Export Hidden Geometry option

They are currently not. So hiding a collection will cause everything in it to not get included with the export.

original report from discord:

Blender Version: 3.0.1
Game: OoT
Reproduction steps: Make a scene and hide the collection it's in and try to export it. receive errors 
Issue: Is there a way to have Fast64 still include things in exports if they are not visible in the viewport?
I am working on a gigantic scene now and keep most of my collections hidden as I complete work on them.
but ofc every time I want to export I need to unhide everything, export, re-hide. I have the
"export hidden geometry" option turned on.

'Material' has no attribute 'rdp_settings'

Happens fer most .blend files that come with Fast64, specifically the Mario .blend, and the two Skinned Mario .blends, and also .blends that used the older 1.0 version. Ya export the armature geolayout and this happens.

image

Question: Ship of Harkinian support?

Now that Ship of Harkinian has mod support, is there a chance of SoH being supported in Fast64? I'm aware of the SoH-specific branch, however it hasn't been updated in some time and breaks some features such as masks and boots.

OoT/MM scene importing support

  • Parse header and create a scene empty with all the same properties
  • Support alternate headers on import when creating the empty
  • Reuse the code for not duplicating materials that is used in skelanime
  • Make sure displaylists are imported on the correct draw layer
  • When importing displaylists, disable collision on them
  • Create a separate object for collision and disable rendering on it, and just make a different material for each polygon type

Blender 3 issues with enabling plugin

For some reason, Blender 3.0 always throws the following dialog when I try to enable Fast64.

image

The following appears in the console as well:

Python: Traceback (most recent call last):
  File "C:\Users\cratt\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal\f3d\f3d_material.py", line 1025, in draw
    elif not(material.use_nodes and material.is_f3d):
AttributeError: 'Material' object has no attribute 'is_f3d'

location: <unknown location>:-1
Exception in module register(): C:\Users\cratt\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\__init__.py
Traceback (most recent call last):
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\3.0\scripts\modules\addon_utils.py", line 387, in enable
    mod.register()
  File "C:\Users\cratt\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\__init__.py", line 324, in register
    mat_register()
  File "C:\Users\cratt\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\fast64-main\fast64_internal\f3d\f3d_material.py", line 3179, in mat_register
    return os.path.join(presetPath, filename) + ".py"
ValueError: register_class(...): already registered as a subclass 'F3DNodeA'

[OoT] Object list max length

The max length can be changed in code so #172 turned the export error into a UI warning to make fast64 "compatible" with such changes

It may be a good idea to allow some of

  • disable the UI warning
  • change the max length
  • take into account other factors to compute the max length (like a subkeep object being used or not)

sm64 expanded rom not working when exporting mario

when i try to export my custom mario model it gives me this error:
Size too big: Data ends at 0x122c600, which is larger than the specified range.

and when i put a normal rom with 8 mb it says it's very small but when i expand the rom it dosen't work and it gives me that error

pls help
marioo

ImportError?

Found out that on the recent fast64 builds don't boot due to an import error because in the utility.py it has the name? indent

.blend file crashes Blender when opening it.

Saving a blend file with Fast64 materials and re-opening it just crashes outright a fresh install of Blender 3.3.5 .

After some analysing, the issue seems to come from the Fast3D Library .blend file trying to load at boot.
It works the first time on an empty file, but the second time the loading path gets messed up and Blender crashes.

For example, it tries loading the library .blend file from C:\Users\Melon\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\fast64-main\fast64_internal\f3d\f3d_material_library.blend even though I installed the plugin locally in a folder on my desktop in my portable Blender install. It's also trying to load from the wrong version of Blender. (4.0 as opposed to 3.3.5)

PS: Modifying the plugin so it doesn't load the Library .blend file allows the file to load properly. But materials will be missing.

Format the repo

As suggested by #73, let's use black.

This is ongoing WIP, as PRs touch files

Initial preset on material creation is "Custom"

Using OoT here, probably same for others
Blender 4.0.2 (which is most likely unrelated)

When creating a material, the preset shown is "Custom" instead of "OoT Shaded Solid", which was the value up until now

Fresh blend, fresh object and just freshly created material:

image

Though the preset shown is "Custom" it does seem the material is set up like "OoT Shaded Solid"

Bug introduced by #201 based on intuition and then testing before/after:

$ git checkout 3d6f73097482b9db460f4cb7737d7624a7bf6362^
HEAD is now at 4f621f4 Fixed large uv wrapping (#249)
# -> new materials are "OoT Shaded Solid"

$ git checkout 3d6f73097482b9db460f4cb7737d7624a7bf6362
HEAD is now at 3d6f730 Merge pull request #271 from sauraen/ShowFogFix
# -> new materials are "Custom"

Fast64 renderer frontface culling implementation or warning

Fast64 currently will not emulate frontface culling, I suggest using the backface culling value from the geometry node to clip the geometry (with alpha clip or something similar).
I am available to do testing on low end hardware if needed.
If this ends up not being viable, a warning would be sufficient.

Groups of the bad vert that don't correspond to a bone: ['000-displaylist']

All vertices must be part of a vertex group, be non-trivially weighted (> 0.4), and the vertex group must correspond to a bone in the armature.
Groups of the bad vert that don't correspond to a bone: ['000-displaylist']. If a vert is supposed to belong to this group then either a bone is missing or you have the wrong group.
Groups of the bad vert below weight limit: []. If a vert is supposed to belong to one of these groups then make sure to increase its weight.
I don't know what I am doing wrong I did everting correctly

[OoT] Importing Player animations causes an error

To reproduce try to import a player anim, gPlayerAnim_link_fighter_upper_pierce_kiru_end works for this error, I searched a bit it and looks like negative numbers is the issue? I'm not sure how it is supposed to work though, hence this issue

The error is inside getFrameData (oot_anim.py) in the frameData list when it tries to convert the str to an int, when it's a negative number (like "-0x00A2") it's reading "x0" for the first int value inside from_bytes

Traceback of the error
Traceback (most recent call last):
  File "C:\Users\Yanis\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\fast64\fast64_internal\oot\animation\operators.py", line 172, in execute
    ootImportAnimationC(armatureObj, settings, actorScale)
  File "C:\Users\Yanis\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\fast64\fast64_internal\oot\animation\operators.py", line 97, in ootImportAnimationC
    ootImportLinkAnimationC(
  File "C:\Users\Yanis\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\fast64\fast64_internal\oot\oot_anim.py", line 528, in ootImportLinkAnimationC
    frameData = getFrameData(animFilepath, animData, frameDataName)
  File "C:\Users\Yanis\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\fast64\fast64_internal\oot\oot_anim.py", line 634, in getFrameData
    frameData = [
  File "C:\Users\Yanis\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\fast64\fast64_internal\oot\oot_anim.py", line 635, in <listcomp>
    int.from_bytes([int(value.strip()[2:4], 16), int(value.strip()[4:6], 16)], "big", signed=True)
ValueError: invalid literal for int() with base 16: 'x0'

Commented out stuff can be imported

Confirmed for at least scene importing, by ZeeRoX
I assume this bug generalizes to most (all?) imports

Even if data is commented out in a .c, it can still be imported by fast64.

I think this is kind of expected behavior from a code perspective since C parsing is entirely regex-based afaik,
but it's confusing from a user perspective

An easy solution may be to strip comments from source before parsing (note: some stuff relies on comments for parsing, like the sm64 "keep block" thing I forgot the name of, maybe other stuff)

Binary Exporting outputs an unplayable ROM of Super Mario 64

Upon exporting a modified version of Mario's model to a new ROM of Super Mario 64, I learned quickly that I couldn't get into the game's intro cutscene. All sound works as intended, the code just seemingly freezes up when it has to load Mario's model. I could confirm the sound part by waiting until one of the demos played, and it was just a white screen with the title music playing. The game doesn't respond to my inputs after this. I got curious and tested it with just the default mario.blend file, and it still froze. I've confirmed that both the original and extended ROMs work just fine, so it must be a problem with the plugin. If needed, I can disclose where I got my ROM privately. I'm not a Python expert, so I can't describe exactly what's wrong, but if I had to guess, it has something to do with the export code. I have yet to try C exporting. I've followed the tutorial videos to a T, if that helps.
Extra info:

  • Windows 10 Pro 21H2
  • Blender v3.2.0
  • Fast64 v2.0.0
  • ROM Region/Version: USA v1.0

I Cant make a fast3d material. (python error and crash)

Basically, when i click the create new material button in f3d, it just gives an error and sometimes crashes, I'm on version 3.6 of blender, I don't know if I should have an older one or something like that, here's the error that appears.

Captura de pantalla 2023-12-14 104118

Fix importing bug

Currently displaylists can't be imported in oot because fast64 does not support included .vtx.inc files. This should be fixed to be handled the same way as importing textures which are #include'd as well.

Unify game modes as much as possible

Currently with the way that fast64 is structured, the code for each game mode (currently just oot and sm64) is mostly completely independent of each other. Ideally the user interface would be restructured in such a way that merges the functionality of the two as much as possible, as well as the backend. This means making displaylist exporting etc be the same code between all games ideally. We can further discuss what changes might be good for the UI here as well.

"Cannot unpack non-iterable FImageKey object"

I was trying to remesh Mario's geolayout, and when I exported it, I got this message. It doesn't tell me any information on it, either, not the object in question, not the image file, nothing. I even tried changing all of the texture materials and files to RGBA16, and that didn't fix the issue. What could be causing this?

Fast64 Enable Issue

Hello so i finnaly decided to get the latest Version of Fast64 and while everything work great i am having an issue sadly with Enabling it may be its amn issue on my End as my Blender Version is 3.0.1 and idk if yall support it yet but it kinda is stopping from working on my stuff :(

image

Z64 collision normals are calculated incorrectly

In Z64, the components of the normal are stored as a value ranging between -32767 to 32767, representing the value range -1.0 to 1.0. This is NOT the same as the range of values that can possibly stored in a short (-32768 to 32767).

Fast64 incorrectly multiplies the normal by 2^15, which is 32768 and clamps it to the range of a short here:

return min(max(round(value * 2**15), -2**15), 2**15 - 1)

I'm not sure if this is related in any way to the dynapoly bug since normals should be recomputed anyway.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.