Nightly 3D view missing "render smooth normals"?

I just installed the Sept 19 nightly version to test in a VM. I cannot find the option to “render smooth normals” in the new 3D viewer as in version 4.07. Thus large cylinders can get a pretty ugly appearance (rendered from VRML). Are there any tricks to get it back again?

Application: kicad
Version: (2017-09-19 revision dddaa7e69)-makepkg, release build
Libraries:
wxWidgets 3.0.3
libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.60.0
Curl: 7.54.1
Compiler: GCC 7.1.0 with C++ ABI 1011

Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_SPICE=ON

The smooth normals should be automatic but the surfaces need to be produced from the same vertex list since adding code to determine if surfaces in different vertex lists intersect would make things even slower. However, if you use a model which has been exported from KiCad as VRML, the vertex lists are changed and the relations are lost - so a cylinder which looks OK but is exported then imported again will look awful. This can only be improved with substantial changes to the scenegraph code. One problem is that most of the historical models had bad normals, so the VRML engine ignores all normals (even those created in its own export) and recalculates. So whether or not the cylinder looks good depends on the number of sides and the specific tools used to produce the model.

Thanks for the response. The model of the cylindrical enclosure was partly created by extrusion of two circles in FreeCad and exported from there. I needed to use VRML as step models do not support transparency, and I wanted the details of the circuit board to show. Thus in this case I chose to not use STEPUP to import of the board to FreeCad. (Also I would have needed to create step models for some of my components on the board.) My point is that there is a regression from version 4.0x to the new 3D rendering model in the nightly. With ability to set rendering smooth normals to on in ver 4.07, it renders fine. Apparently the automatic detection of thresholds for rendering smooth normals do not work well enough in the nightly for my case.

I will make a note to review the triangulations in the new scene graph. It
should be possible to improve these things but unfortunately it is not a
small job and not a high priority either.

1 Like

Have you tried to export your cylindrical enclosure in FreeCAD with StepUp? In this way your wrl should have the right normals to be correctly displayed in kicad…

1 Like

Thanks for the suggestion, that fixed the problem, smooth rending both in 4.07 and the nightly with preserved transparency. (I think I tried exporting with STEPUP initially but did not make the export work, but after using STEPUP to create a union first, it worked now.)

2 Likes