3D viewer : In raytracing mode, the 3D model is displayed incorrectly
Description
3D model is displayed incorrectly
Steps to reproduce
1.Open a PCB.kicad_pcb 2.Open 3D viewer 3.Enter ray trace mode 4.You can see that the model is displayed incorrectly
KiCad Version
Application: KiCad 3D 查看器 (64-bit)
Version: (5.99.0-13185-g0dcbfa2b69), release build
Libraries:
wxWidgets 3.1.5
libcurl/7.78.0-DEV Schannel zlib/1.2.11
Platform: Windows 10 (build 19041), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
Date: Nov 9 2021 12:00:58
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.76.0
OCC: 7.5.0
Curl: 7.78.0-DEV
ngspice: 35
Compiler: Visual C++ 1929 without C++ ABI
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON
Designs
- Show closed items
Relates to
Related merge requests 1
When this merge request is accepted, this issue will be closed automatically.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Owner
Please attach a project and model that shows this behavior. Also attach a screenshot that shows the correct and incorrect displays
Collapse replies - Author
- Owner
If you can reduce the project to just a minimum copy that shows the issue (just an outline and the broken footprint+model?) That could work
- Seth Hillbrand added statusneed-info label and removed statusnew label
added statusneed-info label and removed statusnew label
I guess this bug is the same as the bug I reported, but it has been reported for two months and no one has fixed it #9416 (closed)
Confirmed with
Application: KiCad (64-bit) Version: (6.0.0-rc1-122-g65fc47cb8f), release build Libraries: wxWidgets 3.1.5 libcurl/7.78.0-DEV Schannel zlib/1.2.11 Platform: Windows 10 (build 22000), 64-bit edition, 64 bit, Little endian, wxMSW Build Info: Date: Nov 23 2021 12:00:19 wxWidgets: 3.1.5 (wchar_t,wx containers) Boost: 1.76.0 OCC: 7.5.0 Curl: 7.78.0-DEV ngspice: 35 Compiler: Visual C++ 1929 without C++ ABI Build settings: KICAD_USE_OCC=ON KICAD_SPICE=ON
Collapse replies I had a peek at the uploaded project, but the 3D models that do not render properly are not standard and are also not part of the project.
The location of these missing footprints are the same as the directories for the default. Apparenly these non-standard footprints have been copied into the default libraries.
Do the footprints in question have two (2) 3D models defined? One .step and one .wrl with the same filename?
If so, IIRC when rendering .step files, KiCad looks for .wrl file with the same filename, and renders .wrl. When you explicitly define two 3D models, KiCad will render the same .wrl 3D model which leads to artifacts.
The official library definesonly .wrl model within the footprint even though both 3D models (.wrl and .step) are required by KLC.
Collapse replies Yeah, I should have checked all the .kicad_pcb file contents. I read the discussion at https://forum.kicad.info/t/nightly-rendering-problem/32288 to hastily. Sorry for the noise
In my case: no. Only STEP.
In my case just .step
- Reporter
project with included 3D.stp-files attached: 3D_raytracing_bug.zip
Original Files downloaded from manufacturer (Würth/JST), no additional editing from my side
6 Collapse replies - Reporter
I confirm, the same on my kicad with project from zip file in this post:
Application: KiCad PCB Editor (64-bit) Version: (6.0.0-rc1-277-g3c0b10b022), release build Libraries: wxWidgets 3.1.5 libcurl/7.78.0-DEV Schannel zlib/1.2.11 Platform: Windows 10 (build 19042), 64-bit edition, 64 bit, Little endian, wxMSW Build Info: Date: Dec 1 2021 12:00:04 wxWidgets: 3.1.5 (wchar_t,wx containers) Boost: 1.76.0 OCC: 7.5.0 Curl: 7.78.0-DEV ngspice: 35 Compiler: Visual C++ 1929 without C++ ABI Build settings: KICAD_USE_OCC=ON KICAD_SPICE=ON
Wow, so it was a bug after all! And I thought that I had a problem with my STEP model!
- Seth Hillbrand added 3d-viewer prioritymedium statusconfirmed labels and removed priorityundecided statusneed-info labels
added 3d-viewer prioritymedium statusconfirmed labels and removed priorityundecided statusneed-info labels
- Seth Hillbrand changed milestone to %6.0.0
changed milestone to %6.0.0
- Owner
It turns out that this is from e81b516a
This is fixed by removing the color search from
processFace()
This would suggest that the face colors fetched are incorrect and overlapping the underlying solid Collapse replies Was the problem fixed together? #9416 (closed)
- Owner
@sethhillbrand @mroszko is one of you taking this one on?
- Owner
This is a duplicate of #9416 (closed)
@mroszko Is this something you can take? I'm not quite up to speed on the label-based changes implemented here yet
- Maintainer
I have not been able to identify a deficiency in the label navigating. No duplication is occuring. It can be possible I broke the scene graph tree or something though....if only there were tooling for that
- Owner
The coloring for faces is still legacy and is causing the problem. Do you see anything there that could be updated to the label-hierarchy?
- Maintainer
The label hierarchy should have no impact here.
- Owner
It searches for the label based on the object, then gets the color for that label
- Maintainer
Yes? But it's clearly applying color correctly to faces in non ray tracing.
Which is why I think the scene graph may be broken from my changes. Not the color parsing.
Edited by Mark Roszko @mroszko Here is an example where colors are not applied correctly in non ray tracing: #10554 (closed).
- Jon Evans added regression label
added regression label
- Seth Hillbrand mentioned in commit sethhillbrand/kicad@0085739e
mentioned in commit sethhillbrand/kicad@0085739e
- Seth Hillbrand mentioned in commit sethhillbrand/kicad@470fbf54
mentioned in commit sethhillbrand/kicad@470fbf54
- Wayne Stambaugh mentioned in merge request !1051 (closed)
mentioned in merge request !1051 (closed)
- Seth Hillbrand mentioned in commit sethhillbrand/kicad@8b431a05
mentioned in commit sethhillbrand/kicad@8b431a05