mholeys / roadtrip-choroq-tools

RoadTrip Adventure / ChoroQ 2 HG model/texture extractor
2 stars 0 forks source link

Texture reference #5

Open mholeys opened 1 month ago

mholeys commented 1 month ago

All meshes are missing texture information.

Currently all meshes in the courses/fields/actions and cars all have textures extracted, but without a reference that links the texture to the mesh. Meshes can be exported as groups that match a shared value, I have assumed this shared part referenced as "data" in the code to be information related to the material of the mesh.

When these are exported, and grouped, it is clear to see that these all share the same texture, however the parts of this data are not understood, I expect at least part of the 16 bytes currently called texture references will be useful in mapping the textures.

Facepalm38 commented 1 month ago

I want to note, that while the grouping is wonderful, it does tend to group up some parts that are not meant to share textures (presumably at least)

It's usually small stuff, but on some stages it's bigger more noticable things.

mholeys commented 1 month ago

Ah that is useful to know, I have been grouping by only part of what I expect is texture/material. I had changed this recently to use more when grouping but I do not think this is pushed yet. This may fix this issue, as I have found variations which would match this issue.

mholeys commented 1 month ago

The texture/material grouping is now done using 8 bytes, compared to the previous version using just the first 4, this will (probably) create more groups of meshes. This should reduce the chances of meshes being grouped incorrectly, but it may not be perfect,. These new bytes seem to control how the texture is used, not which texture, but this is a guess.

Facepalm38 commented 1 month ago

I shouldn't need to reassemble the entire world map, just the newly separate bits right?

Facepalm38 commented 1 month ago

Seems to export some pieces that share textures in more pieces. Most noticable with the ocean floor segments.

mholeys commented 1 month ago

You may have to redo the world sadly. You might be able to sort through bits manually but yes it is likely that redoing it might be faster.

Do you mean that there are more groups than before, and that they probably should share the same texture. If so I think this is to do with some textures being flipped, as I have seen in the caves on Desert Raceway. The top bits are different to the bottom half of the cave.

I think for now I will be leaving the meshes alone, unless you come across any issues with the changes. As most are useable in the current state.

Facepalm38 commented 1 month ago

It should be fine for now, it's better to have some pieces in multiple parts. What I mean is stuff like this cliffside for example get exported in multiple pieces. Same goes for the ocean floor as well.

It's not an issue, but it's strange it does this. image

Facepalm38 commented 1 month ago

Previously, the primary meshes that would be bundled together were usually the Q's Factory sign and letters/numbers like the ones on Quick-Pic shops and on the TOWER building in Sandpolis. Should be easy enough to re-import those specific parts