Fast-64 / fast64

Blender based editor for scenes, meshes, and more in first-party N64 games
GNU General Public License v3.0
309 stars 74 forks source link

Oot map importer segments are bugged (FOUND WORKAROUND) #252

Open ariahiro64 opened 1 year ago

ariahiro64 commented 1 year ago

Oot map importer enables segments 8 9 and A for all materials on import causing crashes without spending 30 minutes figuring out the correct settings by hand.

Yanis42 commented 1 year ago

can you be more specific? I never got a crash with the importer, ideally provide the errors in the console (but it can be annoying if it's crashing), are you importing a vanilla map when the issue occurs?

ariahiro64 commented 1 year ago

its when launching the map in game. fast64 doesnt error. it also is a vanilla map yes

ariahiro64 commented 1 year ago

update it seems to be assuming that everything on the draw config is used on all materials

as an example in spot00 8 and 9 are used exclusively for xlu on the water and A is only used on a specific window to light it at night

any other use case crashes in spot00

ariahiro64 commented 9 months ago

Work around

  1. Import your map and fix cutscene related names
  2. Uncheck EVERY segment in EVERY material
  3. Apply only sensible ones based on the draw config
Dragorn421 commented 9 months ago

here is a python script for

  1. Uncheck EVERY segment in EVERY material
import bpy
for mat in bpy.data.materials:
    for attr in (*(f"segment{n}" for n in "89ABCD"), "customCall0", "customCall1"):
        for propGroup in (mat.ootMaterial.opaque, mat.ootMaterial.transparent):
            setattr(propGroup, attr, False)
ariahiro64 commented 9 months ago

here is a python script for

  1. Uncheck EVERY segment in EVERY material
import bpy
for mat in bpy.data.materials:
    for attr in (*(f"segment{n}" for n in "89ABCD"), "customCall0", "customCall1"):
        for propGroup in (mat.ootMaterial.opaque, mat.ootMaterial.transparent):
            setattr(propGroup, attr, False)

that works