I created my first Parametric Model, it’s another filament swatch generator, but it allows you to generate all your swatches at once in the same style. I added a random color to every swatch when generating more than one. I thought it was a cool feature since you then only have to pick the filament in Bambu Studio for each swatch. However, the filament picking options seem to be a bit broken to me. Let me explain:
This pictures shows the Problem clearly:
-
As you can see, when opening the .3mf file in Bambu Studio, a filament is added for every swatch in “Project Filaments.” This file contains 30 swatches, so 30 filaments appear within the project. You can change the colors, and the filament color updates accordingly, so everything looks fine at first glance.
-
The issue is that switching colors feels like guesswork because it isn’t clear which swatch is currently selected. Users should use the filament change options under “Global/Objects,” but since all filaments are loaded as one object, the user has to split them into individual objects first.
-
Now, even though you see an object for every swatch, filament 1 is assigned to all of them—even though the build plate shows different colors for each swatch.
-
After switching a filament, the swatch itself stays black, while only the color in the object selector changes.
-
I uploaded a print profile with all Bambu Lab PLA Basic swatches so the problem can be reproduced. Does anyone have an idea what might be wrong, or is this a bug?
The Color Support was introduced in the Model Maker Paramatric Model Maker V0.9.0 - Support Multi-Color Modeling
If all the swatches are loaded as a single object, it is likely because you wrapped all the swatches in a union method.
Remove that, see if they are imported individually and if that affects the way they are coloured.
When a model is painted and then split, the ability to retain what was which colour isn’t as easy as you think. You must remember, most models are nit many distinct a uniform shapes. If you split a horse, the parts are different shapes.
My hope is that because you do nit force a union on the entire model, the individual parts will be coloured by filament association rather than paint.
Thanks @MalcTheOracle for the hint! I looked up my code, but unfortunately I didn’t use any union at the top level to binding all swatches:
That’s my main entry point:
// --- MAIN LOGIC ---
for (i = [0 : len(Swatch_Data) - 1]) { // generate a swatch for every entry
translate([pos_x, pos_y, 0])
color(get_swatch_color(i)) {
swatch_body(...); // draw the swatch body
addTextsOnSwatchSurface(...); // add
}
}
After researching this extensively, I believe the issue is OpenSCAD’s for loop creating an implicit union() of all iterations.
Even though I never wrote union() explicitly, the for loop seems to merges all 30 swatches into a single geometry, which then gets exported as one object in the 3MF file.
This explains the behavior I described:
- Bambu Studio shows 30 filaments in “Project Filaments” (it detects the 30 different color() values)
- But treats them as one object (because the for loop unions everything)
- After “Split to Objects”, filament assignment breaks because the color-to-region mapping is lost.
- But the behavior is not consistent. It works half way within the filament project menu even as one object, but not in selecting the objects directly after splitting.
I didn’t find a solution, but I found this. Looks like the same problem I run into.
- OpenSCAD has an open issue for “Lazy Union” (Issue #350) which would allow for loops to produce separate objects instead of an implicit union. This is
experimental (–enable=lazy-union) in nightly builds but not available in Makerworld’s Model Maker.
So I came to the conclusion, the only one who can solve this problem within maker world is Bambu Lab @PineappleBun_BBL. Please active “–enable=lazy-union” for better color support or is there another workaround?
1 Like