How to view components in 3D viewer


#1

While familiarizing myself with KiCad 5.0 I cannot see 3D models of components associated with cvpcb footprints. Additionally I only see the bare PCB (no components) when viewing the finished PCB with pcbnew 3D viewer.

I seem to recall that this capability was functional in KiCad 4.0.7 “right out of the box.” Is there some configuration/import step I am missing? I believe the relevant path for KISYS3DMOD is configured as C:\Program Files\KiCad\share\kicad\modules\packages3d\ which seems appropriate and there are component models in that directory. I cannot find any reference to additional steps to see 3D renderings of components in either situation. Any pointers would be greatly appreciated.


#2

I would guess it is a library version mismatch. If you have made your projects in kicad 4 then they where made with the kicad 4 footprint lib which expects the kicad 4 3d model lib.
So download the version 4 3d model libs via the library download page. Put them somewhere convinient and point KISYS3DMOD to that place while working on old projects.

For new projects it is generally suggested to use the new lib as it comes with a lot of improvements. (There even exists a backport to kicad 4 for people who can not update to kicad 5)


If you had kicad 4 installed previously then i would bet you still have parts of its configuration surviving. Most importantly the fp-lib-table. This file controls which footprint libs you use. If this is the case then you propably still run the on demand online footprint libs of version 4. But the kicad installer replaced the local symbol and 3d libs with the ones from version 5. This results in another mismatch in libraries.

It is easy to discover if this is the case. open the library manager in pcb_new and check if you have any lib with the prefix Housings (example Housings_DIP) if this is the case you run the version 4 footprint libs.


You now have two options. Install the full version 4 library (replace the symbol and 3d models that where installed with version 5 of kicad) This would allow you to work with old projects easily but locks you in the old lib that is no longer developed.

Or you update the fp-lib-table to work with the version 5 footprint libs. The safest way is to open the library manager again, delete all old libs (the ones starting with KIGITHUB) and then use the browse button to add the new libs (they are found under C:\Program Files\KiCad\share\kicad\modules for windows users. You can use shift left click and crtl left click to select multiple libs at once. Only select .pretty directories.)

The second option is to delete your fp-lib-table from your config directory (in C:\Users\ …\AppData\Roaming\kicad). When you then start kicad (or pcb_new from the project manager) it should ask you if it should create the default library table. After this step you will need to manually add your personal libs again.


#3

Rene,

So far your experience has been invaluable.

I did previously have KiCad 4.0.7 installed but I thought I completely removed it before installing 5.0.0. Apparently it something was left behind as the Footprint Library Manager shows the library paths as “$(KIGITHUB)/…” and I have the set if IC libraries identified as “Housings_xxx” in the library manager. I guess when I removed the KiCad application I didn’t look through the app data for residual files like the library tables.

I have two KiCad installs, one on my desktop and one on my laptop. I fixed the laptop according to your second option in which I deleted the fp-lib-table. After a little jiggling in cvpcb it appears to now render a 3D image of the component. I think my desktop install was cleaner in that the library references appeared to be for 5.0; however, I can’t get it to render a 3D component, yet. I’ll delete the library table there as well and see if that cleans up the 3D component view.

I say “jiggling” with cvpcb because it seems to be particular about selecting the active/desired component. I have to play with the footprint filters to get the component selections and viewer to make the component symbol/footprint selection active. This may be a residual effect of my mixed up library table and installed libraries. I’ll go through and clean everything up and rework the schematics to make sure all my library references are 5.0-correct.

As a result of the re-install problems, please let me know if there is anything else I should be on the lookout for.

Thanks for bailing me out…again.

Best Regards,
Glenn


#4

For cvpcb i wrote a detailed description in the FAQ (and other alternatives to assign footprints)


#5

Rene,

I liked the footprint FAQ so I copied it for future reference.

I’m mostly whole on the component footprint viewing, but I do have a couple of residual questions to close out this topic.

The first one has to do with viewing the footprint and associated 3D component in cvpcb. When navigating footprint associations in cvpcb I notice what appears to be quirky behavior to view a footprint and 3D components. Once a footprint is assigned to the component I find it odd that I can’t just highlight the component with its footprint and get the footprint viewer to display the footprint and 3D model view. I find I have to reselect or highlight the footprint in the available footprint pane in order for the viewer to display.

