harry icon indicating copy to clipboard operation
harry copied to clipboard

Scale issue

Open pathquester opened this issue 1 year ago • 3 comments

Trying with ./harry untitled.obj out.hry -l0 -q14 -l1 -q10

Then ./harry out.hry out.obj

Results in out.obj having a much larger scale. Tried this with a number of .obj models, happens with all.

pathquester avatar Feb 29 '24 01:02 pathquester

Thanks for posting this issue. Does that happen for ply too? obj --> hry --> ply? I guess without quantization, everything works fine?!

mvonbuelow avatar Feb 29 '24 15:02 mvonbuelow

@maxvonbuelow I was unable to import the ply in Blender, getting "failed importing, unknown error" Scale works fine without quantization although one mesh is two parts the right part is fine in terms of the topology but the left part is missing faces.

pathquester avatar Mar 01 '24 00:03 pathquester

Alrighty. Must likely something is wrong in https://github.com/maxvonbuelow/harry/blob/master/structs/quant.h

For quantization the mesh is transformed into the unit cube and scaled by pow(2, quant) - 1. The original coordinate system is stored in that mixing-struct. The whole must process must be reversed. So, one further question: Is the decomp obj file in blender in the unit cube?

Unluckily, I currently don't have enough time to debug the code. A possible temporary fix is to do the rescaling as pre/post-processing yourself.

mvonbuelow avatar Mar 01 '24 10:03 mvonbuelow