EEVblog Electronics Community Forum

Electronics => PCB/EDA/CAD => KiCad => Topic started by: easyw on November 03, 2015, 08:49:52 pm

Title: kicad 3d VRML with textures support
Post by: easyw on November 03, 2015, 08:49:52 pm
Hi,
at the moment kicad doesn't support vrml texture, but I found a tricky way to add VRML texture support for a board generated in kicad and exported to VRML  ;)

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
(https://kicad-info.s3-us-west-2.amazonaws.com/original/1X/80801bbf86097e597b2b43a978b49a8aa2a5781a.png)
and the
3d screenshot in FreeCAD with texture (VRML file exported from kicad)
(https://kicad-info.s3-us-west-2.amazonaws.com/original/1X/f3ab2066a331462e3e23c060830c8cdc4c13aeaf.png)

Maurice
Title: Re: kicad 3d VRML with textures support
Post by: timofonic on November 06, 2015, 06:12:50 pm
Did you use StepUP? That's what appears in your screenshots :)
Title: Re: kicad 3d VRML with textures support
Post by: easyw on November 06, 2015, 08:30:12 pm
Hi,
all the modules comes from kicad StepUp tool conversion http://sourceforge.net/projects/kicadstepup/ (http://sourceforge.net/projects/kicadstepup/) that helps in converting 3D STEP models to VRML models, with the right alignment, and convert the board to MCAD. (almost everything I do with 3D is developed in kicad StepUp  ;) )
Then the VRML models are rendered in kicad 3d-viewer and exported by kicad itself to VRML pcb assemblies.
To add the texture I just added a thin plate over the central VRML QFP chip, and I changed that plate in the 'shapes3D' folder with a plate with texture inside.

This trick will let you display your texture image for example for http://www.povray.org/ (http://www.povray.org/) PovRay or http://www.blender.org/ (http://www.blender.org/) Blender artistic rendering or animation.

The devs are thinking to integrate texture natively in kicad, but this task has a low priority.
This dirty trick is a small hack :)
Maurice
Title: Re: kicad 3d VRML with textures support
Post by: timofonic on November 08, 2015, 02:41:13 am
Hi,
all the modules comes from kicad StepUp tool conversion http://sourceforge.net/projects/kicadstepup/ (http://sourceforge.net/projects/kicadstepup/) that helps in converting 3D STEP models to VRML models, with the right alignment, and convert the board to MCAD. (almost everything I do with 3D is developed in kicad StepUp  ;) )
Then the VRML models are rendered in kicad 3d-viewer and exported by kicad itself to VRML pcb assemblies.
To add the texture I just added a thin plate over the central VRML QFP chip, and I changed that plate in the 'shapes3D' folder with a plate with texture inside.

This trick will let you display your texture image for example for http://www.povray.org/ (http://www.povray.org/) PovRay or http://www.blender.org/ (http://www.blender.org/) Blender artistic rendering or animation.

The devs are thinking to integrate texture natively in kicad, but this task has a low priority.
This dirty trick is a small hack :)
Maurice

Sorry, I didn't know you are the StepUP developer!

Thanks for your efforts. Some people see 3D as a gimmick, but it could be useful for many stuff and MCAD is the most interesting one. I just hope KiCad gets native STEP support eventually and they switch their 3D models to STEP, that would make things even more interesting ;)
Title: Re: kicad 3d VRML with textures support
Post by: easyw on November 10, 2015, 09:25:36 am
Hi @timofonic,

it would be just a great 'STEP' ahead to switch from Wings3D to FreeCAD to model all the parts...
FreeCAD can export 3D model to STEP and to VRML, so the two formats can co-exist ...
that will make much easier to manage MCAD conversion and will keep models with dimensions as per the real world  :)

HyOzd and me have tried to suggest to start a parallel repository, but at the moment the community is still on Wings3D side ...
https://github.com/KiCad/kicad-library/issues/186

FreeCAD is a solid mechanical sw and is fully scriptable (kicad python API are really poor at the actual state)

Thank you for your interest in this subject
M :)