gregja / zdogXperiments

experiments with zdog
MIT License
45 stars 7 forks source link

Mirrored .obj bug #2

Open zawilliams opened 2 years ago

zawilliams commented 2 years ago

Hey @gregja,

Cool project - I noticed objects are displaying mirrored instead of how they should be.

For example, I took the Mini Cooper from this page and removed the side mirror (why I used the mirror to demonstrate the object being mirrored, I don't know haha) on the left side of the car if you are sitting in it/right side if you are viewing it from the front and it looks like this:

Screen Shot 2022-02-18 at 5 01 50 PM

But, when importing that exported .obj from Blender into the .obj experiment (http://ledefrichoir.com/labo/zdogXperiments/sources/zdog_obj_v3.html), the object is mirrored. Note the missing mirror is now on the opposite side compared to viewing it in Blender:

Screen Shot 2022-02-18 at 5 08 43 PM

I was tinkering with the code but couldn't figure out if something is reading points in reverse or what was causing the mirroring to happen. Any ideas how this might be fixed? Would love to PR a fix, just wasn't finding where in the code this was happening.

gregja commented 2 years ago

Hi @zawilliams I never paid attention to this bug, thank you for reporting it to me. I don't have a lot of time for the moment, but I'm intrigued, and I’ll look if I can fix it. If I find the solution, I’ll push the fix. Thank's again :)