Should the 3D viewer be aware of component values?

When I look at my THT boards in the 3D viewer, it looks really good and realistic but all the resistors look like blue (or brown) rain barrels with wires.
I’m wondering if it would be too difficult to paint color rings on them, according to the value in the schematic. I know, it would not be easy for a 100% solution since some designers give them a value like “4k7 1%”, others add a seperate tolerance field and the next one does not specify a tolerance at all.
For me it would be ok if it paints them as 1% resistors to the according color code. What do you think? What do the programmers of the viewer think? How could you find the body element where to paint the rings to?
You can think further… SMD - where is the area to place the resistance code? Is it a resistor? Is it an IC? How can the designer of the 3D model give an aid? Is this possible or am I just dreaming?
Sure, this is not an urgent feature but I think it would be an eye-catcher, wouldn’t it?

This has actually been suggested before and some results by kammutierspule were shown but AFAIK the renderer doesn’t support variants by parameterisation.

The original request was for coloured LEDs without having to have a model for each colour. Bands for THT resistors I think are not so useful, unless it’s for pedagogic purposes. For real components I would not trust my tired eyes to tell the difference between brown and red bands for example. If the THT resistor is not from a bandolier, I pull out an ohmmeter to check.

eye catcher

Yes, for sure.
But I think this is not inside the scope of kicad.

I’ve seen color bands on resistors in some of @BlackCoffee’s work. Maybe he will chime in sometime?

You can use my App posted on github

ADDED: I forgot about this Kicad Post

1 Like

Nice work! But it would still leave a lot of manual work for a board with tens of resistors or more just for cosmetics. If we could automize this, a script that takes the values from the BOM, creates 3d models in a local directory and replaces the models in the schematic, it would be practical but it still would be a workaround.
My idea would be, the viewer does this on-the-fly, keeping models for different values only in RAM, replacing the standard model by these and render it.
It should be doable, I think, but we must enthuse a programmer to implement it. I’m afraid I can’t do that (well, both, I can’t implement it and I can’t enthuse someone :slightly_smiling_face:)

Perhaps ‘true’ but, you can use my App to change One Resistor/other then, point your Kicad’s Footprint to the specific One with the new Colors. And, with a few minutes of work (and learning) you can use a Script to change All/etc with a couple of Clicks… I’ve posted some Scripts and Info about doing this sort of thing but, I don’t keep links around so, if interested, you can search around… If I drink enough Coffee, I may look…

Oh, and you can use various Text-Editors to change files in a ‘Bulk’ way with just a few clicks… If you know where the Footprints are located on your system… Easy stuff…

Thank you, I’ll do that, unless some enthusiast shows up :wink:

It’s now 100º F here and too hot to drink hot coffee so, here you go (while coffee is chilling on ice…)

Say you’ve got 100 Footprints and 50 of them use a 3D-STEP called (the ‘search’ text in the Video)) and want to change All 50 Footprints to use a New_Colored STEP file (the ‘replace’ text in Video)

You can glean the needed process from the Video below…

You’ll see that Only the Files with the Search-Text were changed.

Put the .py file in the DIR containing the DIR’s with the .kicad_mod and test everything on some Dummy/Example DIR’s and File’s first… in fact, below is a .ZIP of the demo files and the .py is inside it…

Some_FP_DIR.zip (12.1 KB)

I remember colour banded resistor models in KiCad4 times, done with WRL models. Someone wrote a script to colour the bands.

They lead to monster file sizes for a start

Accidentally bumped into an old thread with a 3Dlibrary with colored resistors.

2 Likes

Too bad SMD resistors and capacitors have no color bands.