niacdoial / blemd

BMD importer for blender (BDL format also partially supported)
GNU General Public License v3.0
31 stars 12 forks source link

Feature request: assign scale on import menu #60

Open fuzai-neko opened 2 years ago

fuzai-neko commented 2 years ago

I notice when importing from a game like Twilight Princess that models come in at about 100x what seems logical (example: Link is over 170m tall instead of 1.7m). This is okay with characters, but I notice trying to import levels will become stuck on loading indefinitely, I'm thinking part of this could be this scale issue overloading blender as a program. I am not a coder at the slightest, so I am unsure how realistic this idea would be, or if this is exactly what is causing some levels to not import correctly, but I wished to contribute my thoughts.

Edit: After further testing, letting blender load the level will eventually work, however it will take 30+ minutes for one room at times. And the scale certainly seems to be contributing somewhat of an issue considering the lag blender produces before vs after scaling down.

ajd-262 commented 2 years ago

I have older versions of blemd and not seeing load times like you are getting.

niacdoial commented 2 years ago

I… am curious what room takes that long to import. Did you ans BleMD to not load any animations? (I'm not sure anymore, but if there are some animations next to the model, it might try to decompress them to see if they fit …before discarding them since they don't, since you are importing a room)

I don't see how the physical size could impact how fast it can load the file, though I guess the lag once the model is loaded makes somewhat sense.

As for why they appear at different scale, I think Blender and the Gamecube don't agree on what the "base unit of length" is. Maybe the GCN and its gamdevs use 1cm as the unit of space when blender uses 1m.

As for applying the scale while importing… I'll think about that., but there might be a lot of people who rely on the gamecube's base unit of length.

fuzai-neko commented 2 years ago

The rooms I was working with at the time were for the Sky Temple in Zelda Twilight Princess, though as I recall other rooms/areas took just as long to load. As for animations being asked to load or not, I'll have to check again regarding which settings were being used, I recall trying many different settings previously.

EDIT: Tested importing with "Do not import animations" and the loading times for me were still 20+ minutes for a single room.

With scale in mind as suggested, I understand people may rely on that base unit, though I do find the concept of being able to adjust that unit of scale a bit before import if possible nice to have. I get that this may not be necessary or popular of an idea, but I would be interested to see if such a thing would contribute to less loading times somehow.