Yeah, it would be nice but too much effort or no really need for that.
Are you experiencing the new 3D Viewer (openGL mode) slower than the old one? I expect that it is much more faster (faster load and rendering) and some users (from this forum and launchpad) are reporting that it renders faster too.
Raytracing render mode is another subject - it is expected to be very slow by nature.
I use to put the unique reference of the part in Manufacturer Part Number (there is a lot of discussion on this forum too) and a value in Value
I think the MPN field in library would be a plus
I do use also external sw (Blender) for improving the 3D rendering, but the translation from the KiCAD board and Blender model is much easier if the 3D parts come with material properties and in a format that Blender can easily manage/integrate ā¦
(STEP model does not allow any kind of material properties) I hate duplicate my effortā¦
Moreover, I would like to thank you, Mario, for your nice and useful work in 3D refactoring that you have done! I find 3D viewer much faster and usable than before and a lot of 3D mechanical integration in KiCAD would not be here without your job.
Maurice
Any VRML implementation out there is quirky. I can improve on the VRML2 support but (a) it already works much better than the old parser and (b) it has no value to me for mechanical checks. But out of curiosity, what quirky things donāt you like about the new parser?
I occasionally lurk here and I had an idea about these problems, but I was kind of reluctant to come with a proposal about these problems, since I canāt code well in c++ and devs have more important work to doā¦ But I see here other people and devs are interested in a 3d eye candy, tooā¦ So Iāll biteā¦
Quite some time ago I was thinking how nice itād be, if looks could be improved, but not at the cost of the kicad 3d performance and without objections of nay-sayers
One interesting solution would be the comments in the model files since STEP and VRML can have comments. They could be used similar to #pragma directive in C/C++. They could be ignored or processed according to settings.
So one would add comments to a model file with relevant information - material names, properties, additional information for Blender files etc (used with a custom importer for the Blender), STEP files could point to their VRML counterparts etcā¦ With these comments models would have to render same as they render now.
Then one would have to have a filter in a form of python script or dll/so library, which would pipeline file before importing it through the relevant model plugin. Model file would include a name of that filter plugin which would be called with some/all parameters from footprint (name, value, custom) and would tune model file accordingly (set colors and other material propeties, duplicate geometry, generate model on-fly, set some state of model like switch position etc.) Model cache would contain those parameters as well to diferentiate cached models.
No filter installed would simply mean a fallback - models would look exactly same as they do now.
Best part: since all information is contained in comments, there would be nearly zero performance impact and no ābloatā, since filters would be completely optional. People who like nice renderings would just enable/install appropriate filters.
There would be other benefits as well, like materials could also then be standardized across render platforms.
The Kicad vrml export could be just appended with comment containing model parameters for the Blender or other program to render appropriately. Different versions of model would just include original model.
I believe at this moment STEP and VRML support on KiCad already support comments, so you can add whatever you want there.
VRML files already have Material information that will be useful if you render on other sw (eg: blender).
Other more complex things, as you said, it will need customizationā¦ and will need someone that will develop that customization.
In any case, what you describe, I think if that would be something useful for you, you will need to implement it yourself Or find someone with the same need that want to implement it.
Iām trying to make a true replica of a C64 board. I have most of the 3d shapes in place but iām missing a few
All the resistors are just boring beige ones and i want to make them look better. its just eyecandy but still
Iām not a programmer or anything and learning Kicad has been hard enough. So a small windows tool where i could enter a resistor value and get an wrl file would be the optimal
i tried to look for pre generated ones but so far i could only find teh color rings and a resistorā¦ not any premade like a 330 ohm resistor or 470 ohm
At this moment there are pre-generated āFilm Carbon 1/4W 5%ā and Chip āEIA 0603 METRIC 1608ā āEIA 0805 METRIC 2012ā āEIA 1206 METRIC 3216ā
The pre-generated files are in the zip files here:
Once you unzip the file you will find the 330 ohm and 470 ohm resistors in the folder:
Film_Carbon/Film_Carbon_5TOL_4B_025W/R331.wrl
Film_Carbon/Film_Carbon_5TOL_4B_025W/R471.wrl
Mind that this only works with KiCad 5 and you need to keep the contents of Film_Carbon folder where are the main needed files.
It was not the goal of this project to generate single files, as it will generate huge amount of disk space if you have lots of resistor values.
You can still use the resistor and ring WRL blocks but you will need to learn how to change it in WRL, adding manually the contents of the rings to the right places.
In practice you will need to change āInline { url āā¦/ring_0.wrlā }ā and āInline { url āā¦/RESAD780W55L630D240B.wrlā }ā with the contents (in such a way that āit worksā) of the WRL files.
do we know how far out version 5 is? if its arround the corner i could install it but i guess it will update files so i no longer can use them in 4.0.7
Here is the easy part, this script generates standalone WRL files for a specified value, it needs the 13 āseedā files from Kicad3dmodels. It needs some work, but seems to generate files ok.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import shutil
import os
class ModelGenerator:
def __init__(self):
self.source_folder = 'C:/github/kicad3Dmodels/generated/Resistors/Film_Carbon'
def generate_model (self, value):
dest_name = 'res_%d.wrl' % value
# copy the resistor model
res_body_filename = 'RESAD780W55L630D240B.wrl'
shutil.copy (os.path.join(self.source_folder, res_body_filename), dest_name)
# copy the rings
outf = open (dest_name, "a")
transforms = []
transforms.append ("translation -.90 0 .51 scale .55 1.22 1.22")
transforms.append ("translation -.53 0 .51 scale .55 1.04 1.04")
transforms.append ("translation -.18 0 .51 scale .55 1.03 1.03")
transforms.append ("translation 0.80 0 .51 scale .55 1.22 1.22") # tolerance
mag = 0
while value > 100:
value /= 10
mag += 1
# 4 band code
digits = []
digits.append ((value / 10) % 10)
digits.append (value % 10)
digits.append (mag)
# 10 is gold, 11 is silver
digits.append (10)
for j in range (0,4):
digit = digits [j]
source_filename = os.path.join(self.source_folder, 'ring_%d.wrl' % digit)
with open(source_filename) as file:
ring_data = [line.rstrip() for line in file]
seen_start = False
for line in ring_data:
if "geometry" in line and not seen_start:
outf.write ("Transform { %s children [ \n" % transforms[j])
seen_start = True
outf.write (line + '\n')
outf.write (" ] }")
#
outf.close()
# main
model_gen = ModelGenerator ()
model_gen.generate_model (1)
model_gen.generate_model (12)
model_gen.generate_model (120)
model_gen.generate_model (1200) #1k2
model_gen.generate_model (12000) # 12k
the 0 value came out as only black stripes and the 3.3K came out as orange stripes only. Maybe i did something wrong? used the latest python for windows