Moving colors around...

76 views
Skip to first unread message

Kurt A 3d

unread,
Mar 17, 2026, 9:28:21 PM (5 days ago) Mar 17
to 3D Printing Tips and Tricks

Let's assume you have an object and you assigned your extruders to it. 
Now lets assume you wish to permute those assignments.

Simple approach: go to your printer and move the spools around :-)

Next approach: sit and repaint the model, to make life easer redefine your printer to the slicer and tell it it has MORE extruders than it actually has so when changing your RED,BLUE,YELLOW,GREEN,BLACK model to BLUE,YELLOW,GREEN,BLACK,RED you can go  BLACK->white, GREEN->BLACK, YELLOW->GREEN, BLUE->YELLOW,  RED->BLUE, white->RED  still a lot of work and makes my head hurt every time I do it (lots of area fills).

Waste of a few days of your life approach:  Think about writing a shell script to do It for you, start going down a rabbit hole reading prusaslicer source code....  so here is the partial result; 
Let me know what you think -- PERHAPS ONE OF YOU understands the emu-segmentation stuff with triangle splitting :-)

Kurt-A

Ed Street

unread,
Mar 17, 2026, 10:35:04 PM (5 days ago) Mar 17
to 3D Printing Tips and Tricks
One need never move spools around in the printer to match a print job.  One simply has to assign slot N in the slicer to slot X on the printer to map where it goes :)

Kurt A 3d

unread,
Mar 17, 2026, 11:10:58 PM (5 days ago) Mar 17
to 3D Printing Tips and Tricks
Ed

I mean figuratively.   The point is that the rabbit hole was trying to develop a tool to permute the colors in a 3mf file so that you could put multiple instances of the object with the colors permuted on the printbed at the same time without going through and recoloring them by hand.  The reference to moving the spools around was to the fact that a more direct way to permute them would be to just 'move' (or logically move) the spools, BUT that wouldn't work for multiple permuted copies on the print bed at the same time.

In anywise has anyone figured out the mmu_segmentation or paint_color bit patterns which describe the segmented triangles.... ?

Kurt-A

Kurt The 3D Printer GUY!!

unread,
Mar 18, 2026, 8:20:22 AM (4 days ago) Mar 18
to 3D Printing Tips and Tricks
Yo there Mr. Doppelgänger!

I know you truly HATE the idea of using AI - like you Absolutely and Resolutely REFUSE to Use it! But, in fact - AI had the ability to kind of Tap into the Hive Mind of Humanity - Scouring the web - and essentially finding out if SOMEONE ELSE on the Internet has Already succeeded in doing EXACTLY What you seek To Do. 

As such - if someone has Already done this - it's really like you are Re-inventing the Wheel!!!

So - maybe it's time I feed my BFF Claude - the Prompt - to get YOU the answer you truly Need!

How many permutations was it? Is it truly 16 color combinations? How many little toy items? Also 16??? And, obviously Its PrusaSlicer and the XL and 4 print heads - for 4 colors - and 1 print head for supports. 

FYI - early on - my one thought was to simply post process the GCode - and change color/spool assignments that way - However - I kind of knew that Logically speaking - that would probably NOT be a viable option...

-K

Kurt A 3d

unread,
Mar 18, 2026, 4:48:42 PM (4 days ago) Mar 18
to 3D Printing Tips and Tricks
Kurt-1

I am trying to write a general tool to perform this operation, not just permute the extruders one time. 

Yeah in my article I mention that dudes AI written  program that doesn't do the job properly.   It just claims to randomly edit the mmu_segmentation for strings of the form ""4" "8" 0C" "1C" etc.... of course if you have the string "4C" (extruder 7 very possible in a INDX world) it would happily change the 4 first :-) if it even worked at all.  Seriously the AI generated code is slop.    

