AB4D Forum

Full Version: MultiMaterialBoxVisual3D -> paintig on box side together with subtracting a mesh
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to create a box having different patterns on each side (painted on canvas) together with a few holes on those sides.
I created MultiMaterialBoxVisual3D, added a DiffuseMaterial with Canvas to each side and used MeshBooleanOperations Subtract to create a hole on the box side. But after subtracting the whole side disappears. 
I have some doubts if it's possible to paint a pattern on canvas and also subtract a mesh on the same side of the MultiMaterialBoxVisual3D. Is it supported?
You probably want to show different texture images on different sides of the box.

The problem with boolean operations is that it removes the TextureCoordinates that are needed to show the texture.

As it is written in the code comment in the BooleanOperationsSample.xaml.cs, you can use TextureCoordinatesGenerator after boolean operations are done - this can be used to apply texture coordinator to simple objects like boxes, spheres, cylinders and planes.

See also UseCases/ModelingWithBooleanOperations and Utilities/TextureCoordinatesGeneratorSample on how to use TextureCoordinatesGenerator.
Thank you, after generating the texture coordinates I can paint something on the box surface.
But now I have another problem: https://forum.ab4d.com/showthread.php?tid=4192