# How to show/merge multiple Image3D[] graphics?

Suppose I have 2 (or more) Image3D graphics:

redCubes = Image3D[RandomInteger[1, {3, 3, 3}],
ColorFunction -> (If[# == 1, Red, Transparent] &)]


greenCubes = Image3D[RandomInteger[1, {3, 3, 3}],
ColorFunction -> (If[# == 1, Green, Transparent] &)]


How can I show them together, or make a new Image3D out of them? If I simply do Show[], the green/red cubes are kind of shadowed/dimmed, for instance:

Show[redCubes, greenCubes]


Importantly, how to deal with overlaps? I'd like to do some sort of color mix, say the overlaps colored in some red+green; although in my real application I can have more than 2 colors.

Edit: I'd really prefer to work within Image3D[] rather than Graphics3D[], but definitely open to different approaches.

Thanks!

The simple way to desired mix of im3d is following:

redCubes = RandomInteger[1, {3, 3, 3}]
greenCubes = RandomInteger[-1, {3, 3, 3}]

cbs = Evaluate@(redCubes + greenCubes) /. {1 -> Red,-1 -> Green,0 -> Transparent}


Use Graphics3Dfor your purpose. Then create some positions where you want to place red and green cubes:

datr = RandomInteger[{0, 5}, {50, 3}];
datg = RandomInteger[{0, 5}, {50, 3}];


Then determines the overlap and subtract the overlap:

overlap = Intersection[datr, datg];
datr0 = Complement[datr, overlap];
datg0 = Complement[datg, overlap];


Finally draw the cubes and give the overlap e.g. the color brown:

Graphics3D[{{Red, Cube[#, 1] & /@ datr0}, {Green,
Cube[#, 1] & /@ datg0}, {Brown, Cube[#, 1] & /@ overlap}}]