It appears that the viewer can only illustrate the available footprints and it cannot display the footprint associated with the component selected in the component pane - if that description makes any sense. I can sort of see the rationale of restricting the viewer to the available footprint selection, but it would be nice if after making component/footprint associations you could simply select your component in the middle pane and verify the footprint in the viewer. Please let me know if this is “intended design behavior” for the cvpcb viewer functions.

My second question has to do with the 3D viewer in pcbnew. When I select the 3D viewer I see the board rendered in 3D and I can move it around. However it doesn’t show any components, only the bare board. I recall seeing full 3D board renderings on the web so I am wondering if there is yet additional configuration (or in my case, misconfiguration) that needs to be addressed to get the full effect. I suppose examples I have seen where for an early KiCad and this feature was changed in 5.0.

Any additional help would be appreciated.

Thanks,

Glenn


#6

Only footprints of loaded libraries into the project are available for that project.

Every footprint has a field with the path to its 3D model. In your case either this field is empty or pointing to a non-existing 3d file (wrl or step).


#7

sorry TL;DR, are you able to see the 3D models in the footprint 3D preview while add/remove 3D shapes?
If yes then reset the settings in 3D viewers for default or check if you have the 3D shapes show option enabled in the 3D viewer options.


#8

Cvpcb has 3 colums. The preview (3d and footprint preview) only work on the third column. So as the assigned footprint is in the second column you can not view it that way.


#9

Pedro, Kammutierspule,

I thought these issues might be hard to describe…

I (now) have the appropriate library associations and paths setup. I can see the desired footprints and related 3D component models when I select the footprint from the right-most Available Footprint pane. However, once I associate the desired footprint to the component, simply selecting/highlighting the component/footprint in the center Component/Footprint pane is not enough to display the footprint in the viewer(s). The viewer(s) appear to only display footprints from the Available Footprint pane. It’s not the end of the world, but it’s just not intuitive. I would think that a footprint reference, regardless where it appears, would provide a reference for the footprint viewer(s); apparently that is not the case.

Rene,

Thanks for confirming my conclusion about the cvpcb viewer(s) only being able to display selections from the Available Footprints (i.e., 3rd, right-most pane). So I think this question is put to rest now that I understand the behavior.

I am still uncertain about the matter of the possibly missing components in the pcbnew 3D viewer. Have not found an obvious configuration item askew.


#10

If you orignally designed the board in version 4 or in an older nightly then you will have had the version 4 footprint libs at that time. When adding a footprint (netlist import) to the pcb, kicad copies it into the pcb_new file. Unless you tell kicad to update the footprint it will stay unchanged.
You are now using kicad 5 with i assume library setup for kicad 5. This means the old footprints (cached in your pcb_new file) still point to the old kicad 4 3d models which no longer exist under the same way.
Another option is that some 3d models simply do not exist. (not all footprints in the official lib have a 3d model. However all footprints have one assigned to make adding 3d models easier.)


#11

I did not purposely carry over any design from 4.x since I has just started learning KiCad. My new getting started exercises were done as a clean slate in 5.0. Perhaps my initial residual fp-lib-table issue left some stuff in the project pcbnew project file. I’ll see if I can delete the pcb related files and restart that portion of the design. Worst case since it’s just a test example, I will delete the whole project and restart with the new component/footprint library references.

My test exercises are using simple discrete components. I assume that because I can see the 3D model of these components in the cvpcb footprint viewer these same models would be referenced when trying to display the 3D view of the finished board.


#12

Yes that should be the case. try it with a completely new project. (just place a few of the ones that make trouble on the pcb and only check the 3d view) If it works that way then you had some residue.

You can also check the 3d settings of the placed footpirnt in pcb_new. Just open its properties dialog and check if the library name is plural. If it is then it is for sure a footprint from the old v4 lib. (It being singular is not a guarantee that it is from the new lib as we had a mixture of singular and plural in the old lib)


#13

I’ll give a clean, simple project a whirl and get back with the fallout ASAP. Will also follow up on you additional suggestions to check the 3D settings in pcbnew.

Thanks,
Glenn


#14

Rene,

I used the “clean slate protocol” and voila, all is good! The operation of cvpcb footprint management was cleaner and better behaved than my previous mixed-library situation. The PCB constructed for the schematic displayed a correct 3D view with components. Yeah!

I don’t care what your boss says about you, you know your (kicad) stuff.

Many thanks, and I’m sure my kicad newbie days are over yet, but I have a good foothold now thanks to you.

Best Regards,
Glenn