Closed kronpano closed 4 years ago
well, I got terrible result when I used babylonjs.
It might be lighting of renderer causes this problem.
I will have a look at the object data generated. If that is OK the problem lies somewhere else - true. I guess with all the data available it would even be possible to generate python scripts for Blender and other "exporters". Great work!!!! Will surely check out the progress you made next week. Thanks for all the hard work!!!!
Did a bit more investigation on this one and I am not sure it is only the renderer. Here is a screen shot like the one I posted first:
I "extended" the code a bit to export the translate-vector, scale-vector and rotation matrix from the object matrix to a csv file. This can be opened in Sverchok, a Blender add-on and then you can see the data modelled in Blender. Here is the screenshot of that:
The camera perspective is slightly different but you can see that the data really has that jump on the fourth plate from the bottom - not sure though why and where it comes from.
You might be right that this is a limitation of three.js In this issue on three.js https://github.com/mrdoob/three.js/issues/3845 they are talking about:
This means that when the matrix is applied to a vector, the rotation is applied first, and the scale is applied second. When the scale is non-uniform, a transform of this form cannot, in general, be decomposed into a scale followed by a pure rotation. What this means is that parents with non-uniform scale need to be avoided. It is OK if (childless) children have non-uniform scale.
I am not 100% that this is the problem but - after playing around a bit more - it looks like it could be.
This looks fixed now. @kronpano Check it out please.
18 * {ry 12 y -0.9 s 1.3 1 1}box
If the issue hasn't been fixed, please reopen issue.
Another regular structure 18 * {ry 12 y -0.9 s 1.3 1 1}box leads to this: there is this strange step after 14 steps.
Do the same with a smaller angle and it looks OK 18 * {ry 10 y -0.9 s 1.3 1 1}box
When the angle gets over 180 there is this jump??? Not really sure.