Simple Boolean Subtraction (4)



Exhibit C operands

Exhibit C, the imprint of a cylinder colliding a sphere, raises a new problem.  Not only that the surfaces are curved, but also the contact contour isn’t even visible! (A mathematician would say he knows what it is, bend a circle over a cylinder…) You’ll see these are not real obstacles! (Download the project file - 12 KB)
1. In Front view, make a sphere, radius 70. Make a cylinder, Start = 23, End =23, Length = 80, uncheck “Cap: Start, End”! With the cylinder selected, do Edit->Rotate->Rotate None, then Edit->Rotate->Rotate Z90. Left click the sphere to be selected both objects and do Edit->Locate->Center About Origin. Click Build->Convert to Mesh to make both object meshes. Next, convert each mesh to Subdivided. Double click the subdivision sphere and enter 3 for working divisions. Repeat this with the subdivision cylinder. You’ll get two nicely smoothed objects.
Change to Side view. The cylinder disappears, because it’s not capped. Turn on Wireframe (Ctrl+W), now you can select the cylinder. Disable Y- axis and move the cylinder to left, like I did in the image on the right. Now you have the Boolean operands positioned for the subtraction!
2. Apply the “white” material on the sphere.  Make a new material, named “black_inside”, starting from the “Inside” material from Exhibit A, step 5! Click the “back” button and disable (make 0) all components. Click OK to exit the Material Editor. Apply this material on the cylinder. We can see now, in Front view, the orthogonal projection of the contact contour!


Front render

3. In the same way as we did above, zoom in with Arc Rotate (in Front view) and make a 600 x 450 antialiased render with the default gray background. Save the image as “front” (see on the left). Now hide the cylinder and make a new render in the same condition. Save the image as “sphere”, this will help you to make the transparency map for the sphere. From now on, you must not change the objects’ relative position!

4. Open “front” in a paint editor. Select the exact boundaries of the black rectangle. Save the selection as “cylindermap”, the transparency map for the cylinder. Make some finishing touches with black brush at the margins of the image, not to remain any gray pixel!

5. Open “sphere” in the paint editor. Make a square selection of the white circle (the selection box has to be tangent to the circle). Make sure you can reproduce the selection coordinates, and then apply this selection to the other image, “front”. Save the selection obtained from “front” as a new image. Make a negative of this image! Paint white the entire image, excepting the central oval. Save the image as “spheremap” (see the image on the right).


Spheremap

6. Double click the sphere and change its material to --default--. Make a new material, call it “sphere”. Leave the default settings, but add “spheremap” as transparency map! In Side view, Point Edit mode, select all the faces on the left half of the sphere. In Front view apply the “sphere” material, then click Texture UV. Click the Select arrow, click away to deselect, change to Edit mode.

7. Make a new material, named “cylinder”. Leave the default settings and add “cylindermap” as transparency map. Hide the sphere. In front view (Edit mode) apply the “cylinder” material on the cylinder. Click Texture UV. Click the Select arrow. Change to Side view, Point Edit mode and cut the left half of the cylinder.
8. Do a test render. You’ll notice immediately the parasite specular reflection, very disturbing for the cylinder, but also recognizable on the transparent area of the sphere (bottom-left)! Disabling the specular components gets rid of the parasite reflection, but alters the shininess of the objects (bottom-middle). The solution is handy: edit the materials, adding the same map, used for transparency, to the specular component (see on the right). Now you are done, having a perfect render (bottom-right)!


Parasite specular reflection


No specular reflection


Correct specular reflection


Previous