DarkStarSword / 3d-fixes

Stereoscopic 3D fixes using Helix mod & 3DMigoto
105 stars 126 forks source link

I installed the plugin and still get this huge error when importing #16

Closed CerezaKitty closed 12 months ago

CerezaKitty commented 1 year ago

Done everything like on your youtube video but when I import I get an error

Python: Traceback (most recent call last): File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 1422, in execute import_3dmigoto(self, context, paths, keywords) File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 952, in import_3dmigoto obj.append(import_3dmigoto_vb_ib(operator, context, [p], kwargs)) File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 993, in import_3dmigoto_vb_ib import_vertex_groups(mesh, obj, blend_indices, blend_weights) File "C:\Users\NAME\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blender_3dmigoto.py", line 731, in import_vertex_groups assert(len(blend_indices) == len(blend_weights)) AssertionError

DarkStarSword commented 1 year ago

Please provide a sample of the files you are trying to import

CerezaKitty commented 12 months ago

Uh so I think I know why but then I do'nt know how to change the model I wanted

So basically the thing I selected It's mostly all chracters and a lot of other stuff I wanted to take off the Knife and Arrows on Remnant and maybe even get rid of the hair but it seems I can't do it because it selected every single character?

I can't give you a sample anymore cause I deleted the files but hope the thing above helps

CerezaKitty commented 12 months ago

See the arrows are selected but it also selects the underwear and every weapon on my hand and when I look into others chracters image

ANd when you look into other characters It selects their stuff too image

DarkStarSword commented 12 months ago

I don't own the game, so can't check those myself. If you grab a new frame analysis dump send me some samples of objects that are triggering that assert.

It's an odd error, because it doesn't make much sense for the number of blend indices and blend weights to differ - those two values should always come in pairs since they literally say things like "vertex 123 has blend index 5 weighted at 0.3, blend index 8 weighted at 0.5, and blend index 14 weighted at 0.2" - it doesn't make sense to specify an index without a weight or a weight without an index, so there should always be the same number of each.

Maybe the game is doing something unusual like all vertices have all the weights listed in order so the indices are implied... but I'd need to see an example from the frame analysis dump to confirm that hypothesis. It is more likely that either the script has failed to parse something in the dump, or that the game is simply lying about what semantics are what in the vertex buffer input layout so the script gets confused (e.g perhaps the game has used a second BLENDINDICES for some custom data that is not a blend index - this can generally be worked around by editing the text files and changing them to something without an intrinsic meaning to Blender, TEXCOORD being the a fairly common choice for custom data), or that some of those values are being passed to the shader by other means (Unreal Engine is notorious for this, it often passes semantics in structured buffers bound to texture slots instead of vertex buffers where they would usually be located).

CerezaKitty commented 12 months ago

Here, Take a look FrameAnalysis-2023-09-10-103207.zip

DarkStarSword commented 12 months ago

Hmm, there aren't any vertex or index buffers in that dump - what exactly did you try to import with the plugin?

You need to configure frame analysis to dump those buffers used with the shaders of interest - for example, to enable dumping buffers for the shader in your screenshots you would add this to the d3dx.ini:

[ShaderOverrideDumpBuffers]
hash = 91ea5a0a0fc326fa
analyse_options = dump_vb txt

I usually turn on a few extra options as well - share_dupes is useful to reduce disk usage and time spent dumping with multiple frame dumps, and buf tells it to also dump the raw binary buffers in case I might need them for some reason (usually not, the plugin prefers to import from txt files, but you never know). dump_ib is usually implied by dump_vb+txt, but I'll often explicitly turn it on anyway: analyse_options = share_dupes dump_vb dump_ib txt buf