[F3D] Rewrite BSDF to F3D converter and add an F3D to BSDF converter#474
[F3D] Rewrite BSDF to F3D converter and add an F3D to BSDF converter#474Lilaa3 wants to merge 14 commits into
Conversation
Rewritten BSDF to F3D converter with support for picking up on which and how layers are used for merging them correctly in bad model imports, support for glTF2 styled color mul, picking up on uv gen, filtering, mapping, etc, if a material is lit, if a material is a cutout, transparent or opaque (even in 4.2) Brand new F3D to BSDF converter for outside fast64 context workflows where simple materials are desired. I mainly targeted glTF and obj compatible models. The new implementations should also make non sm64 people pretty happy aha! Code may need some clean up, I'll consider undrafting tomorrow morning but all the features and bugs should be review ready.. hopefully
|
mirror doesnt work i was wrong |
This reverts commit ef4fdce.
|
seems stable on supported blender versions. |
ariahiro64
left a comment
There was a problem hiding this comment.
doesnt support every feature but is way better of a situation
|
lost access to above account so cant rereview with good faith |
what features are missing when compared to obj and glTF (main export targets for this) |
|
I just merged main into this branch, hopefully correctly |
|
was using the force push 11 hours ago btw, and these 2 issues are very minor. |
|
Well I'm mostly focusing on gLTF and obj, I know glTF supports mirror, tho I'll have to check docs, but the tex gen? Yeah idk what to do with that |
should be a mapping coordinate that exposes scaling. i did that for my pc game during the transition. |
Co-Authored-By: Moisés Peláez <moises.jpelaez@gmail.com>
Dragorn421
left a comment
There was a problem hiding this comment.
issue 1
is it intended that the "backup" also uses bsdf materials after converting from f3d to bsdf, instead of the original f3d materials

issue 2
I get the following error when converting from bsdf to f3d, after initially converting from f3d to bsdf:
Converting BSDF materials in gBoulderFragmentsDL_mesh.001
Converting BSDF material f3dlite_material.001_bsdf
Traceback (most recent call last):
File "/home/dragorn421/.config/blender/4.2/scripts/addons/fast64/fast64_internal/operators.py", line 72, in execute
self.execute_operator(context)
File "/home/dragorn421/.config/blender/4.2/scripts/addons/fast64/fast64_internal/f3d/bsdf_converter/operators.py", line 200, in execute_operator
raise exc
File "/home/dragorn421/.config/blender/4.2/scripts/addons/fast64/fast64_internal/f3d/bsdf_converter/operators.py", line 131, in execute_operator
converted_something |= obj_to_f3d(
^^^^^^^^^^^
File "/home/dragorn421/.config/blender/4.2/scripts/addons/fast64/fast64_internal/f3d/bsdf_converter/converter.py", line 428, in obj_to_f3d
col_layer = get_layer_and_convert(abstracted_mat.vertex_color)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dragorn421/.config/blender/4.2/scripts/addons/fast64/fast64_internal/f3d/bsdf_converter/converter.py", line 407, in get_layer_and_convert
return obj.data.vertex_colors[layer_name] # HACK: layer cannot be trusted
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'bpy_prop_collection[key]: key "Col" not found'
suggestion
automatically set bsdf shader "roughness" parameter to 1 so it doesn't look glossy/shiny by default
issue 3
more complicated test, kakariko village from oot
some grass floor is much darker than should be for some reason


Rewritten BSDF to F3D converter with support for picking up on which and how layers are used for merging them correctly in bad model imports, support for glTF2 styled color mul, picking up on uv gen, filtering, mapping, etc, if a material is lit, if a material is a cutout, transparent or opaque (even in 4.2) Brand new F3D to BSDF converter for outside fast64 context workflows where simple materials are desired. I mainly targeted glTF and obj compatible models. The new implementations should also make non sm64 people pretty happy aha! Code may need some clean up, I'll consider undrafting tomorrow morning but all the features and bugs should be review ready.. hopefully