I just created a .wrl file from a Wings3D file with a textured face, the texture appears in the wrl file, and seems correct, however in the 3D viewer in PcbNew that face is just missing. If I delete the texture line from the wrl file, it works again. My guess would be that textures aren’t supported in the 3D viewer partly because I can find no examples in the current 3d library which have the texture line; however I can’t find any documentation or another forum question which says that’s the case.
Can anyone either confirm the 3D viewer doesn’t support textures, or point me to an example so I can work out why my wrl file’s texture isn’t working.
I tried too, but the 3d-viewer at the moment doesn’t support textures … (I went into the code)
I think it would be a useful and a nice feature …
You may consider to add a whislist at
Thanks for confirming that - I’ll leave it untextured. It would be a nice-to-have but there’s a lot more critical things, but I’ll put it on the wishlist. The 3D viewer, when I started with KiCad a few weeks ago, I thought it was a gimmick, how wrong I was, it’s a super helpful tool, helpful enough that I made the 3-d models for the components which didn’t have them so I could have a full board in 3D. Textures would be nice one day.
I agree very much… 3D viewer is a very useful tool…
moreover, if you want to export your board to 3D for mechanical purposes or interchange (e.g. if you want to check your dimensions in an enclosure), you may consider to add 3D parts generated from FreeCAD or from STEP models.
Then you may use the open source kicad StepUp script to convert board and 3D VRML models to 3D mechanical objects for ECAD MCAD collaboration.
So, if you need to check if your board can fit in an enclosure, kicad StepUp will give you the answer…
Using STEP models in your design will give you the ability to export all the artwork in mechanical 3D environment, letting you to design your kicad pcb with the same dimensions - appearance that you’ll get in mechanical software.
You can use FreeCAD (open source) do do all the job!
Moreover, kicad developers are moving to integrate 3D IGES and later STEP format directly into kicad 3d-viewer… so the first you move toward this approach, the less you will have to change later…
STEP (or STP) format is the standard de-facto for CAD interchange STEP format description
and gives you a mechanical model with real scale factor for pcb enclosure design and collaboration
an example of kicad EDA and mechanical CAD artwork collaboration and
comparison in kicad with the kicad StepUp script, already usable with
the actual RC kicad release…
You can try also FreeCAD 3D models script generator and some generated models, usable out ‘of the box’ for kicad…
The 3D renderer is being rewritten but there are currently no plans for textures. They might be added when the job is finished, depending on how difficult they are to implement, but for now there’s nothing. It will be a while before the newer code is ready; work has been going on since about July but there’s a very long way to go yet.
As (co)author of the current version of the 3d-viewer, I confirm that I didn’t implement any textures
I am working (with @cbernardo ) on a new 3d-viewer, supporting for textures (on models) won’t be too difficult but it will be on the bottom of the list.
Most of the models you find online don’t have textures (3D CAD models, only have 3D information), so I believe it will only be useful for a few people. Would you like to share your 3d model with /without textures? and the 3D of your board?
Maybe some more people would like to join the 3d-viewer development so that can speed up and we will see textures soon…
@maui@cbernardo
One nice wish thing would be if in future we can support textures, then maybe we can add textures to parametric models or/and improve somehow the realism of the rendering add more info to the materials of the VRMLs…
Hi @cbernardo@kammutierspule@rolandking
there is a dirty trick to have texture available in VRML file …
if you just export your 3d board and VRML models with kicad copying the models to 3D path, and then change your VRML model without texture with a model with texture in that folder, you can have a VRML representation of board and modules with the desired texture
that would be nice/useful e.g. for povray generation of 3d realistic rendering or blender picture rendering or animation 3d screenshot in kicad
cool! I was thinking on that too… you should be able to use/convert with 3rd part softwares. I didnt know that FreeCAD supports textures. @maui Are you able to use one exports of your script and use eg FreeCAD to export to some format to render in eg Blender ?
and yes, it is possible to use my kicad StepUp parametric generated VRML models, to be rendered with Blender
this is a video of a kicad board where all 3D models comes from my script generator and are converted from FreeCAD (MCAD) to STEP and exported to VRML format.
The VRML assembly, generated from kicad VRML export routine, can be imported in Blender and manipulated to obtain nice rendering or animations and videos.
Blender has a limited VRML import support http://forum.freecadweb.org/viewtopic.php?t=10815
so FreeCAD VRML exported models are not rendered well in standard Blender import routines… hyOzd (the guy that I’ve developed the module parametric library with) has developed a python patch plugin that fills the gap… http://forum.freecadweb.org/viewtopic.php?t=10815#p103529
Then you will get a clean scene in blender with VRML files exported from FreeCAD
@kammutierspule the video is done with Blender… that is the rendering I obtained from FreeCAD generated models…
and for me it is nice…
I’m not a Blender artist, but the point is that when you have your models in Blender, you can edit your models any way you want with Blender’s tools to create realistic and very nice renders.
Ah ok, I was not able to watch the video at that time. I was thinking that you could do a render with a some more complex board. yeah, you need to add more detailed materials in blender to get a more decent realistic render.
if you look one reply before the one with the video, you get a more complex board rendered in FreeCAD
that hackrf-one board can be rendered in FreeCAD as in Blender, and moreover with the texture
“you need to add more detailed materials in blender to get a more decent realistic render”
you are right, my 3D models, and in general 3D models coming from FreeCAD will have onlydiffuseColor property
and they will not have emissive and specular properties
My approach to 3D models is a mechanical approach, more then aesthetic
I need 3D to check the pcb routes and to check enclosures constrains…
this is a common philosophy that also the other ECAD sw have …
but, coming back to VRML models, as Wayne stated at this thread http://www.mail-archive.com/kicad-developers%40lists.launchpad.net/msg15662.html
“I hope at some point in the future our 3D models could be improved
(some of material properties are very wrong)
now that FreeCAD exports vrml files that the 3D viewer can use.”
the 3D libs are far from being perfect at the moment…
I would prefer not to include those rendering properties, if they are not correctly assigned…
I used to render the official 3D models with the 3d-viewer option “render material properties” OFF
Anyway, we could have a solution that will leave all happy…
My parametric 3D models, exported by FreeCAD in VRML are managed by a script…
so a script could add emissive and specular properties to the material of the VRMLs
e.g. giving a color table correspondence, injecting in the VRML generated all the properties you are looking at…
You are very welcome if may consider to have a look at the VRML format generated by FreeCAD to suggest or create a solution for this riddle
here the link to my 3D parametric STEP and VRML models
@kammutierspule
I’m not a 3D designer, so if you suggest me some values for:
metal pin material
chip body material
for the following data:
diffuseColor
ambientIntensity
emissiveColor
specularColor
shininess
I could try to add those values to my scripted models and will send them to you to see if the result will add realistic performance to the models
Yes, but I was asking for a proper render in Blender. Something more ‘artistic’… that was something I had in mind to try.
Sure, that is why it is nice to have different interests form different people in opensource projects, so they will make different contributions.
There was issues with some models from some authors that didn’t set correctly the materials, so in 3D viewer we develop a flag to not use materials from models (Actually, if the flag is set it only use diffuse properties)
If you are adding the properties to the models, you can assigned it correctly.
I believe we keep the option to render or not the materials, but, hopping that authors will have in mind to check the correctness of the assigned materials, so that can be proper render and add realist for who how need/like it.
diffuseColor(0.8 0.8 0.8) - it is the main color of the object
emissiveColor(0 0 0) - you can set this value for example if it is a LED, that will be the light it will emit.
shininess(0.2) - a lower value, it will diffuse/blur the shinning, an high value (1.0) will make a very high shining spots of the lights (it will depend on material properties, need to check a table)
specularColor(0 0 0) - it is the light that will be reflected if the face is reflecting the light (it usually depends on material properties… so probably you need to consult some table)
transparency(0.0) - 0.0 will be opac, 1.0 will be total transparent (use it for glass, LEDs… etc)
ambientIntensity(0.2) - when some face is obscured by the light, this will be how much it will light that face.
attached a self containing kicad project with 2 SMD capacitors:
one with only diffuse color (standard FreeCAD export script)
and one with diffuse, specular, ambient, shininess props
I used Silver for pins and Bronze for body as following: silver: diffuseColor 0.50754 0.50754 0.50754, specularColor 0.508273 0.508273 0.508273, emissiveColor 0 0 0, ambientIntensity 0.37879, shininess 0.4 bronze: diffuseColor 0.714 0.4284 0.18144, specularColor 0.393548 0.271906 0.166721, emissiveColor 0 0 0, ambientIntensity 0.29762, shininess 0.2
referring to vrml materials
please let me know if you think that the result is fine for improved 3D rendering…
the method can be easily scripted to maintain STEP model as original model for parts, and to obtain VRML model with material properties added to FreeCAD export routines
Maurice