Whats worse is that the number 4,8,0C,1C etc are only the values for the simple case (non segmentation of the triangle, that is the case I can handle).   While I dont touch the more complex lines  - that AI tool does but it gets it completely wrong.  See in the more complex case those low order 2 bits aren't zero, they specify (somehow) how the triangle is segmented.  Thus instead of "4" "0100" you could have "5", "6", "7" ... "0101", "0110" "0111".  likewise 8 could be 8,9,10,11  , 0C could be 0C 0D 0E 0F etc... to just randomly and unserializable change any substring of the form 0C but not handle all of that could lead to at best odd behavior and at worst crash the printer somehow.

Still trying to wrap my head around the representation of ""gizmo" subdivision of triangles.   For example the Limit of 16 extruders shows up in the source code for PrusaSlicer, OrcaSlicer, BamboStudio which is interesting because bamboo H2C's seem to claim to be able to chain like 4  AMS units (16 colors)  together, and one would think from YouTube that was on both sides, but while that may be possible there is a representation limit of 16 in the color spec.    Of course I dont quite understand why the limit is 16.....   It should be  17 or 18 as far as I can tell...  ((For those of you who can read hex/binary see the picture)) -- I understand they say they need to reserve a value for the NULL case - but they already have that.  And even if that wasn't good enough that would explain 17 not 16.    Its strange that the code says 16... I mean unless they are saving a value for a future expansion like the way 3 implies the second 4 bits.    But again that still seems to say 17 to me.   It could just be that when they wrote the code, way back in the early MMU days no one ever thought they would have so many and they just misthought I have 4 bits and that is 16 values.... but they have 6 bits.... sigh I wish there was someone I could talk to about this.

Kurt-A


Image.png]
Kurt-A

Kurt The 3D Printer GUY!!

unread,
Mar 18, 2026, 6:22:34 PM (4 days ago) Mar 18
to 3D Printing Tips and Tricks
Yes - I understand the idea of a General tool! What would you code it in? Python would seem to be the Move Obvious.

U stated - "...sigh I wish there was someone I could talk to about this." - but, we DID chat. However, I know I was NOT helpful enough!!!

You also mentioned - "in my article I mention that dudes AI written  program that doesn't do the job properly" - I guess I better go look at your Article!

Hmmm...

-K

Kurt

unread,
Mar 19, 2026, 1:02:21 PM (3 days ago) Mar 19
to 3D Printing Tips and Tricks
Hey Kurt,

It seems all your discussion here has been in regards to painting the polys on the object - to assign a print head. But, what about an object made up of multiple parts - where you assign the print head/filament color to a sub-part of an objects. 

Is that even an option for what you are looking to do??

-K

On Tuesday, March 17, 2026 at 9:28:21 PM UTC-4 Kurt A 3d wrote:

Kurt Gluck

unread,
Mar 20, 2026, 1:24:32 AM (3 days ago) Mar 20
to Kurt, 3d-printing-...@googlegroups.com
Kurt-1

First of all it’s not the painting of the polys that is the issue.   The podcast keeps misstating that the slicer doesnt subdivide the triangles. It does in painting.   However it does it without modifying the underlying mesh but by adding a division mesh on top of it by bysecting the triangles on 1-3 sides as often as it thinks it needs to to approach the brush strokes you have made.   

I have seen cases where there are tens of thousands of these bisections of a single triangle.   Some of them are marked with the default extruder others with an overridden extruder.

When you color a model with the slicer you can color the objects, you can color the parts.  With Prusaslicer you can create ‘modifier’ parts which are like parts but they dont print but Carry overrides to settings - for example which extruder.   Lastly you can paint the model - when you paint an entire triangle that is specified simply but when you ‘split’ the triangle by painting it, it doesnt modify the mesh but it records these splits in the mmu_segmentation attribute of the triangle. 

What I am trying to do is to swap around the extruders in an already painted model.  This is partially for my edification, partially for practice and lastly because I am learning a lot about how the slicer(s) are put together.   

The 3mf file is quite interesting and reading its data has improved my understanding of how the slicer(s) function. 

