0
$\begingroup$

Is there a way in Blender to export an "unapplied" Boolean but have the subtracted object show up with its inner material on export? I attach an image. When I export, I don't get the interior color of the subtracted material.

I want to paint the "n" faces of an interior of a cube subtracted by "n" objects with their "n" faces.

To illustrate a basic example. Suppose I have this:

https://i.sstatic.net/mpF7g.png

And we apply booleans, with "exact" we have this:

https://i.sstatic.net/0nNG0.png

When I export with "exact" I have:

https://i.sstatic.net/Km8hV.png

If I put it in "transfer" to get a color of the faces I have

https://i.sstatic.net/LWlKY.png

The export does not make any faces.

https://i.sstatic.net/w8hRx.png

This is not a bug?, that is, I can see exactly one of their faces, while with transfer I don't see any.

Maya can do it, but I don't really like the way she does it. https://forums.autodesk.com/t5/maya-forum/boolean-tool-conflicts-with-materials/td-p/11729151

I've been reading this, but I don't know if it's related. https://devtalk.blender.org/t/whats-with-the-new-boolean-modifier-materials-behavior/25827

Is there a way in Blender to export an "unapplied" Boolean but have the subtracted object show up with its inner material on export?

$\endgroup$
1

2 Answers 2

0
$\begingroup$

Solution. You have to add the materials from Box_2 to Box_1. For each slot you have to add them. It's too tedious, but it solves what I was looking for.

$\endgroup$
1
  • $\begingroup$ write a python script to automate it to make it easy 😁 $\endgroup$
    – Harry McKenzie
    Commented Feb 11, 2023 at 13:31
0
$\begingroup$

"Export" is too abstract. There are thousands of different file formats.
What I assume is happening is that the export script uses evaluated copy of the mesh instead of explicitly applying the modifier. But then instead of using the evaluated mesh's four materials, the script uses the original two. The engine then interprets any overflowing face material indices as 0.
There may be reasons for not using evaluated mesh's materials (they were buggy prior to 3.0), but more likely it's a bug in the exporter and should be reported as such. Adding material slots is a pretty obscure / unexpected modifier behavior.

Now that you've clarified that you specifically meant FBX (you also should update the question with this info), I can confirm that, indeed, the default Blender exporter has the exact bug that I had guessed it might have. Note that alternative unofficial FBX exporters also exist, so you still haven't clarified nearly enough.
You should report the bug to the official bug tracker. In the meantime, here's an extremely dirty fix. Replace the file at \Blender 3.4\3.4\scripts\addons\io_scene_fbx\ with the one provided. It may break other functionality.

$\endgroup$
7
  • $\begingroup$ Is there a way in Blender to export this part with these materials without applying modifiers? [Box_1]([Box_2 subtraction colored with their faces] transferred to Box_1) Just like this: i.imgur.com/Sv2XJkW.png Modifiers are only applied when exporting. Geometry -> Apply modifiers. Do not commit the part with the booleans, in case it has to be modified in the future. In Maya you do a lot. $\endgroup$
    – Vaxel
    Commented Feb 11, 2023 at 10:25
  • $\begingroup$ Presumably, fixing the exporter would allow you to do just that. You haven't clarified what the exporter or the target engine is. Without fixing the script, your only option as a user is to use "Index-Based" instead of "Transfer" and add material slots manually. It's possible that even simply adding empty slots will do the trick, depends on how the exporter operates under the hood. $\endgroup$
    – chedap
    Commented Feb 11, 2023 at 10:31
  • $\begingroup$ I know of 2 ways and the 2 ways don't work. For example, we take FBX. i.imgur.com/PnyUZqd.png. i.imgur.com/W1Vxn4h.png They both look like this: i.imgur.com/GnM4RIy.png $\endgroup$
    – Vaxel
    Commented Feb 11, 2023 at 10:39
  • $\begingroup$ For example. Imagine that I have a large object. A house for example. This house has subtractions and each subtracted face has a color, (dining room (floor, ceiling, walls), room (floor, ceiling, walls), hallway (floor, ceiling, walls)...) So that cube matches each subtracted zone it has to have a material type. So if one day I have to change something I just move the cube (without applying booleans) since these are only applied on export. It is understood? Maya does this and that is why Maya is so good. But all good things have mistakes. $\endgroup$
    – Vaxel
    Commented Feb 11, 2023 at 10:48
  • $\begingroup$ The problem is not to paint it a single color, the problem is that Maya has a system similar to UE5 and you can paint every inside face. $\endgroup$
    – Vaxel
    Commented Feb 11, 2023 at 10:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .