[OpenSCAD] Light source and default camera position different on command line

nop head nop.head at gmail.com
Tue Sep 18 03:27:46 EDT 2018


Unifying the camera modes has revealed another bug. This test now fails but
the actual image is correct in my opinion.

openscad-camtrans-viewall_camera-tests
Expected image Actual image



It tests the gimbal camera with viewall without auto center, something
that only can happen with the command line. The camera is translated a
long way from the object's center (which is on the origin), mainly in
the X direction and it is looking down the X axis, so most of of that
offset is not apparent.
The viewall logic is that the object should remain visible with any
camera rotation so it needs to view from quiet far away.
It doesn't work with the old code because it uses Camera::center,
which is not set in the gimbal camera unless auto centre is also set
(it always is in the GUI). I.e. that was the bug I fixed recently, but
it only fixed it when auto center is set.

I hacked the GUI to not set autocentre and you can see the distance is
appropriate when the camera is rotated so that the X translation is
visible.




On 17 September 2018 at 08:40, nop head <nop.head at gmail.com> wrote:

> Yes it is a bug. The gimbal camera was lit from above and the vector
> camera from below. I will submit a PR soon.
>
> On 17 September 2018 at 03:52, Jordan Brown <openscad at jordan.maileater.net
> > wrote:
>
>> On 9/15/2018 5:34 AM, nop head wrote:
>>
>> An unfortunate side effect of the GUI lighting position is that two faces
>> of cubes in a lot of tests are the same shade. It looks a lot less
>> contrasty.
>>
>>
>> Lit from below sure seems wrong.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180918/19bb97c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 58989 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180918/19bb97c0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 11017 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180918/19bb97c0/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 4309 bytes
Desc: not available
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180918/19bb97c0/attachment-0002.png>


More information about the Discuss mailing list