The model file has all of the objects inside of it.  Each object is described as a set of vertices whose x y z coordinates are offsets from the CENTER of the object.   Seperately the slicer stores where the CENTER of the object is in the overall coordinate space as well as any transformation of that object (rotation, perhaps scaling).  This is probably one of the reasons that we can move objects around the printbed so quickly.  We aren’t actually adjusting thousands of vertices.   The triangles that make up an object (by object I probabably mean part) are then each described by referring to the 3 vertices that define its coordinates.         Simple coloring is the default of the object/part - then a triangle can have a color that overrides that - lastly a triangle can be subdivided by splitting many many many many times and each leaf of that split can specify either use the default color (color of the part) or override it.

There is an implementation limit of 16 colors currently.  Though I dont understand why it’s not 17 :-).    The colors (by color I mean extruder number)  and bisections  interestingly are specified by 1 byte for the FIRST two extruders and 2 bytes when you 3-16 extruders.  Already I have learned that extruders 1 & 2 mean a smaller file when painting.    Thus a scheme where your primary color was 3-16 and lots of painted color was 1&2 would be a much smaller file than one where the painted color was 3&4 and the primary colors were 1&2 :-) 

Kurt-A


Sent from my iPad

On Mar 19, 2026, at 1:02 PM, Kurt <kurt.the...@gmail.com> wrote:

Hey Kurt,
--
You received this message because you are subscribed to a topic in the Google Groups "3D Printing Tips and Tricks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/3d-printing-tips--tricks/QBjwUy1Xufo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 3d-printing-tips--...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/3d-printing-tips--tricks/80f6afe3-498a-4f8a-9522-1a63aa4d5b64n%40googlegroups.com.

Kurt The 3D Printer GUY!!

unread,
Mar 20, 2026, 7:01:09 AM (2 days ago) Mar 20
to 3D Printing Tips and Tricks
So - you HAVE a Model already picked out - that you want to print - and it's ALREADY been painted. 

But, I am STILL Curious. If one was to use a Model - that has Multiple integrated parts - and it was colored based upon Parts - I am then wondering if it would be a completely Different way that the data is stored - and potentially - EASIER to do the filament print head assignment swapping!?!?!?

Can you share the file you are working with? I'm seriously interested in taking a peek at it Sir!

-K

3D Printing Tips and Tricks

unread,
Mar 20, 2026, 6:31:13 PM (2 days ago) Mar 20
to 3D Printing Tips and Tricks
Sorry…I got no idea what you’re talking about. Both PS and Bambu studio put a color attribute on to the facet or triangle. That’s why if the facets are not already aligned you may not get a straight line division between two colors. There’s no sub dividing within a facet that we see at all. Of course if the overall file is divided up then there will be some facet division, but that’s not happening in the paint function. You claimed there is an underlying mesh… You got a documented reference for that from the devs? Or are you just assuming that?
Message has been deleted

Kurt A 3d

unread,
Mar 20, 2026, 7:56:47 PM (2 days ago) Mar 20
to 3D Printing Tips and Tricks


Kurt A 3d
7:32 PM (23 minutes ago) 
to 3D Printing Tips and Tricks
IMG_6693.jpeg
I posted about this previously.  The article on printables I reference below has the references you want. 


On March 5th I replied to your episode posting or MARCH 4th episode #603 and I show an example of painting using prusaslicer that places a colored circle on the face of a cube.  
 
I have since written an article on printables, which I posted on in the forum about a tool (shell script) I am trying to prototype that can swap the extruders around in a 3mf file.   
This articles held the state of my understanding a bunch of days ago.  I have made significant progress since this:
However I still have some bugs so it doesnt currently work.  

