I’m working with huge 3D models and I need to write them to a file for later use. I have limited disc space, so I need to find a way to save space.
For each vertex in the model I’d like to somehow “combine” the X, Y and Z values (floats) and then be able to decipher them when loading the data.
The floats will only have a max of 3 digit precision (i.e. 3.456).
At first I had the idea of getting the average if the 3 floats, and then have another value that I can somehow extract the X and Y values from, which then I can get the Z value from the average. But after trying this I couldn’t get it to work properly.
My goal is to be able to somehow combine the 3 floats into one single integer, but I don’t think that’s feasible.
Does anyone have any ideas on how I can go about this?
Thanks! 😉
No. Pigeonhole principle.
Or in bits: 10.xyz, regardless of binary representation already takes at least 13 bits; 3*13 is 39 which can’t fit in 32 bits.