Larcius / gta5-modding-utils

MIT License
13 stars 2 forks source link

Clustering is stuck on new version #1

Closed InfiniteQuestion closed 2 years ago

InfiniteQuestion commented 2 years ago

Hi. We talked over gta 5 mods, but my account was banned. You helped me make lods models for my extracted gta trees. I downloaded the new version and ran it but now its stuck on clustering. I cant go back to the old version as the LOD creator has stopped working for unknown reasons. But i have installed the new version and now its stuck for hours on clustering.

Larcius commented 2 years ago

hi there. last week i changed the while-loop condition: https://github.com/Larcius/gta5-modding-utils/commit/685c1e909ff4459738a897cf903427ee4cabe33a please double-check that you are really using that revision and still got that issue. if so could you please provide me with the console output and your ymaps that do not work (you can replace all entity names so that you don't have to actually sent me your work in case you feel uncomfortable with that).

Larcius commented 2 years ago

and if it helps you can explicitly state the number of clusters you want using the argument --numClusters=N

InfiniteQuestion commented 2 years ago

Mod.zip

I tried with all my files, and ive tried with only a few files. All my ytyp's are freshly extracted using openiv. Same with models. The ymaps have been ran through the sanitizer. I even did the install process over again in case you added something new. No go, ive ran this all night long and both the clustering and lod creator (skipped clustering in this test) just stay stuck on the screen.

It worked on last download, but when i ran the program on last download it ignored the project name and just used the first ymap it finds for the project name resulting in my project being called gtax0gtay0 instead of gta. Also my lods have since been broken from the slod2 file. The lods in this file are visable up close, and removing this file solves the problem. First version worked perfectly, but has since stopped making lod maps for unknown reasons, it is in its own locked dir so no changes could have been made. Ive been scratching my head at that one.

D:\Mod\Mod>cd /d D:\Mod\Mod\

D:\Mod\Mod>cmd /k "conda activate gta5-modding-utils"

(gta5-modding-utils) D:\Mod\Mod>python main.py --inputDir="D:\Mod\Mod\resources\ymap" --prefix="gta" --lodMap=on --lodModel=on --clustering=on --numClusters=10 running clustering... reading gty0gtx0.ymap.xml reading gty0gtx0b.ymap.xml reading gty0gtx1.ymap.xml performing clustering of 3 ymap files and in total 11389 entities calculating clustering of 10 clusters

Same thing happens for the lod creator. No preview map appeared.

InfiniteQuestion commented 2 years ago

Also tried reverting your changes you pointed out, didnt work.

InfiniteQuestion commented 2 years ago

Im trying older versions to see where the conflict occurred but so far the code is working but fails to create lod maps

D:\Mod\Mod>cd /d D:\Mod\Mod\

D:\Mod\Mod>cmd /k "conda activate gta5-modding-utils"

(gta5-modding-utils) D:\Mod\Mod>python main.py --inputDir="D:\Mod\Mod\resources\ymap" --prefix="gta" --lodMap=on --lodModel=on --clustering=on --numClusters=10 outputDir D:\Mod\Mod\resources\ymap\generated already exists. Are you sure you want to clear directory D:\Mod\Mod\resources\ymap\generated? WARNING: This irreversibly erases all files within that directory! Please enter yes or no: y running clustering... reading gty0gtx0.ymap.xml reading gty0gtx0b.ymap.xml reading gty0gtx1.ymap.xml performing clustering of 3 ymap files and in total 11389 entities calculating clustering of 10 clusters fixing map extents clustering DONE running lod model creator... lod model creator DONE running lod map creator... processing gta_1.ymap.xml processing gta_2.ymap.xml processing gta_3.ymap.xml processing gta_4.ymap.xml processing gta_5.ymap.xml processing gta_6.ymap.xml processing gta_7.ymap.xml processing gta_8.ymap.xml processing gta_9.ymap.xml processing gta_10.ymap.xml fixing map extents lod map creator DONE

(gta5-modding-utils) D:\Mod\Mod>python main.py --inputDir="D:\Mod\Mod\resources\ymap" --prefix="gta" --sanitizer=on outputDir D:\Mod\Mod\resources\ymap\generated already exists. Are you sure you want to clear directory D:\Mod\Mod\resources\ymap\generated? WARNING: This irreversibly erases all files within that directory! Please enter yes or no: yes running sanitizer... processing gty0gtx0.ymap.xml processing gty0gtx0b.ymap.xml processing gty0gtx1.ymap.xml sanitizer DONE

(gta5-modding-utils) D:\Mod\Mod>python main.py --inputDir="D:\Mod\Mod\resources\ymap" --prefix="gta" --lodMap=on --lodModel=on --clustering=on --numClusters=10 outputDir D:\Mod\Mod\resources\ymap\generated already exists. Are you sure you want to clear directory D:\Mod\Mod\resources\ymap\generated? WARNING: This irreversibly erases all files within that directory! Please enter yes or no: y running clustering... reading gty0gtx0.ymap.xml reading gty0gtx0b.ymap.xml reading gty0gtx1.ymap.xml performing clustering of 3 ymap files and in total 11389 entities calculating clustering of 10 clusters fixing map extents clustering DONE running lod model creator... lod model creator DONE running lod map creator... processing gta_1.ymap.xml processing gta_2.ymap.xml processing gta_3.ymap.xml processing gta_4.ymap.xml processing gta_5.ymap.xml processing gta_6.ymap.xml processing gta_7.ymap.xml processing gta_8.ymap.xml processing gta_9.ymap.xml processing gta_10.ymap.xml fixing map extents lod map creator DONE

(gta5-modding-utils) D:\Mod\Mod>

Larcius commented 2 years ago

i found what's causing that problem and will commit a fix in a a few minutes (half an hour or so)

InfiniteQuestion commented 2 years ago

ok Feb 6, 2022 - works perfect Feb 14, 2022 - file naming bug happens

InfiniteQuestion commented 2 years ago

Feb 19, 2022 - this is where the process gets stuck

Larcius commented 2 years ago

just pushed a fix. please see the commit message for more information. if you want to ensure that a specific prefix for the clustered maps is used then please use the argument --clusteringPrefix= however, i changed that logic so if no unique prefix can be determined the one given by --prefix is used as a fallback. in your case this is what you want:

python main.py --inputDir="D:\Mod\Mod\resources\ymap" --prefix="gta" --lodMap=on --lodModel=on --clustering=on --clusteringPrefix=gta

notes: i usually don't want the clustered maps to have what i state in --prefix so that's why i added the part with determining one from the given ymap names.

Larcius commented 2 years ago

and thank you very much for reporting that and providing a detailed bug report.

InfiniteQuestion commented 2 years ago

Thank you for this beautiful piece of software. I just tested new version, and everything is great again. Rerunning my files now. BTW that addition of the numbers on the preview map is a huge addition. Thank you. Will support you on patreon when i get a chance to (money is tight)