Open max-zilla opened 1 year ago
was able to work around this by modifying pack/wad/mesh/export_gltf.go
around line 114:
if colorAccessors != nil {
for iLayer := 0; iLayer<object.LayersCount; iLayer++ {
if iLayer < len(colorAccessors) {
attributes[fmt.Sprintf("COLOR_%d", iLayer)] = colorAccessors[iLayer]
} else {
colors := make([][4]uint8, verticesCount)
for iVertex := range object.Vertices {
colors[iVertex] = [4]uint8{95, 95, 103, 255}
}
attributes[fmt.Sprintf("COLOR_%d", iLayer)] = modeler.WriteColor(doc, colors)
}
}
}
It seems to fail when trying to set COLOR_ attribute when iLayer exceeds length of colorAccessors (something missing vertex data?) so here i replace missing vertex color with the default grey color that seems used in many maps. kind of a hack fix so not making a PR for now
was able to work around this by modifying
pack/wad/mesh/export_gltf.go
around line 114:if colorAccessors != nil { for iLayer := 0; iLayer<object.LayersCount; iLayer++ { if iLayer < len(colorAccessors) { attributes[fmt.Sprintf("COLOR_%d", iLayer)] = colorAccessors[iLayer] } else { colors := make([][4]uint8, verticesCount) for iVertex := range object.Vertices { colors[iVertex] = [4]uint8{95, 95, 103, 255} } attributes[fmt.Sprintf("COLOR_%d", iLayer)] = modeler.WriteColor(doc, colors) } } }
It seems to fail when trying to set COLOR_ attribute when iLayer exceeds length of colorAccessors (something missing vertex data?) so here i replace missing vertex color with the default grey color that seems used in many maps. kind of a hack fix so not making a PR for now
where is it located?
I have been going through the GOW1 stages exporting them so I can use them in blender to make maps, amazing tool. However, two WADs in particular are throwing errors on export. Here is the log output for loading the level (viewing works fine in the browser) and exporting:
ATHN02A
(Athens docks)The other error occurred was
PAND00C
(Pandora rings):...there may be others, but so far (through that much of the list) everything else has worked. I did notice that when ATHN02A said
Cannot find handler for tag 0378 (WAD_Athn02A)
, there is indeed no 0378 entry on the list for that WAD.