Hello to everyone, and especially to Ford Prefect and company for helping me reach first base with .cvr editing.
In my case, first base was being able to cobble together bits of several .cvr files together with a hex editor to produce a reasonable looking tracked vehicle for infantry to use rather than just walking around in metal overcoats (lolwut).
Here's a first version. To describe the process, basically I just added the looted x04040000 (CVRCHUNK_OBJECT_CONTAINER) chunks to the end of an existing file, updated the sizes for the x04000000 (CVRCHUNK_SCENE_CONTAINER) and x00 "CVR" (CVRCHUNK_FILE_CONTAINER) chunks, and then messed around a bit with the scaling and randomly assaulted the positioning coordinates to get it to fit. Kinda working in the dark, and not really knowing what I'm doing, but I got a result I like.
I had to also replace infantry reactors and armors, but those were pretty straight copies of the existing ones.
I'd like to learn more about how the positioning data works so I can create a version where the tracked vehicle matches up with the gun and special ability bits (like the other vehicles do), right now it's off to the side. But at least it's less awful than it looked at first.
3d Voxel Data SectionSo basically, after assembling the kitbash as directed above, if you need to adjust any positions, then make sure to adjust the Position SVECTOR3 in each the JUMP_HEADER of each individual mesh, while also adjusting the Rotation Center of the entire object. You should also increase the SVECTOR3 Scale dimensions, to ensure that the object is still fully rendered rather than any meshes being considered too far away (this is different from the scalar ratio of pixels to voxels, though of course you can adjust that too, as I did to make the tracks a little more sleek). If you have a single mesh object, then you have to kitbash it to a multi mesh object with JUMP_HEADERs, and only adjust the Rotation Center of the single mesh object.
01 02 04 04 ## ## ## ## CVR_VOXEL_OBJECT
+04 uint32 VHFlags:
1 = mesh has its own VHFlags
2 = Multiple mesh object with JUMP_HEADER before each mesh
4 = Unused
8 = Used but unknown what it means
+04 uint32 Size of voxel object from start of first VOXEL_HEADER
+04 float32 Units per 3D pixel (scale)
+04 uint32 bytes from this VOXEL_HEADER to end of mesh
+04 uint32 bytes to last byte of this voxel mesh
+04 SVECTOR3 Scale
+06 SVECTOR3 Position
+06 SVECTOR3 Rotation Center
+06 uint32 total voxels in this object
JUMP_HEADER
+06 SVECTOR3 Position
+06 SVECTOR3 v2--unknown vector, used determining max size
+06 SVECTOR3 v3--unknown vector, used determining max size
+06 SVECTOR3 PositionOffset--start drawing at Position+PositionOffset
+06 uint32 # of voxels in next mesh
+04 uint32 JumpFlags: 1 = Has Offset
if JumpFlags then +04 uint32 Offset to next JUMP_HEADER.