WHAT is interesting is that the 3mf files model file has a fixed set of vertices for an object (may be for a part not sure) and that they are in a coordinate system for that object.   When you move an object around the printbed it doesnt update the vertices it just updates the center of the object in x,y,z (this is good since they use floating point numbers for the coordinates and if you kept moving things around the underruns and overruns (dont get me starts on floating point issues (most people don’t know that in binary 1/10th is a repeating fraction the way 1/3 is in decimal)) would accumulate and your object would slowly warp (different kind of warping).    Then triangles that we all know and love are then specified as a set of 3 vertices by index into the list of vertices.  In anycase the painting of a triangle is done (in prusa land, in bamboo land they changed some tokens but its the same) by having a mmu_segmentation attribute on the triangle that specifies which extruder (read my article for details).    NOW if you PAINT using the brush and you have the split triangles option enabled it subdivides the triangle by bisecting it up to 3 times into sub triangles as needed.  IT DOES NOT modify the vertices or the triangles when it does this, it just writes a longer an longer mmu_segmentation attribute in HEXADECIMAL (I have seen ones over 10,000 bytes long).   


My tool currently seems to do what I want however it seems when I attempt to rezip up the 3mf file something goes wrong and the slicer when it opens it dies.    I have hope I will get past that.    Sad to say that the ‘tool’ I am writing is a command line shell script and more of a proof of concept than a modern application.   
  

Kurt-A

Kurt A 3d

unread,
Mar 21, 2026, 7:15:27 PM (21 hours ago) Mar 21
to 3D Printing Tips and Tricks
Andy

Here is a short video I recorded showing you how to "virtually"  subdivide triangles by painting in PrusaSlicer


Kurt-A

Kurt The 3D Printer GUY!!

unread,
12:06 PM (5 hours ago) 12:06 PM
to 3D Printing Tips and Tricks
Kudos to you Mr. Doppelgänger! REALLY Nice Video - and I found it very interesting!!!

By the way, after you video played - another one immediately came up after - and it's a cool one (purely music):   

However, let me NOT Totally Digress from the topic at hand...

Now, I've been trying to hit your problem from a Different Angle - and I KNOW it's NOT the angle you seek. But, I would REALLY like to explore this angle with YOUR Assistance! That is - instead of painting the polys - instead - assign color/print head to Parts of an object. 

As such, yesterday I created a Simple object, did proper boolean operations - so that the Object is made up of multiple parts. This is what it looks like in Prusa Slicer:
MCP_Pic_01.jpg

If I temporarily hide the main box - this is what the parts look like - as you can see the names of the parts in the slicer:
MCP_Pic_02.jpg

I attached to this posting reply the STL file - as well as the 3MF file I created using PS - where I properly split the object into it's component parts - and - ALL parts are in the proper positions. 

Problem is - I do NOT have a toolchanger - and so my PS is NOT setup to allow me to paint the object by parts - and assign print heads. So, Mr. Doppelgänger - if you do that for me, and make material assignments - and then re-upload the 3MF file - I'd love to then take a look at the UnZipped contents of the 3MF file and do a bit of an analysis - to see how the slicer applies the tool head assignments to the parts. Cause - I'd love to figure a quick way to do your permutation assignments to the object. 

Of course, you're probably going to tell me that someone on the Web has already done this. And, I would NOT be shocked - and then it would be a MOOT Point for me to continue in this particular direction...

-K
MCP_Test.stl
MCP_Test.3mf

3D Printing Tips and Tricks

unread,
12:51 PM (4 hours ago) 12:51 PM
to 3D Printing Tips and Tricks
I watched your vid. Thanks for doing it. Note when you painted the circle on to the cube. Take a good look at the edge of that circle. See the rough edges?  I see them!

Regardless… let’s go back to the actual context of the podcast which you took issue with. We were discussing using Smart Fill to paint on to complex shapes such as the wood pots that have the textured color effect. When using the smart fill it detects aligned facets depending on the setting one adjusts to. When those facets do not align then the smart fill can’t make a selection to get a clean line and the user cannot paint a straight line manually during THAT operation.
As Whitney pointed out in that discussion, the facets can be remapped in a number of ways to get the resolution higher and get within the tolerances of the toolpath. But within the paint tool, during this task flow, it does not remap facets.

Reply all
Reply to author
Forward
0 new messages