-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blender crashes when Rasterization is enabled #8
Comments
Thanks for your quick response! ExportI got the point regarding the export, which is a different usecase than high-quality renderings. I've written some code to create the base_color, normalmap, metal, occlusion and roughness maps based on the svgs in the I then manually removed the textures from the PCB and added my own, which looks quite good in glb: Here is my code to create the maps. How much effort is it to automate the UV-mapping and texture creation for that? Or is it even possible? Also i found it's better to export the Here is the outcoming |
Ahhhh you're trying to use Eevee! Of course, that makes sense. So yeah, the plugin/materials setups are really meant for use with the Cycles render engine, I just tried Eevee with your file and it also rendered for me, but pretty much completely slowed down/killed everything else on my PC while doing so. I should probably just add a stylized/low end compatible material mode, which also works with exporters. That's a good idea. (Will take a closer look at your pbr map creation code later, maybe I can integrate that, or something similar, into the addon at some point :) ) |
I've made some progress I have some more changes I want to do:
|
Oh I've forgot to mention that actually: The current importer already sets up UV maps for the textures in Regarding the other things:
|
Update:
I now integrated my texture creation into the importer including correct UV-mapping (only the PCB-edges are wrong). But I still have one weird bug:
Do you maybe have any idea what could cause this behavior? Back to the initial issueMy blender is still crashing if I use rasterization mode |
With "unnecessarily complicated" I initially referred to the mesh with the joined objects you used in the 3D mode ( Initial issueI checked it both - Eevee and Cycles (with That would be a nice alternative! Is it a big deal to bake out the materials to PBR? Edit: Regarding the black PCB: There is indeed a |
I don't know why, but the RASTERIZED mode works now... Regarding the material selection based on the KiCAD stackup: |
I'm the KiBot author. Here are some experiments: I'll add Blender and pcb2blender to my docker images in the next days, so KiBot users can start playing with it. @30350n: you did an impressive job with the shader nodes. |
Hey! Thanks a lot, I've never used KiBot before, but I'll definitely look into it! Being able to completely automate good looking renders of PCBs definitely seems nice.
Thanks. I haven't touched this much for a while, but it's nice to see that it generally seems to work for other people as well, I think I might still need to do some optimizations though, especially to make it viable/work for lower hardware devices as well. Great renders! |
Well ... it's not trivial at least. Ideally I'd have some tooling in place to automatically bake PBR maps for the main PCB and possibly the components and update the materials to use those. There's still one relatively big issue though, which is UVs: Actually, just while writing this I've had another idea: It might be possible to simply "plug up" all the holes before baking, leaving us with a few big faces hopefully. This could be reversed afterwards and the textures should work completely fine with the original mesh still (which can be restored afterwards), as long as the UVs match up. |
The initial issue was fixed by automatically switching to cycle rendering mode, so I will close this issue |
Thanks! |
Thanks for your nice project! I like the structure with the exporter and importer! It allows to check/optimize the output of KiCAD before merging it with the importer.
Sadly, I cannot use the Importer with
Rasterization
. I assume there are some problems with the texture generation.I tested it with the 123.zip from #1
I just added the
pads
folder inside the123.pcb3d
because the importer expects it to exist.Versions
Blender version: 3.3.0
KiCad version: 6.0.5
pcb2blender version: 2.0
OS: Windows 11 22H2
(Before I also tested it with Blender 3.3.2 and KiCad 6.0.9 with same results)
Import type
3D
I can load the file using 3D layers and visualize the
![image](https://user-images.githubusercontent.com/11295204/206866251-39aea9ba-aad4-4423-b8b3-4b5ecf722118.png)
![image](https://user-images.githubusercontent.com/11295204/206866318-b25ac701-e070-421b-a163-3f2946f9c2e1.png)
Rendered
view in blender:and export any format, e.g.
glb
:Import type
Rasterization
I can also load it with Rasterization enabled,
![image](https://user-images.githubusercontent.com/11295204/206865499-77bc931b-7496-4e04-917b-2ab7b7f44b92.png)
but when I switch to the
Material preview
orRendered
view in blender, it crashes. Blender's.\blender_debug_log.cmd
gives the following output:Sometimes it shows the correct visualization with all layers, sometimes it shows nothing, sometimes the PCB is visualized white transparent. But in any case I see it for a short time only and Blender freezes and crashes.
Anyway, I tried to avoid the Rendered view in Blender and tried to export it as
![image](https://user-images.githubusercontent.com/11295204/206866028-1007f96f-1a53-4ff5-93d0-a184949fa262.png)
glb
directly.When I open the
glb
, the file has no texture on it:Same with
obj
:The text was updated successfully, but these errors were encountered: